In a database, a foreign key is ?
A. A data element/attribute within a data field of a data record that is not unique, and cannot be used to distinguish one data record in a database from another data record within a database table
B. A data element/attribute within a data field of a data record within a database table that is a secondary key in another database table
C. A data element/attribute within a data field of a data record within a database table that is a primary key in another database table
D. A data element/attribute within a data field of a data record that enables a database to uniquely distinguish one data record in a database from another data record within a database table
Answer:A
In a database, a foreign key is ?
A. A data element/attribute within a data field of a data record that is not unique, and cannot be used to distinguish one data record in a database from another data record within a database table B. A data element/attribute within a data field of a data record within a database table that is a secondary key in another database table C. A data element/attribute within a data field of a data record within a database table that is a primary key in another database table D. A data element/attribute within a data field of a data record that enables a database to uniquely distinguish one data record in a database from another data record within a database table
Explanation: A FOREIGN KEY constraint can reference columns in tables in the same database or within the same table. These are called self-referencing tables. For example, consider an employee table that contains three columns: employee_number, employee_name, and manager_employee_number. Because the manager is also an employee, there is a foreign key relationship from the manager_employee_number column to the employee_number column.