Social Sciences, asked by nishantrajaug9054, 1 year ago

Define foreign key and primary key in mis

Answers

Answered by Undo
5
Foreign Key: The relationship between two tables is established with the help of foreign key. A foreign key is a non-key attribute whose value is derived from the primary key of the another table.
Primary Key: Each relation has atleast one column for which each row must have a unique value. Such attribute is called primary key. Only one primary key can be defined for each table.
Answered by sunakat483
1

Answer:

  1. Primary Key:

A primary key is used to ensure data in the specific column is unique. It is a column cannot have NULL values. It is either an existing table column or a column that is specifically generated by the database according to a defined sequence.

2. Foreign Key:

A foreign key is a column or group of columns in a relational database table that provides a link between data in two tables. It is a column (or columns) that references a column (most often the primary key) of another table.

Similar questions