Primary Key in DBMS

Primary Key in DBMS

The primary key of a relational table uniquely identifies each record of the table.

There are two types of primary key.

  1. simple primary key
  2. composite primary key

1.Simple primary key:-

Simple primary key consists of only one field.

2. composite primary key

A composite primary key is made up of more than one field.

Defining the primary key: –

  1. Primary key is unique.
  2. There can be only one primary key in any table.
  3. It can be single or multi column, we call multi column primary key as composite primary key.
  4. Composite primary key can have maximum 16 columns.
  5. It does not contain null values.

Also Read—

What is Entity set in DBMS?

Entity Types in DBMS

Types of Attributes DBMS

Hierarchical Data Model | Advantages | Disadvantages

Hierarchical Data Model | Advantages | Disadvantages

Leave a Reply

Your email address will not be published. Required fields are marked *