Reconstruction of computer room charge system--database design

Source: Internet
Author: User

Remember, the first time to write a computer room fee system Document template, a full 12 documents need to write, just spent two or three days to let the master acceptance, the completion of the project, so swallowed the document was written. You should know: the account owed, after all, is to pay. Now to the computer room toll system personal version of the reconstruction phase,
(1) abstract the data and design a local conceptual model;
(2) Synthesis of the local conceptual model into a global conceptual model
(3) can be drawn according to the requirements of the computer room charge system database Conceptual Design Model--er diagram.
It can be said that the concept of the previous database design for me to lay a lost design foundation, plus the "database system principle" in the three-paradigm theorem, the spirit of learning and learning, humbly consult the idea, and then published this blog, I hope that we have a lot of corrections.


in database design, it is particularly important to clarify the ER diagram. But often, we simply do not know, there is a kind of shear constantly, the reason is also disorderly feeling there is wood ... There is wood there.
Sneak Peek:




1, the first paradigm 1NF
Definition: A field in a database table is a single attribute and cannot be divided.
in layman's words , each attribute is an atomic term, indivisible.

Such as: address this attribute must be broken down into provincial, district, Street, Township, Road, several of these single-valued attributes.

2, the second paradigm 2NF
Definition: If the relationship mode R is 1NF, and each non-primary property full function depends on the candidate key.

It is simple to say that, in satisfying the first paradigm, when the non-primary key information in a table is not determined by the entire primary key function, that is, when there is a part of the table that is not the primary key or depends on the portion of the primary key, this does not satisfy the 2NF relational pattern

such as: The original computer room fee system Student table, can be split into student information sheet and card table. This satisfies the second paradigm.

3. The third Paradigm 3NF
Definition: If the relational mode R is 1NF, and each non-primary attribute does not pass a candidate key that relies on R.

In layman's words, the elimination of attributes that do not directly depend on the primary key of the table formed by the first and second paradigms creates a new table for all information that is not associated with the primary key of the table. Each new table holds information from the original table and the primary key that they depend on.

Such as: the level of the administrator is determined by the user name "UserID", and "userid" by the students on the internet "Studentno" and "Cardno" to judge, resulting in the transfer of dependence, the third paradigm is often the role of eliminating the dependence of transmission.


Practice is the only criterion to test truth. This is true, I have been pondering over half a day, it is better to start a painting quickly, painting the painting, the relationship between more and more clear.

Again look at the computer room charge System--er Chart bar (affirmation: My picture must have flaws ... Small Hope big God many Haihan, small really in hard to learn ing)


From my ER diagram, you can see clearly the relationships between entities and the attributes of entities, as well as the connections between entities. Thus it can be converted into a relational model. How to convert yourself Baidu a bit.



Personal Computer room reconstruction is just beginning ... This opening road seems to be a little too difficult , the return to the pope and their own sins, broken teeth can only be swallowed in the belly, step by step, will be able to do.

Reconstruction of computer room charge system--database design

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.