Informatics Practices

Relational Data Model | Domain, Tuple, Relation, Candidate Key, Primary Key and Alternate Key | Complete Notes | CBSE Class 11 Informatics Practices (2026–27)

Class 11 · Informatics Practices

Relational Data Model | Domain, Tuple, Relation, Candidate Key, Primary Key and Alternate Key

Most modern Database Management Systems (DBMS) such as MySQL, Oracle, PostgreSQL, and Microsoft SQL Server use the Relational Data Model to organize and manage data. In this model, data is stored in the form of tables consisting of rows and columns. Understanding the relational data model is essential before learning SQL because SQL commands are used to create and manipulate these tables.

Each table represents a particular entity, such as students, employees, products, or customers. Every row stores information about one record, while each column represents a specific attribute of that record.


Learning Outcomes

After studying this chapter, you will be able to:

  • Understand the Relational Data Model.
  • Differentiate between attributes, tuples, and relations.
  • Understand the concept of domains.
  • Identify candidate keys, primary keys, and alternate keys.
  • Understand the importance of keys in a database.

What is the Relational Data Model?

Definition

The Relational Data Model is a database model in which data is stored in the form of tables (relations). Each table consists of rows and columns, and relationships among data are established using keys.


Example of a Relation (Student Table)

Roll_No Name Class Marks
101 Aarav XI 92
102 Diya XI 88
103 Kabir XI 95

This table is called a relation. It stores related information about students in a structured format.


Basic Terminology of the Relational Data Model

Database Term Meaning
Relation A table.
Tuple A row in the table.
Attribute A column in the table.
Domain Set of valid values for an attribute.

Attribute

Definition

An attribute is a column of a table. It describes a particular property or characteristic of an entity.

Example

Roll_No Name Class Marks

In the above table, Roll_No, Name, Class, and Marks are attributes.


Tuple

Definition

A tuple is a single row of a table. Each tuple represents one complete record.

Example

Roll_No Name Class Marks
101 Aarav XI 92

The highlighted row represents one tuple.


Relation

Definition

A relation is a complete table consisting of rows (tuples) and columns (attributes).

Example

The entire Student table shown above is a relation.


Domain

Definition

A domain is the set of all permissible or valid values that can be assigned to an attribute.

Examples

Attribute Possible Domain
Roll_No Positive integers
Name Alphabetic characters
Class XI, XII
Marks 0–100

The DBMS uses domains to ensure that only valid values are stored in the database.


Why are Domains Important?

  • Prevent invalid data entry.
  • Maintain data accuracy.
  • Improve data consistency.
  • Ensure data integrity.
  • Reduce errors in the database.

Example of Valid and Invalid Domain Values

Attribute Valid Value Invalid Value
Marks 85 145
Class XI XV
Roll_No 105 -12
Name Riya 1234

Real-Life Example

Consider the database of a school. Every student has a unique roll number, a name, a class, and marks. These details are stored as follows:

Roll_No Name Class Marks
101 Riya XI 94
102 Arjun XI 88
103 Meera XII 91

In this table:

  • The entire table is a Relation.
  • Each row is a Tuple.
  • Each column is an Attribute.
  • The valid values for each column form its Domain.


What is a Key?

Definition

A key is one or more attributes (columns) used to uniquely identify a record (tuple) in a relation (table). Keys help maintain data accuracy, avoid duplicate records, and establish relationships between tables.


Why are Keys Required?

Without keys, it becomes difficult to identify a specific record in a table. Keys ensure that every record can be uniquely identified and retrieved.

Advantages of Keys

  • Uniquely identify each record.
  • Prevent duplicate records.
  • Maintain data integrity.
  • Establish relationships between tables.
  • Improve data retrieval.

Candidate Key

Definition

A Candidate Key is an attribute or a combination of attributes that can uniquely identify every record in a table. A table may have more than one candidate key.

Example

Roll_No Admission_No Name Class
101 A501 Riya XI
102 A502 Arjun XI
103 A503 Meera XII

In this table, both Roll_No and Admission_No uniquely identify each student. Therefore, both are Candidate Keys.


Primary Key

Definition

A Primary Key is the candidate key selected to uniquely identify each record in a table.

Characteristics of a Primary Key

  • Must contain unique values.
  • Cannot contain NULL values.
  • There can be only one primary key in a table.
  • It uniquely identifies every record.

Example

Roll_No (Primary Key) Admission_No Name
101 A501 Riya
102 A502 Arjun
103 A503 Meera

Here, Roll_No has been selected as the Primary Key.


Alternate Key

Definition

An Alternate Key is a candidate key that is not selected as the primary key.

Example

Roll_No Admission_No Name
101 A501 Riya
102 A502 Arjun
103 A503 Meera

If Roll_No is chosen as the Primary Key, then Admission_No becomes the Alternate Key.


Relationship Between Candidate Key, Primary Key and Alternate Key

Key Type Description
Candidate Key Any attribute that can uniquely identify a record.
Primary Key The selected candidate key used to identify records.
Alternate Key The remaining candidate key(s) not selected as the primary key.

Comparison of Different Keys

Feature Candidate Key Primary Key Alternate Key
Unique Values Yes Yes Yes
Can be Multiple Yes No Yes
NULL Allowed No No No
Selected for Identification Possible Yes No

Solved Example 1

Study the following table.

Roll_No Admission_No Name
101 A501 Riya
102 A502 Arjun
103 A503 Meera

Answer the following:

  • Candidate Keys → Roll_No, Admission_No
  • Primary Key → Roll_No (assumed)
  • Alternate Key → Admission_No

Solved Example 2

A school assigns every student a unique Admission Number and a unique Roll Number.

Question: How many Candidate Keys are available?

Answer: Two Candidate Keys (Admission Number and Roll Number).


Common Errors

Mistake Correct Understanding
Considering every column as a key. Only columns that uniquely identify records can be keys.
Confusing Candidate Key with Primary Key. A Primary Key is selected from Candidate Keys.
Allowing duplicate values in a Primary Key. Primary Key values must always be unique.
Allowing NULL values in a Primary Key. Primary Keys cannot contain NULL values.
Assuming a table can have multiple Primary Keys. A table can have only one Primary Key.

Interview Corner

Q. Can a table have more than one Candidate Key but only one Primary Key?

Answer: Yes. A table may contain multiple Candidate Keys, but only one of them is selected as the Primary Key. The remaining Candidate Keys become Alternate Keys.



Real-Life Applications of Keys in Databases

Application Primary Key Used
School Management System Roll Number or Admission Number
Hospital Management System Patient ID
Banking System Account Number
Library Management System Book ID
Railway Reservation System PNR Number
E-commerce Website Order ID
Passport Database Passport Number

Solved Example 3

Study the following Employee table.

Emp_ID Email Name Department
E101 riya@gmail.com Riya HR
E102 arjun@gmail.com Arjun IT
E103 meera@gmail.com Meera Finance

Answer:

  • Candidate Keys → Emp_ID, Email
  • Primary Key → Emp_ID (assumed)
  • Alternate Key → Email

Solved Example 4

Identify the Following.

Database Term Example
Relation Student Table
Tuple A single student record
Attribute Name
Domain Marks between 0 and 100
Primary Key Roll Number

Solved Example 5

Question:

A student table contains the following attributes:

  • Admission_No
  • Name
  • Class
  • Section

Which attribute is most suitable as the Primary Key?

Answer:

Admission_No, because it uniquely identifies every student.


Competency-Based Questions

  1. A school stores details of students using Roll Number, Admission Number, Name, and Class. Identify all the candidate keys and justify your answer.
  2. Why should a primary key never contain duplicate or NULL values?
  3. A hospital stores Patient ID, Aadhaar Number, Name, and Age. Which attributes can act as candidate keys? Which one would you choose as the primary key? Give reasons.
  4. A company stores Employee ID, Email ID, Name, and Department. Explain the relationship between the candidate key, primary key, and alternate key.
  5. Differentiate between a tuple and a relation with suitable examples.

Multiple Choice Questions

  1. The Relational Data Model stores data in the form of:
    • (a) Files
    • (b) Tables
    • (c) Folders
    • (d) Programs
  2. A row in a relation is called a:
    • (a) Attribute
    • (b) Tuple
    • (c) Domain
    • (d) Key
  3. A column in a table is known as:
    • (a) Record
    • (b) Attribute
    • (c) Tuple
    • (d) Relation
  4. The set of valid values for an attribute is called:
    • (a) Relation
    • (b) Tuple
    • (c) Domain
    • (d) Candidate Key
  5. A Primary Key:
    • (a) May contain duplicate values
    • (b) May contain NULL values
    • (c) Uniquely identifies each record
    • (d) Can have multiple values for the same record
  6. Which key is selected from the candidate keys?
    • (a) Foreign Key
    • (b) Primary Key
    • (c) Alternate Key
    • (d) Composite Key
  7. An Alternate Key is:
    • (a) A duplicate key
    • (b) A candidate key not selected as the primary key
    • (c) A foreign key
    • (d) A NULL key
  8. How many Primary Keys can a table have?
    • (a) Zero
    • (b) Two
    • (c) Many
    • (d) One
  9. Which of the following is an example of a Primary Key in a banking database?
    • (a) Customer Name
    • (b) Account Number
    • (c) Address
    • (d) City
  10. Which database term refers to the complete table?
    • (a) Tuple
    • (b) Attribute
    • (c) Relation
    • (d) Domain

Quick Revision

Concept Remember
Relation A complete table.
Tuple A row in a table.
Attribute A column in a table.
Domain The set of valid values for an attribute.
Candidate Key Can uniquely identify a record.
Primary Key The selected candidate key.
Alternate Key The candidate key not chosen as the primary key.

Important Points to Remember

  • The Relational Data Model stores data in the form of tables.
  • A relation is a table, a tuple is a row, and an attribute is a column.
  • A domain specifies the valid values that an attribute can store.
  • A candidate key uniquely identifies every record in a table.
  • A primary key is selected from the available candidate keys.
  • Only one primary key can exist in a table.
  • A primary key cannot contain duplicate or NULL values.
  • Candidate keys that are not selected become alternate keys.
  • Keys help maintain data integrity and support efficient data retrieval.

CBSE Exam Tips

  • Clearly understand the difference between relation, tuple, attribute, and domain.
  • Practice identifying candidate keys, primary keys, and alternate keys from different tables.
  • Remember that a table can have multiple candidate keys but only one primary key.
  • Do not confuse a tuple (row) with an attribute (column).
  • Expect competency-based questions where you need to justify the choice of a primary key.

Summary

The Relational Data Model organizes data into tables called relations, where each row is a tuple and each column is an attribute. Every attribute has a domain that defines its valid values. To uniquely identify records, databases use candidate keys, from which one is selected as the primary key. The remaining candidate keys become alternate keys. These concepts form the foundation of relational databases and are essential for understanding SQL and designing efficient database systems.