Got it

[ Technical Dry Goods ] Foundation of Relational Modeling in DAYU-Three Paradigms

130 0 0 0 0

Hello, everyone!

Today I'm going to introduce you DAYU

First normal form

  • All attributes should be atomic, that is, each attribute can only store indivisible atomic data items, not non-atomic data items such as collections, arrays, and records.

  • All values stored in the attribute must have the same form.

  • The attribute must have a unique name.

  • Each record must be uniquely identifiable.

In the above figure, the "customer" logical data entity stores the "contract date". If this customer signs multiple contracts, the "contract date" attribute will store multiple values. Therefore, in violation of the first paradigm, the "customer" logic should be The data entity is split into two logical data entities, "customer" and "contract".

Second normal form

  • The attributes of logical data entities are completely dependent on the primary key. The so-called complete dependence means that there cannot be attributes that only depend on a part of the primary key. If it exists, then the corresponding parts of these attributes and the primary key should be separated to form a new logical data entity.

  • Before satisfying the second normal form, the first normal form must be satisfied.

The "student name", "student gender", "department name", and "dean name" in the logical data entity of "student achievement" in the above figure are not completely dependent on the primary key "student number + course number" but only on "Student ID", therefore, in violation of the second paradigm, the logical data entity of "student grade" should be split into two logical data entities of "student grade" and "student".

Third normal form

  • Any non-primary key attribute does not depend on other non-primary key attributes. Any non-primary key attribute must not be transitively dependent on the primary key attribute. If it exists, these attributes should be separated to form a new logical data entity.

  • Before satisfying the third normal form, the first and second normal forms must be satisfied.


  • The "dean's name" in the "student" logical data entity in the above figure depends on the "belonging department name", and the "belonging department name" depends on the "student number", that is, there is a transitive dependency relationship, therefore, it violates the third normal form , The logical data entity of "student" should be split into two logical data entities of "student" and "department".


Comment

You need to log in to comment to the post Login | Register
Comment

Notice: To protect the legitimate rights and interests of you, the community, and third parties, do not release content that may bring legal risks to all parties, including but are not limited to the following:
  • Politically sensitive content
  • Content concerning pornography, gambling, and drug abuse
  • Content that may disclose or infringe upon others ' commercial secrets, intellectual properties, including trade marks, copyrights, and patents, and personal privacy
Do not share your account and password with others. All operations performed using your account will be regarded as your own actions and all consequences arising therefrom will be borne by you. For details, see " User Agreement."

My Followers

Login and enjoy all the member benefits

Login

Block
Are you sure to block this user?
Users on your blacklist cannot comment on your post,cannot mention you, cannot send you private messages.
Reminder
Please bind your phone number to obtain invitation bonus.