Serialization 6
Original: fat Liu (please indicate the source and author for reprinting. Thank you .)
(5) General principles for using the above four models
1. When will I use the "primary extension mode "? The number of objects is small; the attributes of each object are different; the attributes of each object can be completely determined in the database design phase; each extension object has independent and relatively complex business processing requirements. In this case, the main extension mode is used ". The common attributes of each object are extracted and designed as the "main table". The remaining attributes of each object are designed as the corresponding "extended table ", the "primary table" and each "extended table" Create a one-to-one relationship. 2. When should I use the "master-slave mode "? The number of objects is large and not fixed; the attributes of each object are almost identical; the attributes of the object can be completely determined in the database design stage; each object has no independent business processing requirements, in this case, the "master-slave mode" is used ". Design each object as a "Slave table" record and establish a one-to-many relationship with the "master table" object. 3. When should I use "name-value mode "? The number of objects is very large; the attributes of each object are quite different; the object attributes cannot be determined during the database design stage, or are greatly changed during system operation; each object does not have an independent business processing requirement. In this case, the "name value" mode is used ". 4. When should I use "many-to-many mode "? The two objects are in a one-to-multiple relationship ".
Source: http://blog.csdn.net/liu7537/archive/2006/04/10/657274.aspx