What is a foreign key constraint used for in a database table?
- Defines a link between a column in one table and a column in another table
- Enforces uniqueness in a column
- Ensures data in a column is not NULL
- Sets a default value for a column
A foreign key constraint in a database table is used to define a link between a column in one table and a column in another table. This establishes referential integrity, preventing inconsistent data by ensuring that values in the foreign key column match those in the referenced primary key column.
Loading...
Related Quiz
- _______ consistency model ensures that all nodes in a distributed system see the same version of data at the same time.
- What strategies can be employed to optimize indexing for large-scale databases?
- _______ is a common clustering technique that involves grouping data points based on their similarity.
- In database partitioning, what does range partitioning involve?
- _______ is a technique used to minimize index size and optimize query performance by grouping similar index values together.