[Database] Business Design - paradigm (paradigm and three anti-paradigm design)

table of Contents

First, the first large database design paradigm

Second, the second largest database design paradigm

Third, the third largest database design paradigm

Fourth, the anti-paradigm design


First, the first large database design paradigm

  • All fields in a database table having only a single attribute
  • Column single attribute is composed of basic data types
  • The tables are designed simple two-dimensional table

 

name-age properties with two columns, a name, an age do not meet the first paradigm, it split into two

 

Second, the second largest database design paradigm

  • It requires a table having only natural key, i.e. the table can not meet the second paradigm presence of a non-primary key column only dependence on the part of the primary key

 

There are two tables: Orders table, the product table

 

A line with a plurality of products, so the order of primary key [Order ID] and [item ID] consisting of the primary key, so that two components do not meet the second paradigm, and the product ID and line ID is not a strong correlation, therefore, the order orders table split into tables and the order table and the intermediate product

 

Third, the third largest database design paradigm

  • It refers to a non-primary property of each portion dependent on neither transmission nor rely on natural key, i.e. on the basis of the second paradigm transmitted along the non-primary key for the primary key dependency

among them

Number and order number associated with customer management

Customer name and order number associated with management

Customer number and customer name associated

 

If the customer number changes, the user's name will change, so does not meet the third paradigm, should the customer name deleted this column

 

Fourth, the anti-paradigm design

What is anti-paradigm design

  • Anti-normalization is for normalization purposes too, in front of a database designed to introduce paradigm
  • The so-called anti-normalization is to get the performance and efficiency have to read and consider the appropriate database design paradigm was obtained in violation of the requirements
  • Allows the presence of a small amount was redundant , in other words the anti-normalization is to use space for time
Published 54 original articles · won praise 47 · views 10000 +

Guess you like

Origin blog.csdn.net/cy973071263/article/details/104553011