Question
Which of the following integrity constraints ensures
that every non-null foreign key value must reference an existing primary key value in another table?Solution
Referential integrity enforces a relationship between two tables by ensuring that a foreign key in one table matches a valid primary key in another table. This constraint guarantees that the data is consistent and prevents "orphan" records. For example, in an "Orders" table with a foreign key referencing a "Customers" table, referential integrity ensures that every order must belong to an existing customer. If a foreign key value does not match any primary key value in the referenced table, the database system will reject the operation, ensuring data consistency. Why Other Options Are Incorrect:
- Option A: Entity integrity relates to primary keys, ensuring they are unique and not NULL. It does not address relationships between tables.
- Option C: Domain integrity enforces the validity of data types and permissible values for attributes, such as ensuring an "age" column only contains integers.
- Option D: Key integrity is not a formal term in relational database theory. It may be confused with primary or candidate key constraints but is not relevant here.
- Option E: Tuple integrity is not a standard concept in relational databases, making this option invalid.
Who among the following has ordered from Meesho?
Five people are standing in a line facing north R, L, P, J and C, not necessarily in this order. R is standing at one of the extreme ends. Two people ar...
Statements:
All Rose are Lotus
Some Lotus are Tulip
All Tulip are Lily
Conclusions:
I. Some Lily are Rose
II. No Rose is a Lily
If I sits second to the left of N, then how many persons are sitting on the left of I?
Who sits third to the left of Bhaskar?
Who among the following sits at one of the extreme ends?
In which of the following institute did Chetan study?
How is A related to R?
Which of the following statement are true?
I. H likes brown
II. A sits opposite to C
III. The one who likes Black sits immediate le...
Who sits in front of K6?