Define Primary key and Foreign key.
In : BSc IT Subject : Database Management SystemPrimary Key is a column (or a combination of columns) that uniquely identifies each row in a table. It must have unique values and cannot contain nulls. For example, in a Students table, the StudentID can be the primary key because it is different for each student.
A Foreign Key , on the other hand, is a column in one table that refers to the Primary Key in another table. It is used to link or relate two tables together and ensure referential integrity . For example, in an Orders table, the StudentID can be a foreign key that connects each order to the student who placed it.