Paradigm, SQL Server underlying, and. Net Framework hosting

Source: Internet
Author: User
A technician from an outsourcing company called me yesterday and asked me about some database knowledge. He asked me what is paradigm? I don't know. He asked me again, do you know the underlying operations of the database? I don't know. At that time, he asked me whether the paradigm was actually not reflected. He asked me about the underlying operations of the database. I didn't know what the underlying operations he was referring to. Later, I checked the information online, I have a basic understanding of the underlying operations.
In general, the relational database paradigm is divided into the first to sixth paradigm, which we usually use is the first, second, and third paradigm. Relational databases must meet the first paradigm, otherwise they will not be relational databases.
The first paradigm refers to a record that should be a row rather than a column. For example, the company information includes the company name, company address, contact number, fax, and so on. All the information should be placed in one row, instead of a column, this is the first paradigm.
The second paradigm refers to a record that should have a unique field, that is, the primary key. in the database, the primary key often has auto increment and GUID, and the primary key is also the index key.
The third paradigm is actually the most used in the relational database. one-to-many and many-to-many are in the third paradigm category, which may not be easy to understand. Let's talk about this. For example, the product information contains information related to the manufacturer. The vendor information includes the name, address, phone number, and so on, then we should separate the vendor information as a table. In the product information table, only one index matches the primary key of the vendor table.
In general, during the process of table creation, the second and third paradigms are used the most, and the first paradigm is rarely used, because records without primary keys are almost meaningless. But do we have to conform to a certain paradigm when creating a database? The answer I gave is No. The database creation must comply with the actual situation, rather than the principle of the third paradigm. The third paradigm does have its advantages, such as reducing data redundancy, but we cannot ignore the troubles brought by the third paradigm, such as more complex SQL statements, we need to use the join query or subquery to obtain the query results.. Net Framework development is not very good at processing, and multi-table queries will slow down. Therefore, when creating a database, we should determine whether the third or second paradigm is used based on the actual situation. For example, the third paradigm must be used for vendor information and product information I mentioned first.

The second question is the underlying operations of the database. I didn't understand what the underlying layer of the database he said at the time, and then I came to the network to check it, the bottom layer of the database is some system tables of the database, insert and update data.
When SQL Server creates a database, each database has some system tables, such as Sys_Objects and Sys_Columus. What are these tables, these tables describe the information of the tables you have created, stored procedures, triggers, indexes, etc. That is to say, all the tables you have created are saved in the system table, such as Sys_Columus, to save the column information of the table.
The other is the data insertion method of the database. when the data is inserted, there will be a temporary data (inserted). when updating the data, the original record will be deleted first, insert a new record, and delete the data directly. Therefore, when a database is triggered, there are only two types of database actions: inserted and updated. Based on these two features, it is useful when writing a trigger. There is another third question. I don't remember which company asked me which is about. net code hosting, I thought it was the callback mechanism hosting, because there is a hosting in C #, but what he actually asked is.. Net code hosting.
To learn about hosting, we need. net working mechanism ,. net is actually compiled into an intermediate language (MSIL), that is, whether you use C # Or. net, will be compiled into a MSIL, rather than the local machine code (based on the specific operating system and the specific hardware environment generated binary code ). When running a program, you must start it first.. Net Framework (a service started with the operating system) to run your program, that is.. Net Framework is an environment where your program runs not in the operating system.. Net Framework .. Net Framework will compile your program into a binary code that matches the local machine, called Just-in-time (JIT, runtime compilation ), compile at runtime is an on-demand compilation mechanism.
This process is managed. When your program is hosted by. Net Framework,. Net Framework will provide a garbage collection mechanism for your program until the life cycle of the running program ends. Finally, I would like to say that conceptual things are useful sometimes, especially when you are looking for a job, because they generally take this test, so you should remember more terms, concepts, and terms.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.