Entity integrity and referential integrity in dbms in hindi referential integrity constraint in dbms

Published: 16 December 2020
on channel: QuickCS
5,194
83

Referential Integrity, Entity Integrity Constraint, Foreign Keys
A tutorial by QUICKCS
What are we going to learn?
What is Entity Integrity Constraint?
What is Referential Integrity Constraint?
What is Foreign Key?
Entity Integrity Constraints
Entity Integrity Constraints : It states that no primary key value be NULL.
Why?
This is because Primary Key is used to identify individual tuple in a relation.


Having “NULL” values for primary key implies that we cannot identify some tuple.
For example If we were trying to reference some tuple from other relation & 2 or more tuple had the primary key “NULL” how can we differentiate.
Example
Referential Integrity Constraints:
Informally, the referential integrity constraint states that a tuple in one relation that refers to another relation must refer to an existing tuple in that relation.
The Referential Integrity Constraint is specified between 2 relations and is used to maintain consistency among tuples in 2 relations.
Foreign Key
Definition: A foreign key is a set of attributes in relation schema R1 is a foreign key in R1 that references relation schema R2 if it satisfies following 2 conditions:
1. The attributes in FK have the same domain(s) as the primary key attributes PK of R2; the attributes FK are said to reference or refer to the relation R2.
2. A value of FK in a tuple t1 of the current state r1(R1) either occurs as a value of PK for some tuple t2 in the current state r2(R2) or is NULL. In the former case, we have t1[FK] = t2[PK], and we say that the tuple t1 references or refers to the tuple t2.
#referentialintegrityconstraints #foreignkey #entityintegrity


Watch video Entity integrity and referential integrity in dbms in hindi referential integrity constraint in dbms online without registration, duration hours minute second in high quality. This video was added by user QuickCS 16 December 2020, don't forget to share it with your friends and acquaintances, it has been viewed on our site 5,194 once and liked it 83 people.