Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Top two integrity rules for RDBMS relational model

There are two popular data Integrity rules must know by every SQL developer working on any RDBMS.

Stocksnap.io

According to computerworld RDBMS is not suitable for current day massive volume of data. So you need other kind of databases . Those are called NoSQL – Not only SQL database. But, still you need to be master on it. If you want to master in SQL you can try this course.

The No#1 is Entity integrity and second one is Referential integrity.

Entity Integrity

  • Entity Integrity-No attribute participating in the primary key of a base relation is allowed to contain any nulls.
  • Primary key performs the unique identification function in relational model
  • Thus a null primary key value within a base relation would be like saying that there was some entity that had no known identity
  • An entity that cannot be identified is a contradiction in terms, hence the name entity integrity

Referential integrity

  • If a base relation(table) R2 includes a foreign key FK matching the primary key PK of some base relation R1, then every value of FK in R2 must either be equal to the value of PK in some tuple of R1 or be wholly null.
  • A given foreign key value must have matching primary key value in some tuple of the referenced relation if that foreign key value is non null.
  • Some times it is necessary to permit foreign keys to accept nulls.
  • Here, it must be noted that the null are of ‘value does not exist’ rather than ‘value unknown’ variety.

Filed under: SQL Tagged: RDBMS Integrity rules, SQL tips and tricks


This post first appeared on Srinimf - Tech.Jobs.Biz.Success, please read the originial post: here

Share the post

Top two integrity rules for RDBMS relational model

×

Subscribe to Srinimf - Tech.jobs.biz.success

Get updates delivered right to your inbox!

Thank you for your subscription

×