Monday, July 31, 2017

entity integrity in database management system relational model

Entity integrity in DBMS, Define entity integrity, entity integrity examples


Entity Integrity
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.

Example 1:
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.

Example 2:
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.

**************








No comments:

Post a Comment

Featured Content

Multiple choice questions in Natural Language Processing Home

MCQ in Natural Language Processing, Quiz questions with answers in NLP, Top interview questions in NLP with answers Multiple Choice Que...

All time most popular contents

data recovery