CBSE Class 12 Computer Science Chapter 11: Database Concepts NCERT Solutions
This chapter delves into the fundamental concepts of database management, specifically focusing on the relational data model. Students will learn to define and understand what a relation (table) is, including its properties like atomic values and unique rows. The solutions explain the concepts of primary keys, candidate keys, and how they uniquely identify records within a table. Furthermore, the distinction between cardinality (number of rows) and degree (number of columns) is clarified with practical examples. These NCERT Solutions provide step-by-step explanations and illustrative examples to help students grasp these core database principles, essential for their upcoming examinations. They serve as a valuable resource for revision and understanding complex database terminology.
Quick info
| Board | CBSE |
|---|---|
| Class | Class 12 |
| Subject | Computer Science (C++) |
| Session | 2026 |
| Language | English |
| Type | NCERT Solutions |
| Chapter | Chapter 11 |
Chapter summary
Chapter 11, Database Concepts, introduces students to the relational data model. The NCERT Solutions cover key definitions such as 'relation' (table), explaining its structure and properties. It elaborates on identifying unique records using primary and candidate keys, differentiating between them with examples. The chapter also clarifies the concepts of cardinality (number of rows) and degree (number of columns) in a table, providing practical illustrations. These solutions are designed to build a strong foundation in basic database terminology and concepts.
Learning outcomes
- Understand the definition and structure of a relation in the relational data model.
- Identify and differentiate between primary keys and candidate keys.
- Define and differentiate between the cardinality and degree of a table.
- Apply the concepts of keys to identify unique records in a given table.
- Illustrate database concepts using suitable examples.
Topics covered
Paper topics
- Relation
- Relational Data Model
- Atomic Values
- Unique Rows
- Unordered Rows and Columns
- Candidate Keys
- Primary Key
- Cardinality
- Degree
- Table Example
- Data Identification
- Database Concepts
Important topics
- Relation definition
- Primary Key
- Candidate Keys
- Cardinality
- Degree
PDF preview
Read page by page below. PDF is streamed from the official NCERT website — no download button on this page.
Questions and Solutions
Question 1
Question 2
Question 3
In this table, the 'Item Code' column uniquely identifies each item. The 'Item Name' column also appears to uniquely identify each item in this specific sample data. Therefore:
Candidate Keys: Attributes or sets of attributes that can uniquely identify a tuple (row) in a relation. In this example, both 'Item Code' and 'Item Name' can serve as candidate keys because each value in these columns is unique and can identify a specific stock item.
Primary Key: One of the candidate keys is selected as the primary key. The primary key is used to uniquely identify each record in the table. In this case, 'Item Code' is typically chosen as the primary key because it's usually a numerical identifier, which is often more efficient and less prone to changes than a descriptive name.
Thus, 'Item Code' is the primary key, and both 'Item Code' and 'Item Name' are candidate keys.
Question 4
- Cardinality: This refers to the number of rows (or tuples) present in a table. It indicates how many records are stored in the table.
- Degree: This refers to the number of columns (or attributes) present in a table. It indicates how many different pieces of information are stored for each record.
Table: Account
The table contains the following columns: 'Acno' and 'Cname'.
The rows shown are: (Ac 100, Sheela), (Ac 101, Darsh), (Ac 102, Kathy).
Based on this example:
Cardinality of Account table: There are 3 rows, so the cardinality is 3.
Degree of Account table: There are 2 columns ('Acno', 'Cname'), so the degree is 2.
Question 5
Table Data:
Id | Product | Price | Qty | Transaction Date
101 | Plastic Folder | 12" | 3400 | 100 | 2014-12-14
104 | Pen Stand Standard | 4500 | 200 | 2015-01-31
105 | Stapler Medium | 1200 | 250 | 2015-02-28
109 | Punching Machine Big | 1400 | 200 | 2015-03-12
103 | Stapler Mini | 1500 | 100 | 2015-02-02
- (i) Candidate Keys: A candidate key is an attribute or a set of attributes that can uniquely identify a row. Let's examine the columns:
- 'Id': Each value in the 'Id' column (101, 104, 105, 109, 103) is unique and can identify a specific transaction record.
- 'Product': The 'Product' column contains values like 'Plastic Folder', 'Pen Stand Standard', 'Stapler Medium', 'Punching Machine Big', 'Stapler Mini'. In this specific data, each product name is unique. If it's guaranteed that each product name will always be unique for each transaction, then 'Product' could also be a candidate key. However, 'Id' is generally a more reliable unique identifier.
- Other columns like 'Price', 'Qty', 'Transaction Date' do not uniquely identify rows on their own (e.g., 'Qty' has duplicate values '200' and '100').
- (ii) Primary Key: The primary key is one of the candidate keys selected to be the main unique identifier for the table. Typically, a simple, non-null, and stable attribute is chosen. In this table, 'Id' is the most suitable choice for the primary key as it is a numerical identifier that is guaranteed to be unique for each transaction record.
Common mistakes
- Confusing candidate keys with primary keys.
- Incorrectly identifying the number of rows (cardinality) or columns (degree).
- Not understanding the requirement for unique identification of records.
- Misinterpreting the atomic value constraint in a relation.
Revision tips
- Focus on understanding the definitions of relation, cardinality, and degree.
- Practice identifying primary and candidate keys in various table examples.
- Review the provided examples to solidify your understanding of key concepts.
- Attempt to create your own simple tables and identify their keys, cardinality, and degree.
Practice MCQs
Q1. In the relational data model, what is a table commonly referred to as?
Explanation: A relation is the term used in the relational data model to describe a table, which consists of rows and columns.
Q2. Which of the following best describes the 'degree' of a table?
Explanation: The degree of a table is defined as the total count of columns present in that table.
Q3. What is the primary purpose of a primary key in a table?
Explanation: A primary key is an attribute or a set of attributes that uniquely identifies each record (row) within a table, ensuring data integrity.
Q4. If a table has 5 rows and 3 columns, what are its cardinality and degree?
Explanation: Cardinality refers to the number of rows (5 in this case), and degree refers to the number of columns (3 in this case).
Q5. Which of the following is a characteristic of a relation (table) in the relational model?
Explanation: A fundamental property of a relation is that each value in a cell must be atomic, meaning it cannot be further divided.
Frequently asked questions
What is a relation in the context of database concepts?
In the relational data model, a relation is essentially a table. It is defined as a table that contains atomic values, has unique rows, and its rows and columns are unordered.
What is the difference between cardinality and degree of a table?
Cardinality refers to the number of rows (tuples) in a table, while the degree refers to the number of columns (attributes) in the table.
How are primary keys and candidate keys related?
A table can have multiple candidate keys, which are attributes or sets of attributes that can uniquely identify a row. Out of these candidate keys, one is chosen to be the primary key.
Why is it important to have unique keys like primary keys in a database table?
Unique keys ensure that each record in the table can be distinctly identified, preventing data redundancy and allowing for accurate data retrieval and manipulation.
Are the rows and columns in a relation ordered?
According to the relational data model, the rows (tuples) and columns (attributes) of a relation are considered unordered.
What does it mean for values in a relation to be atomic?
Atomic values mean that each cell in the table contains a single, indivisible piece of data. For example, a column for 'Name' should not store 'First Name, Last Name' in a single cell.
Content reviewed by the NCERT Help team. Editorial Team and update policy
NCERT Solutions PDF PDF on NCERT Help. URL unchanged for search indexing.