Database System Concepts Reading Notes-entity-Contact Model

Source: Internet
Author: User

Database System Concepts Reading Notes-object-contact model preface in order to review the message system architecture I wrote, I need to re-read the first three chapters of database system concepts, here is a simple note to facilitate your own review of the basic concepts of the entity-contact (E-R) Data Model Based on such an understanding of the real world: the world is composed of a group of basic objects called entities and the relationships between these objects. The three main concepts of E-R data model are as follows: entity set, contact set, and attribute entity set entities are "events" or "objects" entity sets that can be different from other objects in the real world. They share the same type and share the same properties (or attributes) object set objects are represented by a set of attributes. Attribute is the descriptive nature of each member in the entity set. Assigning an attribute to an object set indicates that the database stores similar information for each object in the object set, but each object has its own values for each attribute. Attribute Type Division: a simple attribute is associated with a single-Value Attribute and a multi-value attribute derived attribute contact set. The association set between multiple entities is a set of the same type of contact. According to the norm, the contact set is the mathematical relationship between n (n> = 2) entity sets. These entity sets do not need to be different from each other. If E1, E2 ,..., if En is n entity sets, then the contact set R is {(e1, e2, e3 ,.., en) | e1 (-E1, e2 (-E2 ,..., A subset of en (-En}, where (e1, e2, e3 ,..., an association constraint has an entity set and a link set, which naturally generates a constraint. The constraint describes the relationship between an entity set and an entity set, this relationship is now a contact set. We will discuss the ing base and the involved constraint ing base, or the base ratio, specify the number of entities that can be associated with another object at the same time through A contact set. For the binary contact set R between entity set A and entity set B, the ing base must be one of the following situations: one-to-one, many-to-many, and many-to-participate constraints if every entity in entity set E participates in at least one contact in the contact set R, we call entity set E all involved in the contact set R. If only some entities in entity set E are involved in the contact set R, we call the entity set E part participate in the association set R code. We must have a method that can distinguish all objects in an entity set. In terms of concept, entities are different from each other. However, from the database point of view, their differences must use their attributes to indicate the concept of code so that we can distinguish entities, codes can also uniquely identify connections and distinguish them from each other. supercodes: a set of one or more attributes, the combination of these attributes allows us to uniquely identify an entity candidate code in an entity set: any real subset cannot be called a supercode, that is, the smallest hypercode primary code: the concept of the candidate code design question entity set and the contact set selected by the database designer is not accurate, in addition, defining a group of entities and their interconnectivity can be done in a variety of different ways. It is clear to use an entity set or an example of the phone number and name in an attribute book, which is an attribute and which is an entity set, note two common errors: one common error is that the primary code of the entity set is used as the attribute of another entity set, another common error is that the primary code attribute of the related object set is used as the attribute of the contact set. The following two problems may occur: data is stored multiple times, which wastes storage space updates and may cause data to be inconsistent. That is, the two links should have properties with the same value with different values of binary links. The relationship between the system set and the n-Element Contact set can be broken down into a binary relationship, but the relationship description is inaccurate. The entity-contact diagram E-R diagram contains the following main components: rectangle: object set oval: attribute diamond: Contact set line segment: connects an attribute to an object set or connects an object set to an attribute set double oval: multi-value attribute virtual oval: derived attribute double rectangle: weak entity set to give an example of the book: postscript purely in order to review the E-R model and E-R graph painting, compare water, master can directly skip it!

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.