Foreign Key :-
-
Foreign key is a column or group of columns in a relational database table that provides an association between data in two tables.
-
Foreign key accepts NULL value.
-
Table can have multiple foreign keys.
-
Tuples can have a duplicate value for a foreign key attribute.
Primary Key :-
-
Primary key is a special relational database table column or a combination of multiple columns that allows to uniquely identify all table records.
-
Primary key value cannot be NULL and its a Unique.
-
Table can have only one primary key.
-
Two tuples in a relation cannot have duplicate values for a primary key attribute.