Explain entity integrity and referential integrity rules, Database Management System

Assignment Help:

Explain entity integrity and referential integrity rules within relational model. Show how these are realized in SQL?

Entity Integrity Rule - No primary key value could be null.

Referential Integrity Rule - In referential integrity, it is ensured in which a value which appears in one relation for a given set of attributes also appears for a certain set of attributes within another relation.

In SQL, entity integrity and referential integrity rules are implemented as constraints on the relation known as primary key constraint or reference key constraint corresponding. These constraints can be specified along with relation at the time of creation of the relations or after the creation of the relations through altering the definition of the relations. For instance:

CREATE TABLE DEPT

(DEPTNO NUMBER PRIMARY KEY,

DNAME VARCHAR2(15));

CREATE TABLE EMP

(EMPNO NUMBER PRIMARY KEY,

 20

 ENAME VARCHAR2(15),

JOB VARCHAR2(10),

DEPTNO NUMBER REFERENCES DEPT(DEPTNO));


Related Discussions:- Explain entity integrity and referential integrity rules

Should i select imaging software that allows changes, Should I select imagi...

Should I select imaging software that allows changes? An imaging system should not give features to edit or alter images. Images generally are formed as safe and secure records

Define single valued and multivalued attributes, Define single valued and m...

Define single valued and multivalued attributes.  Single valued attributes: attributes with a single value for a particular entity are known as single valued attributes.   M

Define the term domain, Define the term Domain. For each n every attrib...

Define the term Domain. For each n every attribute there is a set of permitted values known as the domain of that attribute.

Define canonical cover, Define canonical cover? A canonical cover Fc fo...

Define canonical cover? A canonical cover Fc for F is a set of dependencies like F logically implies all dependencies in FC and Fc logically shows all dependencies in F.

Difference between operating system and database security, Difference betwe...

Difference between Operating System and Database Security Security within the operating system can be executed at various levels ranging from passwords for access to system, t

Explain traditional programming languages, How persistent programming langu...

How persistent programming languages differ from traditional programming languages? Database languages vary from traditional programming languages in that they directly manipul

Hangman, a method named WonGame that checks each letter in the word is matc...

a method named WonGame that checks each letter in the word is matched by its label

Database Management System, please give me introduction to full data in D B...

please give me introduction to full data in D B M S in a short assignment

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd