Database Design -- Three Paradigms

Three paradigms of database design

 

1NF: Field is not subdividable

E.g:

table: id, user_name (first_name, last_name), user_name should be split into two fields

 

2NF: A table does only one thing

E.g:

Table: student number, name, age, course name, grades, credits; in this case, it should be split into three tables, student information table, course table, student and course relationship table

 

3NF: There should be no columns that depend on non-primary keys

E.g:

Table: id, total price, quantity, average price; the average price is obtained by dividing the total price by the quantity, rather than relying on the primary key, this will not work

 

 

Anti-paradigm when appropriate

When the data table query requirements are relatively high, it can be appropriate to denormalize to meet the query requirements.


 

      We advocate high-level redundancy (derivative redundancy) and oppose low-level redundancy (repetitive redundancy).
 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326523075&siteId=291194637