Database design of "Computer room charge System"

Source: Internet
Author: User

Overview This paper introduces the database design based on The three-paradigm of computer room charge system .

Meets only the most basic functional requirements. Do not include additional information to save.

Recall

The relationship pattern design has a Direct impact on data redundancy and data consistency.

Thus, we have an evaluation indicator. That is the paradigm.

First paradigm: Relational patterns R of every relationship R attribute values are non-divided atomic values

The second paradigm: Relational patterns R is a 1NF and each non-primary attribute is completely dependent on the candidate key

The third paradigm: Relational patterns R is a 1NF and each non-primary property is not passed on R the candidate Keys

ER Figure

ER an algorithm for converting graphs into relational pattern sets

step one (conversion of entity type)

card table worker table Basic data tables and machine tables. Because the machine has only one property, it can be merged with others.


Step Two (conversion of the contact type) does different processing depending on the situation.

Step 2.1 two USD contact type conversion

1 if the relationship between entities is 1 : 1 You can convert the two entity types into a relational pattern, the attributes of the entities are the attributes of the relational schema, and the entity identifiers are the keys of the relational pattern.

2 ) If the entity contact is 1 : N then in N the end entity type is converted into relational mode to increase 1 Key of the end entity type as a property of the foreign key and contact type.

3 if the relationship between entities is m:n , the contact type is also converted into a relational model. Its properties are the keys of the two-entity type (as foreign keys) plus the properties of the contact type. The key is a combination of two-segment entities .

That was

Steps 2.2 conversion of a unary contact type

Similar to the conversion of a two-dollar contact type.

Step 2.3(conversion of ternary contact types)

1) if the inter-entity linkage is a property of 1:1:1 capable of converting three entity types into three relationship patterns in a random one or two relationship pattern, add another two relationship pattern to the key (as a foreign key) and the properties of the contact type.

2) If the relationship between entities is 1:1:n, then add the key (as foreign key) and the contact Type property of the two 1-end entity type to the N-end entity type conversion into the relational mode.

3) If the relationship between entities is m:n:p, then the contact type is also converted to the relational mode, whose attribute is the key of the entity type (as the foreign key) plus the property of the contact type, and the second key is a combination of three-end entity keys.

From this

watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqvdtaxmde3njaxna==/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/ Dissolve/70/gravity/center ">

The above for personal understanding, in the actual implementation will also have to think about the place of a slight change. There is something wrong with welcoming the Guide.

Database design of "Computer room charge System"

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.