Chapter 6: Database Concepts Class 12 Computer Science NCERT Solutions
Chapter Overview – Database Concepts
Chapter 6 introduces students to the foundational concepts of databases and how data is organized, stored, and retrieved using Database Management Systems (DBMS). It explains the structure of a relational database and key terminologies like tables, records, fields, and keys. The chapter also provides an introduction to SQL (Structured Query Language), which is used to manage and manipulate data in relational databases. Through this chapter, students gain essential skills for working with real-world data systems and applications.
What You Will Learn in Chapter 6
This chapter helps students understand how databases work behind the scenes, including their structure and purpose. It lays the foundation for working with relational databases such as MySQL or SQLite, preparing students for data-centric programming and real-world applications.
Key Topics Covered
What is a Database?
- A database is an organized collection of related data that can be easily accessed, managed, and updated.
- DBMS (Database Management System) is software that handles the storage, retrieval, and updating of data in a database.
Data Organization
- Field: A single piece of information; also called a column.
- Record: A collection of fields; also called a row.
- Table: A collection of records arranged in rows and columns.
Keys in a Database
- Primary Key: A unique identifier for each record in a table.
- Foreign Key: A field in one table that refers to the primary key in another table.
- Candidate Key, Alternate Key: Other important types of keys in relational databases.
Relational Data Model
- Data is stored in multiple tables that are related to each other using keys.
- Ensures data integrity and eliminates redundancy using normalization techniques.
Introduction to SQL (Structured Query Language)
- SQL is used to create, modify, and query databases.
- Two major categories of SQL commands:
- DDL (Data Definition Language): CREATE, DROP, ALTER
- DML (Data Manipulation Language): SELECT, INSERT, UPDATE, DELETE
Download Chapter 6 Solutions PDF – Database Concepts
Our downloadable PDF includes:
- NCERT textbook questions and answers
- Topic-wise concept explanations with examples
- SQL command syntax with practice queries
- Visual charts showing table structures
- Quick revision notes and exam pointers
Highlights of Our NCERT Solutions
- Simple definitions with diagrams
- Clear explanation of data models and relational database structure
- Step-by-step SQL command usage
- Tabular summaries for quick review
- Board exam-oriented answers and examples
Recommended Preparation Tips
- Learn key definitions like DBMS, RDBMS, primary key, and foreign key.
- Practice writing basic SQL queries to create and manipulate tables.
- Understand table relationships using ER diagrams.
- Memorize differences between DDL and DML commands with examples.
- Revise types of keys and their importance in relational databases.
Additional Study Resources
- Flashcards: SQL syntax and command types
- Visual guide to table design and normalization
- Sample database structures and sample queries
- CBSE sample papers and PYQs on database topics
Mastering Chapter 6 – Database Concepts
Understanding how databases function is essential for modern programming and software development. This chapter provides a strong base for advanced database concepts, web development, and backend programming.
A clear grasp of relational database principles and SQL syntax is not only important for scoring well in Class 12 CBSE Computer Science but also forms a core skill for careers in data science, software development, and information systems.
Class 12 Computer Science (Python) – Chapter 6 Database Concepts
NCERT Textbook Questions Solved – Class 12 Computer Science (Python)
Question 1: Observe the following PARTICIPANTS and EVENTS table carefully and write the name of the RDBMS operation which will be used to produce the output as shown in RESULT. Also, find the Degree and Cardinality of the RESULT.
RDBMS Operation: Cartesian Product
Degree: 4
Cardinality: 6
Question 2: Define degree and cardinality. Also, based on the given table, write its degree and cardinality.
Degree: The number of columns (attributes) in a table.
Cardinality: The number of rows (records) in a table.
Example Table:
ID | Name | Age | Disease |
---|---|---|---|
1 | Ravi | 22 | Cold |
2 | Simran | 24 | Flu |
3 | Amit | 23 | Allergy |
4 | Neha | 20 | Fever |
5 | Ritu | 21 | Flu |
Degree: 4
Cardinality: 5
Question 3: Can we have Qty as a primary key? What is the degree and cardinality of the table?
No, Qty cannot be used as a primary key because it contains duplicate values.
Item Code | Item Name | Qty | Price |
---|---|---|---|
101 | Pencil | 100 | 5 |
102 | Eraser | 50 | 3 |
103 | Sharpener | 75 | 7 |
104 | Pen | 100 | 10 |
105 | Notebook | 200 | 50 |
Degree: 4
Cardinality: 5
Question 4: Explain the concept of union between two tables with an example.
Union: Combines tuples from both tables, eliminating duplicates.
ID |
---|
1 |
2 |
ID |
---|
2 |
3 |
ID |
---|
1 |
2 |
3 |
Question 5: Observe the STUDENTS and EVENTS tables carefully and write the RDBMS operation used to produce the LIST table. Also, find its degree and cardinality.
RDBMS Operation: Cartesian Product
Degree: 4
Cardinality: 6
Question 6: Observe the MEMBER and ACTIVITY tables and identify the operation used to produce the REPORT. Also, mention the degree and cardinality.
RDBMS Operation: Join
Degree: 3
Cardinality: 6
Question 7: Cardinality and degree after changes in CLUB table.
Initial Degree: 5
Initial Cardinality: 4
After Adding Column + 3 Members:
Degree: 6
Cardinality: 7
Question 8: What do you understand by Union and Cartesian Product in relational algebra?
Union: Combines all records from both relations, removing duplicates.
Cartesian Product: Combines each row of one relation with all rows of another, forming all possible pairs.
Question 9: Difference between Primary Key and Alternate Key with example.
Aadhaar Number | Bank Account No |
---|---|
1234-5678-9012 | 4561237890 |
If Aadhaar Number is chosen as the Primary Key, Bank Account No becomes an Alternate Key.
Question 10: What is a Candidate Key? Give an example.
A Candidate Key is an attribute (or set) that can uniquely identify a row.
Example: AdmnNo and RollNo both can uniquely identify students in a STUDENT table.
Question 13: Example of Primary and Candidate Keys
Id | Product | Qty | Price |
---|---|---|---|
1 | Pencil | 100 | 5 |
2 | Eraser | 50 | 3 |
3 | Sharpener | 75 | 7 |
Candidate Keys: Id, Qty
Primary Key: Id
Question 14: Define Selection and Projection in Relational Algebra.
Selection (σ): Retrieves rows based on a condition (e.g., σ(Marks > 75)(STUDENTS))
Projection (π): Retrieves specified columns (e.g., π(Name, Age)(STUDENTS))
Question 17: Define Domain in a Database with example.
A domain is a set of valid values for a column.
Example: Domain of column Gender = {Male, Female}
Question 19: Candidate Keys example.
Student_ID | Aadhaar_No | Email_ID |
---|---|---|
101 | 1234-5678-9012 | abc@example.com |
Candidate Keys: Student_ID, Aadhaar_No, Email_ID
Primary Key: Aadhaar_No
Question 24: Union of Student 1 and Student 2
Student 1:
RollNo | Name | Class |
---|---|---|
101 | Rahul | 12A |
102 | Simran | 12A |
103 | Aman | 12B |
Student 2:
RollNo | Name | Class |
---|---|---|
103 | Aman | 12B |
104 | Pooja | 12C |
105 | Ravi | 12A |
Union Result:
RollNo | Name | Class |
---|---|---|
101 | Rahul | 12A |
102 | Simran | 12A |
103 | Aman | 12B |
104 | Pooja | 12C |
105 | Ravi | 12A |