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

Illustrate the cardinality of relationship, Cardinality of Relationship ...

Cardinality of Relationship One-to-One Only one entity of the first set is linked to only one entity of the second set. E.g. A teacher teaches a student. Only one teacher

Reasons for the growing popularity of data mining, Question: Data Minin...

Question: Data Mining is the process of extracting knowledge hidden from large volumes of raw data. (a) Using a suitable example, illustrate how Data Mining can be useful t

Data base design for a museum information system, In this practical assignm...

In this practical assignment, we will run through a complete database application development cycle, starting with the schema design, from an initial data import to database applic

Define deadlock prevention, Define deadlock prevention. Deadlock preven...

Define deadlock prevention. Deadlock prevention is a set of methods for ensuring that at least one of the four essential conditions like mutual exclusion, hold and wait, no pre

Aggregation, Design a database for an airline.The database must keep track ...

Design a database for an airline.The database must keep track of customers and their reservations,flights and their status, seat assignment on individual flights and, the schedule

find a non-redundant cover and canonical cove, Given the following set of ...

Given the following set of functional dependencies {cf→ bg, g → d, cdg → f, b → de, d → c} defined on R(b,c,d,e,f,g) a. Is cf→ e implied by the FDs? b. Is dg a superkey?

Organize the clients from email marketing, Function requirement as given: ...

Function requirement as given: 1> manage fans and likes and followings those information from facebook. twitter. google+ and linkedin etc 2> Organize the clients from email m

Design of distributed databases, Design Of Distributed Databases: The dist...

Design Of Distributed Databases: The distributed databases are mainly relational at local level. So a local database schema is the similar as that of a centralised database design

What are the types of storage devices, What are the types of storage device...

What are the types of storage devices? Primary storage Secondary storage Tertiary storage Volatile storage Nonvolatile storage

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