Basic concepts and terminologies of databases

What is a primary key? Describe with an example.

An attribute or combination of attributes that uniquely identifies a row or record in a relation is known as primary key. Some most important points about a primary key are, a relation can have only one primary key, Each value in primary key attribute must be unique, primary key cannot contain null values. Suppose a relation student contains different attributes such as RegNo, Name and Class. RegNo is selected as primary key because it uniquely identifies each student.