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

What is hierarchical dbms, What is Hierarchical DBMS In HDBMS, data is ...

What is Hierarchical DBMS In HDBMS, data is structured in a tree like manner. There is a parent-child relationship between data items and the data model is very suitable for re

With the help of a diagram defines typical element modules, With the help o...

With the help of a diagram defines the typical element modules of a DBMS? The functional elements of a database system can be widely divided into: 1) Storage manager and 2) q

What is E-R model, E-R Model This data model is based on real world th...

E-R Model This data model is based on real world that consists of basic objects named entities and of relationship among these objects. Entities are illustrated in a database

The concurrent transactions, The Concurrent Transactions  Almost every ...

The Concurrent Transactions  Almost every commercial DBMS support multi-user environment. Therefore, allowing multiple transactions to proceed concurrently. The DBMS must make

Explain degree of relation, Explain degree of relation? Degree of a Re...

Explain degree of relation? Degree of a Relation - The degree or arity of a relation is the number of attributes n of its relation schema.

Heap files (unordered file), Heap files (unordered file) Mostly these f...

Heap files (unordered file) Mostly these files are unordered files. It is the easiest and most basic type. These files having of randomly ordered records. The records will have

Illustrate the class diagram for class room scheduling, Illustrate the clas...

Illustrate the class diagram for class room scheduling system If in any college, the number of classrooms are limited which have to be allocated to various classes and instruct

Define the query optimisation, Define the Query optimisation The query ...

Define the Query optimisation The query parser commonly generates a standard initial tree to correspond to an SQL query, with no doing any optimization. Such type of a canonica

Write expressions in relational algebra, Given the subsequent relations: ...

Given the subsequent relations:    vehicle (reg_no, make, colour)    Person (eno, name, address)    Owner (eno, reg_no)   Write expressions

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