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.
A laptop costs 20 times the cost of a headphone. On the laptop there is a profit of 10% while the total profit on selling the headphone and the laptop i...
The difference between the selling price on a discount of 32% and two successive discounts of 20% each on a certain bill is ₹25. Find the actual amoun...
A store owner sells two products, E and F. She makes a 10% profit on product E costing Rs. 1000. If the combined profit percentage for the two products ...
Ravi purchased 6 notebooks, 18 markers, and 12 highlighters for Rs. 240, Rs. 1080, and Rs. 360, respectively, from a seller. By selling each notebook an...
A shopkeeper marked his article 75% above the cost price and sold it after giving a single discount of 12%. If the shopkeeper earned a profit of Rs. 540...
Article ‘P’, if sold at a profit of 10% earns a profit of Rs. 600. If article ‘P’ is marked 40% above its cost price and then sold after offerin...
A shopkeeper sold a school bag at a profit of 65%. Had he sold the school bag at 35% profit he would have earned Rs.183 less. Find the cost price of the...
A man purchased 'n' apples and sold them at Rs. 'n' per apple. If the selling price per apple had been reduced by 20%, the total profit he would have ea...
The profit earned when an article is sold for Rs. 2,200 is the same as the loss incurred on selling it for Rs. 1,400. Find the selling price of the arti...
Profit percentage earned on selling article 'I' is the same as the percentage loss incurred on selling article 'J'. If the cost price of article 'I' is ...