ЁЯУв Too many exams? DonтАЩt know which one suits you best? Book Your Free Expert ЁЯСЙ call Now!

  • google app store apple app store
  • тЬЦ

      Question

      In database management, what is a 'foreign

      key'?
      A A key used to encrypt sensitive database fields so as to prevent unauthorized data access Correct Answer Incorrect Answer
      B A key that uniquely identifies each row in the same table Correct Answer Incorrect Answer
      C A key that can accept NULL and duplicate values within its own table only Correct Answer Incorrect Answer
      D A key used exclusively for indexing purposes to speed up queries Correct Answer Incorrect Answer
      E A column (or set of columns) in one table that references the primary key of another table Correct Answer Incorrect Answer

      Solution

      A foreign key establishes a parent-child relationship between tables. For example, in a bank database, the Accounts table may have a CustomerID foreign key referencing the Customers table's primary key. This enforces referential integrity тАФ you cannot add an account for a non-existent customer, nor delete a customer who has accounts. Violations are prevented by ON DELETE/UPDATE CASCADE or RESTRICT constraints.

      Practice Next
      More IT DBMS Questions

      Relevant for Exams:

      ask-question