Question · SQL and MySQL course · Module 11: Capstone project

The role of a foreign key

What is the purpose of a foreign key (FOREIGN KEY) in the recenzje table?

Answer options

  • It links a review row to a specific book and ensures the review points to an existing book
  • It encrypts the review text
  • It sorts the reviews alphabetically
  • It automatically translates the review into another language

You can check the correct answer by solving this task in the CodeWorlds game.