AmbifulWorksheets
Practice that never repeats
CBSE · Class 12 · Computer Science

Database Concepts

Standard difficulty · 20 questions · 40 marks · Time: 37 minutes

Name: Date: Score: ____ / 40

Show your working for Sections B and C. Answers are on the last page — try every question first!

Section A — Choose the correct answer8 × 1 = 8 marks
1.
In the relational model, a table is called a:
  1. domain
  2. schema key
  3. tuple
  4. relation
2.
Table: STUDENT
RollNo | Name | Sec | City | Marks
101 | Dev | C | Delhi | 47
102 | Ananya | A | Delhi | 58
103 | Zoya | B | Delhi | 92
104 | Isha | B | Delhi | 46
105 | Vikram | C | Indore | 68
106 | Rahul | C | Pune | 40
107 | Priya | C | Delhi | 96
108 | Kabir | A | Indore | 83
What is the cardinality of this relation?
  1. 7
  2. 8
  3. 5
  4. 9
3.
Relation R has degree 5 and cardinality 3; relation S has degree 4 and cardinality 4. What is the degree of their Cartesian product R × S?
  1. 7
  2. 8
  3. 20
  4. 9
4.
Table: STUDENT
RollNo | Name | Sec | City | Marks
1 | Zoya | A | Indore | 72
2 | Ananya | C | Indore | 73
3 | Dev | A | Indore | 91
4 | Vikram | C | Kochi | 41
5 | Rahul | B | Jaipur | 76
6 | Priya | B | Jaipur | 72
Going by the data shown, which attribute can be the primary key?
  1. RollNo
  2. Sec
  3. Marks
  4. City
5.
In the relational model, the term DBMS means:
  1. an attribute that refers to the primary key of another relation
  2. software that creates, stores and manages databases
  3. the set of values an attribute may take
  4. a candidate key that is not chosen as the primary key
6.
In the relations PATIENT(PID, PName, DocID, Ward) and DOCTOR(DocID, DName, Dept), which attribute is a foreign key?
  1. DocID in PATIENT
  2. Dept in DOCTOR
  3. PID in PATIENT
  4. Ward in PATIENT
7.
A relation has degree 5 and cardinality 7. Then 1 tuple is inserted, 2 deleted, and 1 attribute is added. What is the new cardinality?
  1. 5
  2. 8
  3. 6
  4. 7
8.
The domain of the attribute Marks is the whole numbers from 10 to 100. Which value can never appear in that column?
  1. 95
  2. 9
  3. 55
  4. 91
Section B — Short answer8 × 2 = 16 marks
9.
Give two limitations of keeping data in a file system instead of a database.
10.
Table: EMPLOYEE
EmpNo | Name | Dept | Salary | Bonus
E1 | Vikram | IT | 42000 | 4000
E2 | Dev | HR | 64000 | NULL
E3 | Meera | IT | 57000 | 2000
E4 | Ananya | IT | 51000 | 6500
E5 | Priya | IT | 49000 | NULL
E6 | Asha | HR | 76000 | NULL
Write (a) the degree and (b) the cardinality of this relation.
11.
A relation with 5 attributes and 6 tuples is combined with one of 4 attributes and 2 tuples by a Cartesian product. Find (a) its degree (b) its cardinality.
12.
Name the foreign key in RESULT(RollNo, SubCode, Marks), which refers to SUBJECT(SubCode, SubName, MaxMarks).
13.
Table: STUDENT
RollNo | Name | Sec | City | Marks
201 | Dev | A | Jaipur | 83
202 | Rahul | C | Pune | 85
203 | Meera | A | Kochi | 44
204 | Isha | C | Jaipur | 75
205 | Kabir | B | Pune | 65
206 | Vikram | C | Jaipur | 42
207 | Priya | A | Pune | 83
Which attribute is most suitable as the primary key?
14.
Write the relational term: an attribute that refers to the primary key of another relation.
15.
A table ITEM has 5 rows and 5 columns. 3 new rows are inserted and the column Qty is dropped with ALTER TABLE. What are (a) the degree (b) the cardinality now?
16.
In a relation STUDENT, the attributes AdmNo, RollNo, Email each have unique values for every student and are never NULL. AdmNo is chosen as the primary key. Name (a) the candidate keys (b) the alternate keys.
Section C — Word problems4 × 4 = 16 marks
17.
Explain the limitations of a file system that a database management system overcomes.
18.
Table: EMP
EmpNo | Name | DeptID | Salary
101 | Priya | D3 | 84000
102 | Vikram | D1 | 47000
103 | Isha | D2 | 66000
104 | Zoya | D2 | 86000
105 | Rahul | D5 | 81000

Table: DEPT
DeptID | DName | City
D1 | HR | Kochi
D2 | Accounts | Jaipur
D3 | IT | Pune
D4 | Sales | Jaipur
(a) Name the primary key of each relation. (b) Name the foreign key. (c) Find the degree and cardinality of EMP × DEPT. (d) How many tuples does the equi-join on DeptID have? (e) Why is the row with DeptID D5 a problem?
19.
Table: STUDENT
RollNo | Name | Sec | City | Marks
1 | Rohan | C | Shimla | 75
2 | Vikram | B | Shimla | 83
3 | Arjun | C | Shimla | 76
4 | Zoya | A | Shimla | 90
5 | Meera | B | Shimla | 74
6 | Asha | B | Shimla | 75
(a) What are the degree and cardinality? (b) Which attributes cannot be the primary key, going by the data, and why? (c) Give the domain of two attributes.
20.
Table: STUDENT
RollNo | AdmNo | Name | Sec | City | Marks
101 | 1059 | Meera | B | Jaipur | 86
102 | 1099 | Rohan | A | Delhi | 91
103 | 1241 | Priya | B | Shimla | 51
104 | 1024 | Isha | B | Delhi | 81
105 | 1318 | Zoya | A | Shimla | 80
106 | 1126 | Ananya | B | Delhi | 46
107 | 1097 | Asha | B | Shimla | 86
(a) Going by the data, which attributes are candidate keys? (b) If RollNo is made the primary key, what is AdmNo called? (c) After ALTER TABLE STUDENT ADD Phone VARCHAR(12); and deleting 2 rows, what are the degree and cardinality?
AmbifulWorksheets
Practice that never repeats
CBSE · Class 12 · Computer Science

Answer key

Database Concepts · AW-12CS-DBC-2026-V1 · For parents — fold back or tear off before handing the sheet to your child.

QAnswerWorking
1(d) relation—
2(b) 88 tuples (rows); the heading is not a tuple
3(d) 95 + 4: every attribute of both
4(a) RollNoRollNo is the only attribute here whose values are all different and never NULL (two students share marks)
5(b) software that creates, stores and manages databases—
6(a) DocID in PATIENTDocID in PATIENT refers to the primary key of DOCTOR
7(c) 67 + 1 − 2
8(b) 99 is outside 10 to 100
9Data redundancy (the same data in many files) and inconsistency; also difficulty of access, data isolation and weak control over who sees the data.—
10(a) 5; (b) 6degree = number of attributes; cardinality = number of tuples
11(a) 9; (b) 12degrees add: 5 + 4; cardinalities multiply: 6 × 2
12SubCodeSubCode is the primary key of SUBJECT
13RollNoits values are all different and never NULL
14foreign keyforeign key: an attribute that refers to the primary key of another relation
15(a) 4; (b) 85 − 1 attributes; 5 + 3 tuples
16(a) AdmNo, RollNo, Email; (b) RollNo, Emailevery attribute that can identify a tuple is a candidate key; those not chosen are alternate keys
17A file system repeats data in many files (redundancy), so copies disagree (inconsistency); data is hard to combine across files (isolation), each new query needs a new program (difficult access), and controlling who may see what is weak. A DBMS stores data once, keeps it consistent, answers queries in SQL and controls access.—
18(a) EMP: EmpNo; DEPT: DeptID; (b) DeptID in EMP; (c) degree 7, cardinality 20; (d) 4; (e) D5 is not a DeptID in DEPT, so it breaks referential integrity: a foreign key value must match a primary key value (or be NULL)Cartesian product: degrees add, cardinalities multiply
19(a) 5 and 6; (b) Sec, City, Marks: each has a value repeated in two tuples; (c) e.g. RollNo: whole numbers; Sec: A, B or Ca key must be unique and not NULL
20(a) RollNo, AdmNo (and Name, whose values happen to differ here, though names can repeat); (b) an alternate key; (c) degree 7, cardinality 5a candidate key has unique, non-NULL values; Sec, City and Marks repeat