Explain the difference between a primary key and a foreign key.

What will be an ideal response?


The primary key may consist of one or more fields whose values are used to uniquely identify each record in a table.

If the same field used as the primary key in one table is also used as a field in another table, and that field is used to create a relationship between the two tables, that field is called a foreign key in the second table.  The foreign key is not used to uniquely identify records in the second table.

Computer Science & Information Technology

You might also like to view...

A heap is a complete binary tree. What is required for the tree to be complete?

What will be an ideal response?

Computer Science & Information Technology

What does the /etc/fstab file do?

What will be an ideal response?

Computer Science & Information Technology

________ helps you free up space on your storage devices

Fill in the blank(s) with correct word

Computer Science & Information Technology

What restrictions are necessary to ensure that a view is updatable?

What will be an ideal response?

Computer Science & Information Technology