When you stipulate a primary key constraint for a table, the Database Engine imposes data exclusivity by inevitably creating a exclusive index for the primary key columns. This index also licenses fast access to data when the primary key is used in queries. A foreign key (FK) is a column or grouping of columns that is used to create and impose a link between the data in two tables to regulate the data that can be stored in the foreign key table. In a foreign key reference, a link is created between two tables when the column or columns that hold the primary key value for one table are referenced by the column or columns in another table. This column becomes a foreign key in the second table. Entity integrity and referential integrity are two forms of data integrity that are particularly important in relational databases. Relational databases break the storage of data down into elements that usually have to be joined back together again in order to produce meaningful results. Without guarantees of these two types of integrity, data would get dropped or duplicated.
Get Answers For Free
Most questions answered within 1 hours.