TOPICS (Click to Navigate)
Monday, 31 July 2017
entity integrity in database management system relational model
Entity integrity and referential integrity are the basic set of rules for the relational model. Entity integrity defines the properties that are to be satisfied by a primary key.
We all know that a primary key is UNIQUE + NOT NULL. That is, it cannot contain duplicate values and NULL values. This is what entity integrity is all about.
Entity integrity - No component of a primary key is allowed to have NULL values.
STUDENT (Register_Number, Name, Date_Of_Birth, Phone)
In this table STUDENT, the attribute Register_Number is the primary key. Hence, it cannot contain NULL value in it.
STUDENT_COURSE (Register_Number, Subject_Code, Registered_Date)
Assume that the table given above is to store the subjects that are registered by a student. A student may register one or more subjects. Hence, the key for this table is a composite key which consists of (Register_Number, Subject_Code).
In this case, neither Register_Number nor Subject_Code can contain NULL values.
Go to Important Keywords/Terms in DBMS page
Go to Advanced DBMS concepts page
SQL Exercises for Beginners / Simple SQL Exercises with Answers / Solved SQL exercises / SQL solved exercises with simple conditions / So...
Advanced concepts in DBMS Advanced Database Topics (Click on the links to navigate) Advanced Concepts in D...
Set of solved exercises in Normalization / Normalization Solved Examples / How to find candidate keys, and primary keys in database? /...
Query Processing in DBMS / Steps involved in Query Processing in DBMS / How is a query gets processed in a Database Management System? / Q...