Courses
Courses for Kids
Free study material
Offline Centres
More
Store Icon
Store

Important Questions and Answers for Class 12 Computer Science Chapter 8 Database Concepts | 2026-27

ffImage
banner

Class 12 Computer Science Chapter 8 Database Concepts – Important Questions and Answers for Exam Preparation

Database Concepts is an important chapter in Class 12 Computer Science that introduces students to how data is stored, organised and managed using a Database Management System (DBMS). It explains the limitations of traditional file systems and covers essential concepts such as relational data models, database schemas, attributes, tuples, data constraints and different types of keys. Understanding these topics helps students solve questions involving database structure, relationships between tables and data management.


To make exam preparation more effective, Vedantu provides Class 12 Computer Science Chapter 8 Important Questions and Answers covering MCQs, very short, short and long answer questions with clear explanations. Students can practise NCERT-based questions on primary keys, foreign keys, relational tables and database constraints. For more chapter-wise practice, explore Class 12 Computer Science Important Questions and Answers and Class 12 Important Questions to strengthen overall exam preparation.

Explore Class 12 Computer Science Chapter 8 Important Questions with Answers – PDF Download

The Class 12 Computer Science Chapter 8 Important Questions PDF covers major concepts from Database Concepts, including data redundancy, database schemas, relational models, keys and constraints. 


Class 12 Computer Science Chapter 8 Multiple Choice Questions

Q1. Which of the following is a limitation of the file system?

(a) Data redundancy 

(b) Data consistency 

(c) Easy data sharing 

(d) Automatic data linking

Answer: (a) Data redundancy


Explanation: Data redundancy occurs when the same information is stored in different files. It increases storage requirements and can cause data inconsistency.


Q2. Which software is used to create, store, modify and retrieve data from a database?

(a) File System 

(b) Database Management System 

(c) Text Editor 

(d) Operating System

Answer: (b) Database Management System


Explanation: A Database Management System (DBMS) allows users to create and manage databases. MySQL, Oracle, PostgreSQL and Microsoft Access are examples of DBMS software.


Q3. What is the number of attributes in a relation called?

(a) Cardinality 

(b) Degree 

(c) Domain 

(d) Tuple

Answer: (b) Degree


Explanation: Degree represents the number of attributes or columns in a relation. The GUARDIAN relation has four attributes, so its degree is 4.


Q4. Which key is selected from candidate keys to uniquely identify records in a relation?

(a) Foreign Key 

(b) Alternate Key 

(c) Primary Key 

(d) Composite Key

Answer: (c) Primary Key


Explanation: A primary key is chosen from the available candidate keys to identify each tuple uniquely. For example, GUID is selected as the primary key in the GUARDIAN relation.


Q5. Which of the following keys is used to establish a relationship between two tables?

(a) Candidate Key 

(b) Foreign Key 

(c) Alternate Key

(d) Primary Key

Answer: (b) Foreign Key


Explanation: A foreign key refers to the primary key of another relation. For example, GUID in the STUDENT relation refers to GUID in the GUARDIAN relation.


Class 12 Computer Science Chapter 8 Very Short Answer Questions

Q6. What is a file system? Give examples of different types of files.

Answer:

A file system is used to store and organise files on a computer. A file acts as a container for storing data.


Files may contain text, program code, comma-separated values (CSV), pictures, audio, video or web pages.


Q7. What is data redundancy? Explain with an example.

Answer:

Data redundancy refers to the duplication of the same data in different files.


For example, student names are maintained in both the STUDENT and ATTENDANCE files. This repeated storage increases the space required and may lead to data inconsistency.


Q8. What is data inconsistency in a file system?

Answer:

Data inconsistency occurs when the same information stored in different files does not match.


For example, if a student's name is corrected in the STUDENT file but not in the ATTENDANCE file, both files will contain different versions of the student's name.


Q9. What is a Database Management System (DBMS)?

Answer:

A Database Management System (DBMS) is software used to create and manage databases. It allows users to store, retrieve, update, modify and delete data.


Examples include MySQL, Oracle, PostgreSQL, SQL Server and Microsoft Access.


Q10. What is a database schema?

Answer:

A database schema is the design or structure of a database. It specifies the names of tables, their attributes, data types, constraints and relationships.


A schema represents how data are organised in a database and is also called its logical architecture.


Q11. What are data constraints? Give an example.

Answer:

Data constraints are restrictions applied to database columns to maintain the accuracy and reliability of stored data.


For example, the RollNumber attribute in the STUDENT relation can have NOT NULL and UNIQUE constraints because every student must have a unique roll number.


Q12. What is a database instance?

Answer:

A database instance is the state or snapshot of a database at a particular time.


It represents the actual data stored in the database. The instance changes when records are inserted, updated or deleted.


Q13. Define attribute, tuple and domain in a relational database.

Answer:

  • Attribute: A column representing a characteristic of an entity. For example, GName in the GUARDIAN relation.

  • Tuple: A row containing related values in a relation.

  • Domain: The set of possible values that an attribute can take. For example, RollNumber has integer values as its domain.


Q14. What is the difference between degree and cardinality of a relation?

Answer:


Degree

Cardinality

Represents the number of attributes in a relation

Represents the number of tuples in a relation

Counts columns

Counts rows

GUARDIAN has degree 4

GUARDIAN has cardinality 5


The GUARDIAN relation contains four attributes—GUID, GName, GPhone and GAddress and five tuples.


Q15. What is a query? Name the three data manipulation operations.

Answer:

A query is a request made to a database to retrieve information in a desired form.

The three data manipulation operations are:


  • Insertion: Adding new records.

  • Deletion: Removing existing records.

  • Update: Modifying stored information.


For example, changing a guardian's phone number in the GUARDIAN relation is an update operation.


Class 12 Computer Science Chapter 8 Short Answer Questions

Q16. Explain any five limitations of a file system.

Answer:

The main limitations of a file system are:


  1. Difficulty in Access: Retrieving information in a required format may require writing separate application programs.

  2. Data Redundancy: The same data may be stored in multiple files.

  3. Data Inconsistency: Information stored in different files may not match after modifications.

  4. Data Isolation: Related data stored in separate files may be difficult to combine because direct relationships are not maintained.

  5. Data Dependence: Changes in file structure may require changes in the application programs accessing the files.


A file system also makes controlled data sharing difficult because different users may require different access permissions.


Q17. Explain the three important properties of a relation.

Answer:

A relation follows three groups of properties.


1. Properties of Attributes

  • Every attribute must have a unique name.

  • The order of attributes does not matter.


2. Properties of Tuples

  • Each tuple must be distinct.

  • The order of tuples does not matter.


3. Properties of Relation State

  • All values of an attribute must belong to the same domain.

  • Each attribute must contain an atomic value.

  • An attribute cannot contain multiple values in a single tuple.

  • NULL may represent unknown or non-applicable information.


These properties help maintain the correct structure of relations in a relational database.


Q18. Differentiate between candidate key, primary key and alternate key.

Answer:


Candidate Key

Primary Key

Alternate Key

An attribute capable of uniquely identifying tuples

A candidate key selected to identify tuples

A candidate key not selected as the primary key

A relation can have multiple candidate keys

One primary key is selected for a relation

Other candidate keys become alternate keys

Example: GUID and GPhone

Example: GUID

Example: GPhone


In the GUARDIAN relation, GUID and GPhone are presented as candidate keys. When GUID is selected as the primary key, GPhone becomes an alternate key.


Q19. What is a composite primary key? Explain with the ATTENDANCE relation.

Answer:

A composite primary key consists of two or more attributes that together uniquely identify each tuple in a relation.


Consider:

ATTENDANCE(AttendanceDate, RollNumber, AttendanceStatus)


RollNumber alone cannot uniquely identify an attendance record because the same student appears on different dates.


Similarly, AttendanceDate cannot uniquely identify a record because several students have attendance recorded on the same date.


However, the combination of AttendanceDate and RollNumber identifies each attendance record uniquely.


Therefore, (AttendanceDate, RollNumber) forms the composite primary key of ATTENDANCE.


Q20. Differentiate between primary key and foreign key.

Answer:


Primary Key

Foreign Key

Uniquely identifies tuples in a relation

Establishes a relationship between two relations

Cannot contain NULL

May contain NULL when permitted

Must uniquely identify every tuple

Its values may repeat

Example: GUID in GUARDIAN

Example: GUID in STUDENT


A foreign key refers to the primary key of another relation. It helps retrieve related information from different tables.


Class 12 Computer Science Chapter 8 Long Answer Questions

Q21. How does a DBMS reduce data redundancy using STUDENT, GUARDIAN and ATTENDANCE relations?

Answer:

A school maintains details about students, their guardians and daily attendance.


If these details are stored in separate files without proper relationships, information such as student names and guardian details may be repeated.


A relational database reduces this duplication by organising the information into three related relations.


1. STUDENT Relation

STUDENT(RollNumber, SName, SDateofBirth, GUID)

Stores the student's roll number, name, date of birth and guardian ID.


2. GUARDIAN Relation

GUARDIAN(GUID, GName, GPhone, GAddress)

Stores guardian details using a unique guardian ID.


3. ATTENDANCE Relation

ATTENDANCE(AttendanceDate, RollNumber, AttendanceStatus)

Stores attendance details without repeating student names.


Relational Structure:


GUARDIAN

---------

GUID (Primary Key)

GName

GPhone

GAddress

      |

      | GUID

      |

STUDENT

---------

RollNumber (Primary Key)

SName

SDateofBirth

GUID (Foreign Key)

      |

      | RollNumber

      |

ATTENDANCE

-----------

AttendanceDate

RollNumber (Foreign Key)

AttendanceStatus


Primary Key:

(AttendanceDate, RollNumber)


Explanation:

GUID connects STUDENT with GUARDIAN, while RollNumber connects ATTENDANCE with STUDENT.


Student names and guardian details do not need to be repeatedly stored in attendance records.


This reduces data redundancy and helps maintain consistency.


Q22. Explain the main components and working of a database environment.

Answer:

A database environment allows different users to access and manage information through a Database Management System.


The main components are:


  1. Users: Teachers and office staff who need information from the database.

  2. DBMS Software: Processes queries and manages access to stored data.

  3. Database: Contains related tables such as STUDENT, GUARDIAN and ATTENDANCE.

  4. Database Catalog: Stores database definitions, schema and constraints.

  5. Query Result: Information returned after processing a request.


Database Environment Diagram:


Database Environment Diagram


The DBMS processes user queries, accesses the required data and provides the results. It also allows authorised users to modify stored information.


Q23. Explain the different types of keys in a relational database.

Answer:

Keys are used to uniquely identify tuples and establish relationships between relations.


1. Candidate Key

A candidate key is an attribute that can uniquely identify every tuple in a relation.


For example, GUID and GPhone are considered candidate keys in the GUARDIAN relation.


2. Primary Key

A primary key is selected from the candidate keys to uniquely identify each tuple.


For example, GUID is selected as the primary key of GUARDIAN.


3. Alternate Key

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


For example, when GUID is selected as the primary key, GPhone becomes an alternate key.


4. Composite Primary Key

A composite primary key consists of more than one attribute.


For example, the combination of AttendanceDate and RollNumber is the composite primary key of ATTENDANCE.


5. Foreign Key

A foreign key is an attribute that refers to the primary key of another relation.


For example, GUID in STUDENT refers to GUID in GUARDIAN.


These keys help uniquely identify records and maintain relationships between tables.


Q24. Why are foreign keys allowed to have NULL values? Explain with an example.

Answer:

A foreign key is used to establish a relationship between two relations by referring to the primary key of another relation.


A foreign key may contain NULL if it is not part of the primary key of the referencing relation and the applicable constraints permit NULL values.


Consider the STUDENT relation:


STUDENT(RollNumber, SName, SDateofBirth, GUID)


Here, GUID is a foreign key referencing the GUARDIAN relation.


If a student's guardian information is unavailable, the GUID attribute may contain NULL.


For example, the GUID field for Taleem Shah in the STUDENT relation is not filled.


This represents unavailable guardian information.


Conclusion: A primary key cannot contain NULL, but a foreign key may contain NULL when permitted by the database constraints.


Q25. Explain insertion, deletion and update operations with examples.

Answer:

Data manipulation involves making changes to information stored in a database.


The three main operations are:


1. Insertion

Insertion means adding a new record to a database.


For example, when Rivaan joins a school, the required student and guardian details are added to the relevant tables.


2. Deletion

Deletion means removing existing records from a database.


For example, when a student leaves the school, the appropriate student and related records may need to be deleted.


3. Update

Update means modifying existing information.


For example, when Atharv's guardian changes their mobile number, the GPhone attribute in GUARDIAN is updated.


These operations allow a database to reflect changes in stored information.


26. Two Sports Preferences relations contain the same data but have different row and column orders. Are their states equivalent?

Answer:

Yes, both relation states are equivalent if they contain the same attributes and corresponding tuples.


In a relational database:


  1. The order of attributes is immaterial.

  2. The order of tuples is immaterial.

  3. Each tuple must be distinct.


Therefore, arranging the records by roll number in one relation and by sport name in another does not change the actual information stored.


27. An organisation maintains EMPLOYEE and DEPENDENT relations. Identify the candidate keys, foreign key and degree.

Question:

Consider the relations:

EMPLOYEE(AadharNumber, Name, Address, Department, EmployeeID)

DEPENDENT(EmployeeID, DependentName, Relationship)

Answer the following:

(a) Which attributes can be candidate keys in EMPLOYEE?

(b) Which key connects EMPLOYEE and DEPENDENT?

(c) What is the degree of both relations?

Answer:

(a) Candidate Keys

AadharNumber and EmployeeID can serve as candidate keys because they can uniquely identify an employee.


(b) Foreign Key

EmployeeID in DEPENDENT refers to EmployeeID in EMPLOYEE, assuming EmployeeID is chosen as the primary key of EMPLOYEE.


This relationship allows the organisation to retrieve dependents associated with a particular employee.


(c) Degree

Degree is the number of attributes in a relation.


EMPLOYEE contains five attributes:


AadharNumber, Name, Address, Department and EmployeeID.

Therefore, its degree is 5.

DEPENDENT contains three attributes:

EmployeeID, DependentName and Relationship.

Therefore, its degree is 3.


Important Topics Covered in Class 12 Computer Science Chapter 8 Database Concepts

Chapter 8 focuses on how databases overcome the limitations of traditional file systems and organise related information using tables. 


The NCERT textbook uses examples of school attendance, guardian records, sports preferences and other database applications to explain these concepts.


The following topics are important for understanding the chapter and practising its exercise questions.


Important Topics

Key Concepts to Focus On

File System

Manual record keeping, file storage and limitations of file systems

Limitations of File System

Difficulty in access, data redundancy, inconsistency, isolation, dependence and controlled data sharing

Database Management System (DBMS)

Definition, features, applications and advantages over file systems

Database Schema and Instance

Database structure, database state and differences between them

Data Constraints and Metadata

NOT NULL, UNIQUE, data dictionary and database catalog

Database Operations

Queries, insertion, deletion and updating records

Relational Data Model

Relations, attributes, tuples, domains, degree and cardinality

Properties of Relations

Unique attributes, distinct tuples, atomic values and NULL values

Keys in Relational Database

Candidate key, primary key, alternate key, composite primary key and foreign key

Relational Database Applications

Student attendance, sports preferences, canteen records and student-project databases


How Vedantu's Important Questions and Answers Help You Prepare for Chapter 8

Vedantu's Class 12 Computer Science Chapter 8 Important Questions and Answers help students understand database concepts through solved questions, relational table examples and application-based problems.


  • Concept-Based Questions: Strengthen your understanding of file-system limitations, DBMS, database schemas, data constraints and relational models.

  • MCQs: Test your knowledge of attributes, tuples, degree, cardinality, database instances and different types of keys.

  • Table-Based Practice: Learn to identify candidate keys, primary keys, composite keys and foreign keys using STUDENT, GUARDIAN and ATTENDANCE tables.

  • Short and Long Answer Preparation: Practise explaining the differences between database schema and instance, primary and foreign keys, and degree and cardinality.

  • NCERT-Based Application Questions: Understand database design and constraints through problems involving sports preferences, school canteen records, employee dependents and project assignments.


These important questions and solved answers help students understand how database relationships work, avoid common mistakes when identifying keys and improve their ability to answer theoretical and application-based questions.


Important Study Material Links for Class 12 Computer Science Chapter 8 Database Concepts

S. No

Important Study Material Links for Class 12 Computer Science Chapter 8 Database Concepts

1

Class 12 Computer Science Chapter 8 Database Concepts NCERT Solutions 

2

Class 12 Computer Science Chapter 8 Database Concepts Revision Notes


Class 12 Computer Science Chapter-Wise Important Questions


Additional Study Materials for Class 12 Computer Science

FAQs on Important Questions and Answers for Class 12 Computer Science Chapter 8 Database Concepts | 2026-27

1. How are candidate keys, primary keys and alternate keys different in Chapter 8?

A candidate key is an attribute or minimal set of attributes that can uniquely identify a record in a table. 


A primary key is the candidate key selected to identify each record, while an alternate key is a candidate key that has not been selected as the primary key. 


For example, if both StudentID and AdmissionNumber uniquely identify students, either could be chosen as the primary key, leaving the other as an alternate key.

2. Can a foreign key contain a NULL value in a relational database?

Yes, a foreign key can contain a NULL value when the relationship is optional and the column is not restricted by a NOT NULL constraint. 


For example, in the STUDENT table, the GUID field can be NULL when a student's guardian details are unavailable. However, if the foreign key is also part of a primary key, it cannot contain NULL.

3. Are the Class 12 Computer Science Chapter 8 important questions useful for the 2026–27 academic session?

Yes, students can use Vedantu’s Class 12 Computer Science Chapter 8 important questions to practise key concepts and prepare for exams. They should also follow the NCERT textbook and their school’s prescribed syllabus for the 2026–27 academic session.

4. What are the most important topics to practise in Class 12 Computer Science Chapter 8?

The important topics include file-system limitations, DBMS, database schema and instance, relational data models, degree, cardinality, NULL values and database keys. 


Students should also practise NCERT application-based questions involving student attendance, sports preferences and related tables.

5. Where can students find Vedantu's Class 12 Computer Science Chapter 8 Important Questions and Answers PDF?

Students can access Vedantu's Class 12 Computer Science Chapter 8 Important Questions and Answers to practise MCQs, very short, short and long answer questions on Database Concepts. The downloadable PDF can be used for offline revision once it is available on the page.

6. How do Vedantu's important questions help students understand relational database concepts?

Vedantu's chapter-specific important questions help students practise identifying attributes, tuples, primary keys, foreign keys and database constraints. 


The solved explanations and table-based examples also help students understand how related records are organised and how to approach NCERT application-based questions.

📌 Add Vedantu as a preferred source on Google