Use app×
QUIZARD
QUIZARD
JEE MAIN 2026 Crash Course
NEET 2026 Crash Course
CLASS 12 FOUNDATION COURSE
CLASS 10 FOUNDATION COURSE
CLASS 9 FOUNDATION COURSE
CLASS 8 FOUNDATION COURSE
+2 votes
771 views
in Computer by (43.0k points)
closed by

NCERT Solutions Class 12, Computer Science, Chapter- 8, Database Concepts

For a deep understanding of this chapter and to excel in Board exams and competitive tests, it's essential to use NCERT Solutions. Created by field experts, these solutions explore all crucial concepts within the chapter, tailored specifically for the CBSE curriculum. They offer thorough support and are an invaluable resource for your academic success.

In these NCERT Solutions for Class 12 Computer Science, we have discussed all types of NCERT intext questions and exercise questions.

Concepts covered in Class 12 Computer Science chapter- 8 Database Concepts, are :

  • Introduction of Database Concepts
  • File System
  • Database Management System
  • Rational Data Model
  • Keys in a Relational Database

Our NCERT Solutions for Class 12 Computer Science provide detailed explanations to assist students with their homework and assignments. Proper command and ample practice of topic-related questions provided by our NCERT solutions is the most effective way to achieve full marks in your exams. Begin studying right away to ace your exams.

Get instant access to all solutions and practice questions to jumpstart your preparation right away.

3 Answers

+2 votes
by (43.0k points)
selected by
 
Best answer

NCERT Solutions Class 12, Computer Science, Chapter- 8, Database Concepts

Exercise

1. Give the terms for each of the following:

a) Collection of logically related records.

Solution:

Database term collection of logically related records.

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

Solution:

The relational database term DBMS creates a file that contains a description of the data stored in the database.

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

Solution:

KEY term 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.

Solution:

The NULL term refers to the special value that is stored when the 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.

Solution:

The Super Key term refers to an attribute that can uniquely identify tuples of the table but is not defined as the primary key of the table.

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

Solution:

A relational Database Management System term refers to software that is used to create, manipulate and maintain a relational database.

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

Solution:

The value of the foreign key is derived from the Primary key of the primary table. Sometimes, we want to enter a record, which is not related. To handle this situation, it is allowed to enter a NULL value in the foreign key.

For example, Suppose a shopkeeper wants to sell a product, but the customer is not a regular customer, so his customer id does not exist. In this case, a NULL value is entered into the customerId field.

3. Differentiate between:

a) Database state and database schema

Solution:

Database state Database schema
It is the collection of information stored in a database at a particular moment. It is the overall description of the database.
Data in instances can be changed using addition, deletion, and updation. The schema is same for the whole database.
Changes Frequently. Does not change Frequently.
It is the set of Information stored at a particular time. Defines the basic structure of the database i.e. how the data will be stored in the database.

b) Primary key and foreign key

Solution:

Primary Key: Primary key is a column or group of columns in a table that uniquely identify the records in the table.

Foreign Key: Foreign keys are the columns of the table which refer to the primary key of another table. A foreign key creates a relationship between two tables.

c) Degree and cardinality of a relation

Solution:

Degree: Degree refers to the number of columns or attributes in a relation/table.

Cardinality: Cardinality refers to the number of rows/ records/tuples in a relation/table.

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

Solution:

  • Redundancy is prevented in a database as there is a single database and any change in it is reflected immediately.
  • Because of this, there is no chance of encountering duplicate data.

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

Solution:

Limitations of the file system overcome by DBMS are:

  • Difficulty in data access
  • Data Redundancy
  • Data Inconsistency
  • Data Isolation
  • Data dependence.

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

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

Solution:

Yes, a NULL value can be assigned to that student's preference field.

b) Roll no 17 has given two preferences in sports. Which property of relational DBMC is violated here? Can we use any constraint or key in the relational DBMS to check against such violation, if any?

Solution:

Property 2 is violated here because each row in a relation is distinct. The primary key can use to identify each row/record in a database table.

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

Solution:

No, it is not possible to have this tuple in the sports preferences relation because Roll_no is the primary key and the primary key does not allow NULL values.

+2 votes
by (43.0k points)

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.

Solution:

Yes, the states of both the relations are equivalent because in the database the row order does not matter also there is no distinction of tables based on the order of attributes (columns) they have, so both relations are 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:

i) The same bill cannot be generated for different orders.

ii) 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?

Solution:

a) To store item details, we can create an Items table.

Items_table Code of item
Item no Unique, Non-null value
Description Description of Item
Price Non-null price of the item

The restrictions and constraints are:

  • Item_no – must be unique and non-null for each row.
  • Description and Price cannot be blank or null.

b) Yes, the item sale information should be stored in a separate relation, say SaleOrders.

Orderno
Itemno
Unique non-null order
number Itemno from Items table
Primary Key
Qty_purchased
Order_Date
Non-null value of qty sold of an item
Date of the order

c) In Items table.

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.

Solution:

AadharNumber, EmployeeId

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.

Solution:

Employee and Dependent tables linked via key EmployeeId

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

Solution:

Degree of Employee: 5,
Degree of Dependent: 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.

table

a) Can they insert the following tuples to the UNIFORM Relation? Give reasons in support of your answer.
i) 7, Handkerchief, NULL
ii) 4, Ribbon, Red
iii) 8, NULL, White

Solution:

i) Yes, it can be inserted.
ii) Yes, It can be inserted.
iii) No. It cannot be inserted as UName cannot be NULL.

b) Can they insert the following tuples to the COST Relation? Give reasons in support of your answer.
i) 7, S, 0
ii) 9, XL, 100

Solution:

i) No, it cannot be inserted as the price must be > 0.
ii) Yes, it can be inserted.

+2 votes
by (43.0k points)

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?

Solution:

a) Yes because every movie will have its unique id.

b) Yes, because every auditorium will be assigned a unique id. No two auditoriums will have the same id.

c) Yes, Movie_ID in the Audi table is foreign because it references the Movie_ID in the Movie table.

table

12. For the above 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? Jusify.

Solution:

a) The primary key of Table STUDENT: Roll No.
The primary key of Table PROJECT: Project No.
The primary key of Table PROJECT ASSIGNED: Registration_ID.

b) Foreign key in table PROJECT ASSIGNED: ProjectNo.

c) Yes, the Name is the alternate key in table STUDENT. In this table, Roll No. and Name is the candidate key in which Roll No. is selected as the primary key then the remaining key (Name) is an alternate key.

d) No, a user cannot assign duplicate value to the field RollNo, of the STUDENT table because Roll No. is the primary key and the primary key uniquely identifies each record in a table.

13. For the above given database STUDENT-PROJECT, can we perform the following operations?

a) Insert a student record with missing roll number value.

b) Insert a student record with missing registration number value.

c) Insert a project detail without submission-date.

d) Insert a record with registration ID IP-101-19 and ProjectNo 206 in table PROJECT-ASSIGNED.

Solution:

a) No, Roll No. is the primary key that does not allow a NULL value.

b) Yes
c) Yes
d) Yes.

Welcome to Sarthaks eConnect: A unique platform where students can interact with teachers/experts/students to get solutions to their queries. Students (upto class 10+2) preparing for All Government Exams, CBSE Board Exam, ICSE Board Exam, State Board Exam, JEE (Mains+Advance) and NEET can ask questions from any subject and get quick answers by subject teachers/ experts/mentors/students.

Categories

...