In DB2, what does the FOREIGN KEY constraint enforce?
- Determines the primary key of a table
- Enforces referential integrity
- Ensures uniqueness of values
- Restricts the values allowed in a column
The FOREIGN KEY constraint in DB2 enforces referential integrity, ensuring that values in a column (or columns) of one table match values in another table's primary key or unique key. This maintains consistency and relationships between related tables.
Loading...
Related Quiz
- The configuration file containing database connection details in DB2 is called ________.
- Which component of a stored procedure allows it to accept input parameters?
- The AVG() function in DB2 calculates the ________ of the values in a numeric column.
- The EXISTS keyword in DB2 is commonly used in conjunction with ________ to test for the existence of rows in a subquery result.
- Scenario: A DBA notices that a query is running slowly in DB2. Upon investigation, it is found that the table being queried does not have any indexes. What recommendation would you provide to optimize the query performance?