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

NCERT Solutions For Class 12 Computer Science Chapter 8 Database Concepts - 2025-26

ffImage
banner
widget title icon
Latest Updates

Stepwise Answers & Exam Tips for Database Concepts in Class 12 Computer Science

Struggling to confidently solve Class 12 Computer Science Chapter 8? Our NCERT Solutions for Class 12 Computer Science Chapter 8 Database Concepts cover each exercise step by step, making even the toughest topics feel accessible for every CBSE 2025–26 student.


With concise, exam-style explanations and exercise-wise solutions, you'll build clarity on relational database basics, definitions, and diagrams that are vital for scoring well. Find quick tips to structure long answers, tackle intext questions, and understand CBSE marking schemes with confidence.


Don’t miss your chance to boost preparation—download the free PDF for Class 12 Computer Science Chapter 8 exercises and get ready for seamless revision, anywhere and anytime.


Stepwise Answers & Exam Tips for Database Concepts in Class 12 Computer Science

Exercises

1. Give the terms for each of the following:

a) Collection of logically related records.

b) DBMS creates a file that contains description about the data stored in the database.

c) Attribute that can uniquely identify the tuples in a relation.

d) Special value that is stored when actual data value is unknown for an attribute.

e) An attribute which can uniquely identify tuples of the table but is not defined as primary key of the table.

f) Software that is used to create, manipulate and maintain a relational database.

Answer:

a) Table (Relation)

b) Data Dictionary (Meta-data)

c) Primary Key

d) NULL

e) Candidate Key / Alternate Key

f) Database Management System (DBMS)

2. Why foreign keys are allowed to have NULL values? Explain with an example.
Answer: Foreign keys are allowed to have NULL values because a record might not always be associated with another table. For example, if a student doesn't have a guardian listed, the GUID (foreign key) in the STUDENT table can be NULL. This means the association is optional for that record.

3. Differentiate between:

(a) Database state and database schema

(b) Primary key and foreign key

(c) Degree and cardinality of a relation

Answer:


S.No

Basis

Term 1

Term 2

(a)

Database State vs Database Schema

Database Schema: It defines the logical structure of the database, including tables, attributes, and relationships. It remains mostly unchanged.

Database State: It represents the actual data in the database at a specific time and keeps changing as data is modified.

(b)

Primary Key vs Foreign Key

Primary Key: A unique identifier for each record in a table. It ensures that no two rows have the same key value.

Foreign Key: A field in one table that refers to the primary key in another table, ensuring referential integrity.

(c)

Degree vs Cardinality of a Relation

Degree: The number of attributes (columns) in a table.

Cardinality: The number of tuples (rows) in a table.


4. Compared to a file system, how does a database management system avoid redundancy in data through a database?

Answer: A DBMS stores data centrally in related tables, so repeated information is minimised. Instead of duplicating the same data in different files, linked tables with foreign keys minimise redundancy and ensure changes are reflected everywhere.

5. What are the limitations of file system that can be overcome by a relational DBMS?

Answer:

  • 1. Redundancy and inconsistency

  • 2. Data isolation

  • 3. Difficulty in accessing data

  • 4. Data dependence

  • 5. Poor controlled data sharing

6. A school has a rule that each student must participate in a sports activity. So each one should give only one preference for sports activity. Suppose there are five students in a class, each having a unique roll number. The class representative has prepared a list of sports preferences as shown below. Answer the following:

Table: Sports Preferences

Roll_no

Preference

9

Cricket

13

Football

17

Badminton

17

Football

21

Hockey

24

NULL

NULL

Kabaddi


1. Roll no 24 may not be interested in sports. Can a NULL value be assigned to that student’s preference field?

2. Roll no 17 has given two preferences in sports...property violated? Can we use any constraint or key?

3. Kabaddi was not chosen by any student. Is it possible to have this tuple in the Sports Preferences relation?

Answer:


1. In a relational database model where every student must provide exactly one preference for a sports activity, assigning a NULL value to Roll No. 24’s preference field is not allowed, as it violates the rule that each student must have a defined preference.

2. The primary key constraint ensures the uniqueness of each record in a relational database table. If Roll No. 17 has two sports preferences, it breaches this rule because a primary key defined on “Roll_no” does not permit duplicate entries. By enforcing a primary key constraint on “Roll_no,” the Database Management System (DBMS) automatically prevents such violations by rejecting any attempt to insert multiple rows with the same roll number.

3. Since no student has chosen Kabaddi as their preferred sport, a separate entry for Kabaddi should not exist in the Sports Preferences table. The table must only contain tuples that represent valid student–sport relationships.

7. In another class having 2 sections, the two respective class representatives have prepared 2 separate Sports Preferences tables, as shown below:

Sports preference of section 1 (arranged on roll number column)

Table: Sports Preferences


Roll_no

Sports

9

Cricket

13

Football

17

Badminton

21

Hockey

24

Cricket


Sports preference of section 2 (arranged on Sports name column, and column order is also different)


Table: Sports Preferences

Sports

Roll_no

Badminton

17

Cricket

9

Cricket

24

Football

13

Hockey

21


Are the states of both the relations equivalent? Justify.


Answer

Yes, both relations represent the same state because the sequence of rows and columns in a relation has no impact on its data. As the information contained in both tables is identical, the two relations are considered equivalent.

8. The school canteen wants to maintain records of items available in the school canteen and generate bills when students purchase any item from the canteen. The school wants to create a canteen database to keep track of items in the canteen and the items purchased by students. Design a database by answering the following questions:

(a) To store each item name along with its price, what relation should be used? Decide appropriate attribute names along with their data type. Each item and its price should be stored only once. What restriction should be used while defining the relation ?

(b) In order to generate bill, we should know the quantity of an item purchased. Should this information be in a new relation or a part of the previous relation ? If a new relation is required, decide appropriate name and data type for attributes. Also, identify appropriate primary key and foreign key so that the following two restrictions are satisfied:

  • The same bill cannot be generated for different orders.

  • Bill can be generated only for available items in the canteen.

(c) The school wants to find out how many calories students intake when they order an item. In which relation should the attribute 'calories' be stored?

Answer

(a) To record each item’s name along with its price in the canteen database, a relation (table) named “Items” can be created with the following structure:

Items Table

Attributes

Datatype

Constraints

ItemNo

Integer

Primary Key, Unique, Not Null

ItemName

VARCHAR

Not Null

Price

Float

Not Null

The ItemNo attribute should be defined as the primary key to ensure that each item has a unique identifier. This prevents duplication and guarantees that every item and its corresponding price appear only once in the database.

(b) The details of items sold should be maintained in a separate relation called “SaleOrders.”

SaleOrders Table

Attributes

Datatype

Constraints

OrderNo

Integer

Primary Key, Unique, Not Null

ItemNo

Integer

Foreign Key, Not Null

Quantity

Integer

Not Null

Price

Float

Not Null


This structure satisfies both conditions:

  • Each order is uniquely identified by OrderNo, ensuring that the same bill cannot be generated multiple times.

  • The ItemNo attribute acts as a foreign key, linking the SaleOrders table to the Items table and ensuring that bills can be generated only for items available in the canteen.

(c) The attribute ‘Calories’ should be included in the Items table, as it represents a property directly associated with each specific item.


9. An organisation wants to create a database EMPDEPENDENT to maintain following details about its employees and their dependent.

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

DEPENDENT(EmployeeID, DependentName, Relationship)


(a) Name the attributes of EMPLOYEE, which can be used as candidate keys.

(b) The company wants to retrieve details of dependent of a particular employee. Name the tables and the key which are required to retrieve this detail.

(c) What is the degree of EMPLOYEE and DEPENDENT relation?


Answer:

(a) In the EMPLOYEE table, both AadharNumber and EmployeeID can serve as candidate keys, as each of these attributes can uniquely identify a record within the table.


(b) The EMPLOYEE and DEPENDENT tables are connected through the EmployeeID attribute, which acts as a common key. This key is used to retrieve information about the dependents corresponding to a particular employee.


(c) The EMPLOYEE relation consists of five attributes, giving it a degree of 5, whereas the DEPENDENT relation contains three attributes, resulting in a degree of 3.


10. School uniform is available at M/s Sheetal Private Limited. They have maintained SCHOOL_UNIFORM Database with two relations viz. UNIFORM and COST. The following figure shows database schema and its state.


School Uniform Database


Attributes and Constraints


Table: UNIFORM


Attribute

UCode

UName

UColor

Constraints

Primary Key

Not Null

-


Table: COST

Attribute

UCode

Size

Price

Constraints

Composite Primary Key

>0


Table: UNIFORM

UCode

UName

UColor

1

Shirt

White

2

Pant

Grey

3

Skirt

Grey

4

Tie

Blue

5

Socks

Blue

6

Belt

Blue


Table: COST

UCode

Size

COST Price

1

M

500

1

L

580

1

XL

620

2

M

810

2

L

890

2

XL

940

3

M

770

3

L

830

3

XL

910

4

S

150

4

L

170

5

S

180

5

L

210

6

M

110

6

L

140

6

XL

160


(a) Can they insert the following tuples to the UNIFORM Relation ? Give reasons in support of your answer.


1. 7, Handkerchief, NULL

2. 4, Ribbon, Red

3. 8, NULL, White

(b) Can they insert the following tuples to the COST Relation ? Give reasons in support of your answer.


1. 7, S, 0

2. 9, XL, 100

Answer:

(a)

  1. Tuple (7, Handkerchief, NULL): This tuple can be inserted since there is no restriction in the schema that prevents the UColor attribute from having a NULL value.

  2. Tuple (4, Ribbon, Red): This tuple is valid for insertion as all attributes contain appropriate non-null values that comply with the schema constraints.

  3. Tuple (8, NULL, White): This tuple cannot be inserted because the UName attribute is defined as NOT NULL in the schema, and therefore, it must always contain a value.

(b)

  1. Tuple (7, S, 0): This tuple is not allowed to be inserted because the Price attribute must have a value greater than 0, as specified in the schema constraints.

  2. Tuple (9, XL, 100): This tuple can be successfully inserted since all attributes have valid, non-null values, and the Price satisfies the condition of being greater than 0.


11. In a multiplex, movies are screened in different auditoriums. One movie can be shown in more than one auditorium. In order to maintain the record of movies, the multiplex maintains a relational database consisting of two relations viz. MOVIE and AUDI respectively as shown below :


Movie(Movie_ID, MovieName, ReleaseDate)

Audi(AudiNo, Movie_ID, Seats, ScreenType, TicketPrice)

(a) Is it correct to assign Movie_ID as the primary key in the MOVIE relation ? If no, then suggest an appropriate primary key.


(b) Is it correct to assign AudiNo as the primary key in the AUDI relation ? If no, then suggest appropriate primary key.


(c) Is there any foreign key in any of these relations ?

Answer:

Answer

(a) Yes, assigning Movie_ID as the primary key in the MOVIE relation is appropriate since every movie possesses a unique Movie_ID that distinguishes it from others.

(b) It is not suitable to designate AudiNo as the primary key in the AUDI relation because the same auditorium number can be associated with different movies shown at various times. To ensure that each record is uniquely identified, a composite primary key made up of AudiNo and Movie_ID should be defined.

(c) Yes, the AUDI relation includes a foreign key. The Movie_ID attribute in the AUDI table acts as a foreign key that references the Movie_ID primary key in the MOVIE relation, thereby establishing a link between the two tables.


12. For the below given database STUDENT-PROJECT, answer the following:

(a) Name primary key of each table.

(b) Find foreign key(s) in table PROJECT-ASSIGNED.

(c) Is there any alternate key in table STUDENT? Give justification for your answer.

(d) Can a user assign duplicate value to the field RollNo of STUDENT table? Justify.

Student Project Database

Table: STUDENT

Roll No

Name

Class

Section

Registration_ID

11

Mohan

XI

1

IP-101-15

12

Sohan

XI

2

IP-104-15

21

John

XII

1

CS-103-14

22

Meena

XII

2

CS-101-14

23

Juhi

XII

2

CS-101-10


Table: PROJECT

ProjectNo

PName

SubmissionDate

101

Airline Database

12/01/2018

102

Library Database

12/01/2018

103

Employee Database

15/01/2018

104

Student Database

12/01/2018

105

Inventory Database

15/01/2018

106

Railway Database

15/01/2018


Table: PROJECT ASSIGNED

Registration_ID

ProjectNo

IP-101-15

101

IP-104-15

103

CS-103-14

102

CS-101-14

105

CS-101-10

104


Answer:

(a) The primary key for each table is as follows:

  • STUDENT: Roll No

  • PROJECT: ProjectNo

  • PROJECT_ASSIGNED: Registration_ID

(b) The ProjectNo column in the PROJECT_ASSIGNED table functions as a foreign key, linking it to the ProjectNo column in the PROJECT table to establish a relationship between the two.

(c) In the STUDENT table, the Registration_ID attribute acts as an alternate key because it uniquely identifies every student in addition to the primary key.

(d) Duplicate values cannot be assigned to the Roll No field in the STUDENT table, as it serves as the primary key, which enforces uniqueness across all records.


Answer:

(a) No, a record cannot be inserted with a missing Roll No value in the STUDENT table because the Roll No attribute is defined as both Primary Key and NOT NULL. Inserting a null value would violate these constraints, making the operation invalid.

(b) Yes, a record can be inserted without a Registration_ID in the STUDENT table, as this attribute does not have a NOT NULL constraint defined in the schema. Therefore, it is permissible to leave this field blank.

(c) Yes, inserting a project record without a SubmissionDate is allowed because the attribute does not have a NOT NULL constraint in the PROJECT table. Hence, a project detail can exist even if its submission date is not provided.

(d) No, this operation cannot be executed because ProjectNo in the PROJECT_ASSIGNED table acts as a foreign key referencing the Project table’s primary key. Since the value 206 does not exist in the PROJECT table, inserting it would violate referential integrity and is therefore not allowed.


NCERT Solutions Class 12 Computer Science Chapter 8 Database Concepts (2025-26) – Key Highlights

Mastering Database Concepts from this chapter helps you understand how data is organized, managed, and linked in modern computer systems. Grasping the role of keys and relational models will give you an extra edge in both board exams and future technology studies.


Regular practice of NCERT-based questions ensures you are ready for exam patterns and concepts like DBMS, file system limitations, and real-life database applications. Make notes while revising to remember key differences and definitions for quick last-minute review.


Stay focused on understanding primary, foreign, and composite keys for high-scoring answers. Use tables and real-world examples for clarity, and always check for conceptual clarity before moving to advanced database topics. Consistent revision will boost your confidence!


CBSE Class 12 Computer Science Chapter-wise NCERT Solutions



CBSE Class 12 Computer Science Study Materials

FAQs on NCERT Solutions For Class 12 Computer Science Chapter 8 Database Concepts - 2025-26

1. What are NCERT Solutions for Class 12 Computer Science Chapter 8 Database Concepts?

NCERT Solutions for Class 12 Computer Science Chapter 8 Database Concepts provide stepwise, exam-oriented answers for all intext and back exercise questions as per the latest CBSE 2025–26 syllabus.

  • Covers all key topics including database definitions, schema, DBMS, and relational concepts.
  • Follows CBSE marking scheme for full marks.
  • Includes diagrams, definitions, and long/short answers for effective exam preparation.

2. How can I score full marks in Class 12 Computer Science Chapter 8 questions with NCERT Solutions?

To score full marks, use stepwise NCERT Solutions for Chapter 8 and present answers with clarity and structure.

  • Begin with a direct definition or statement.
  • Include stepwise explanations and relevant diagrams.
  • Highlight key terms from CBSE marking scheme.
  • Make answers concise but comprehensive, following the latest syllabus.

3. Are diagrams or definitions mandatory in Class 12 Computer Science Chapter 8 answers?

Including diagrams and accurate definitions in Database Concepts answers is highly recommended to match CBSE marking schemes.

  • Draw neat, well-labelled diagrams where required (e.g., database schema, ER diagrams).
  • Write precise definitions for all major terms like DBMS, entity, relationship, and schema.
  • Marks may be lost without diagrams or key definitions where asked.

4. What are the key topics covered in NCERT Solutions Class 12 Computer Science Chapter 8?

NCERT Solutions Class 12 Computer Science Chapter 8 cover the following key database topics:

  • Database concepts and characteristics
  • Data models (hierarchical, network, relational)
  • DBMS vs. File System
  • Relational database basics – tables, keys, schema, relationships
  • ER diagrams
  • SQL basics and queries (if present per syllabus)

5. Where can I download free PDF of Class 12 Computer Science Chapter 8 NCERT Solutions?

You can download the free PDF of NCERT Solutions for Class 12 Computer Science Chapter 8 directly from trusted educational platforms offering chapterwise solutions for the 2025–26 CBSE syllabus.

  • Look for Single-click PDF download buttons on the chapter page.
  • Ensure the source aligns with NCERT & CBSE exam formats.

6. How should I write long answers in Class 12 Computer Science Chapter 8 to match CBSE marking schemes?

Long answers in Computer Science Chapter 8 should be structured with definitions, diagrams, stepwise explanation, and conclusion:

  • Start with a definition or introduction.
  • Use diagrams/tables where needed.
  • Write points in logical order with headings and subheadings.
  • Highlight keywords from syllabus.

7. What are the most important questions for Class 12 Computer Science Chapter 8 Database Concepts?

The most important questions often include:

  • Definitions (DBMS, keys, schema)
  • Differences between DBMS and file systems
  • Draw and label ER diagrams
  • Write short notes on data models
  • Explain primary key, foreign key, and relationships
  • Practice previous year questions and important questions from trusted sources.

8. Are NCERT Solutions enough for Class 12 Computer Science exams?

NCERT Solutions are usually sufficient for Class 12 Computer Science Chapter 8 if you:

  • Cover all intext and back exercise questions.
  • Practice stepwise solutions following CBSE guidelines.
  • Supplement with sample papers and previous year questions for complete exam preparation.

9. How can I revise Class 12 Computer Science Chapter 8 Database Concepts quickly?

For fast revision, use a structured plan:

  • Review key definitions and diagrams.
  • Go through exercise-wise NCERT solutions.
  • Take quick notes and flashcards on major topics.
  • Solve important questions and sample papers.

10. How to learn diagram/map labelling for Class 12 Computer Science Chapter 8?

To master diagram/map labelling:

  • Practice drawing and labelling ER diagrams, schema diagrams, and other chapter visuals.
  • Follow CBSE conventions for neatness and clarity.
  • Use correct notation and clear handwriting to avoid mark deduction.
  • Refer to NCERT steps and solved examples for exam-ready diagrams.

11. Do examiners award partial marks for correct steps even if the final answer is wrong?

Yes, in CBSE marking, partial marks are often awarded for each correct step or working shown, even if the final answer is incorrect.

  • Write every step clearly using stepwise solutions from NCERT.
  • Ensure to show working, formulae, and rough diagrams where applicable.
  • This approach helps maximize total marks despite minor mistakes.