The design theory and thinking of database
In the design of the database, there is a well-known design theory --- paradigm theory.
1. Content:
The first paradigm: the data types of each column should be unitary and must be unified;
The second paradigm: When designing the primary key, the primary key is as much as possible to reflect the data information in the table.
Example: Combined primary key in a fraction table
The number of goods and the time of the out of storage set the combined primary key
The third paradigm: each column in a table has data information that is directly related to the primary key as much as possible.
2, under what circumstances use ' paradigm theory '?
Take ' invoicing ' as an example:
Primary key design for foreign key table
Relationships between database tables:
Relationship to the primary foreign key table:1 relations to N , when this relationship occurs, it is drawn separately to design two tables.
When n - n relationships occur, the tables must be separate tables
11-15c# Foundation--The Paradigm Theory of database