Database Design--e-r Diagram

Source: Internet
Author: User


One, review the foundation

1. Weak entities

Such entities need to be dependent on one entity. If there is another entity that does not exist. It disappears as well. In contrast, the entity it relies on becomes a strong entity.





2, Specialization

In the process of database design, we will find. An entity can be divided into several sub-entities according to certain characteristics, which in fact is a process from general to special, which becomes specialization.



Two, two RMB contact: ER an algorithm for converting graphs into relational patterns

1 , if the relationship between entities is 1:1 , there is a relationship pattern in which the two entity types are converted into two relational patterns, and a relation pattern is added to the properties of the key and The properties of the contact type.

2 . If the entity key contact is 1:n, 1 is added to the relationship model converted to N-end entity type The properties of the key and contact type of the end entity type.

3 , if the relationship between entities is m:n , the contact type is also converted to relational mode. The property is a two-segment entity type key plus a contact Type property, and the key is a combination of entity keys at both ends.



That is, there is only a single table in many-to-many relationships, and in other cases there are several entities that are converted into several tables, and when you add a primary key to one entity to another, consider why the N-side increases. The individual feels that the database has been done long. It is also clear that the N-side increase can be clearer to make the database more easy to change.


This does not give examples, too familiar, or more practice. Do a few database to understand.






Database Design--e-r Diagram

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.