In: Computer Science
5.8. Discuss the entity integrity and referential integrity
constraints. Why is each
considered important?
5.9. Define foreign key. What is this concept used for?
5.10. What is a transaction? How does it differ from an Update
operation?
5.8) Entity Integrity is a constraint which states that primary key cannot be NULL. A table can contain a NULL value, other than the primary key.
Referential Integrity is actually a relational data base conceptual constraint which is specified between two tables. In this type of constraint, if a foreign key in table 1 is referring to the primary key of table 2, then each and every value of the foreign key in table 1, must be available in table 2 also.
Entity integrity and referential integrity are important as they are two forms of data integrity in relational databases
5.9) Foreign Key is basically a key which is a primary key in one table and that key is also available in other table, but that is not a primary key in that table. Thereby, then this key(foreign key) can be used to join these tables. Foreign Key can also join or connect multiple keys.
The concept for foreign key is to join or connect multiple tables.
5.10) Transaction is basically a collection of logically related operations which contains a group of task that performs series of action in a database.
Transaction contains a group of various operations which contains update operation.