1.

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 tableThe question was posed to me at a job interview.I'm obligated to ask this question of Foreign, Candidate, Primary, Composite, Unique Keys topic in chapter Planning Oracle Applications of Oracle

Answer»

The correct choice is (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

The BEST I can explain: 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.



Discussion

No Comment Found

Related InterviewSolutions