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

Datawarehouse, 1) Define a job scheduling strategy that will meet business ...

1) Define a job scheduling strategy that will meet business requirement of reporting availability by 6am CST for the following cubes? Show the job scheduling dependencies in a pict

Define average seek time, Define average seek time. The average seek ti...

Define average seek time. The average seek time is the average of the seek times, calculated over a sequence of random requests.

Clustering indexes, Clustering Indexes It may be an excellent idea to k...

Clustering Indexes It may be an excellent idea to keep data of the students in the order of the programme they have registered as most of the data file accesses may need studen

The file based system in dbms, The File Based System File based systems...

The File Based System File based systems are an early attempt to computerise the manual filing system. For example, a manual file can be set up to hold all the correspondence r

Er diatgrams, Ask q“A database will be made to store information about pati...

Ask q“A database will be made to store information about patients in a hospital. On arrival, each patient’s personal details (name, address, and telephone number) are recorded wher

Define check point and its impact on data base recovery, Define check point...

Define check point and its impact on data base recovery.                  Ans:  There could be hundreds of transactions handled per minute, in a large on-line database system.

How to design a formal and exact model, How to design a formal and exact mo...

How to design a formal and exact model How to design a formal and exact model of real-world problems by applying findings of analysis phase of OMT. The object design phase find

Explain generalization and aggregation in e_r diagram, Explain the concept ...

Explain the concept of generalization and aggregation in E_R diagrams. Give one example for each one of them? Generalization: Consider extending the entity set account throug

Give short note on the following terms- dirty pages and etl, Give short not...

Give short note on the following terms:Dirty pages and ETL a.) Dirty pages. These are buffer pages which comprise modifications which haven't been written to disk. b.

Assignment, Birla Institute of Technology & Science, Pilani Work-Integrated...

Birla Institute of Technology & Science, Pilani Work-Integrated Learning Programmes Division Second Semester 2012-2013 EC-1 Assignment 2 (7.5% of the grade) Course No. : SS ZG

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