KEMBAR78
Chapter 8 Database Concepts | PDF | Relational Database | Databases
0% found this document useful (0 votes)
779 views52 pages

Chapter 8 Database Concepts

Chapter 8 discusses database concepts, highlighting the inefficiencies of manual record-keeping and the advantages of electronic storage. It introduces the Database Management System (DBMS), its applications, and key transformations from file systems to databases, emphasizing the reduction of redundancy and improved data management. The chapter also outlines key concepts in DBMS, such as database schema, data constraints, and queries.

Uploaded by

jsamuels02001
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
779 views52 pages

Chapter 8 Database Concepts

Chapter 8 discusses database concepts, highlighting the inefficiencies of manual record-keeping and the advantages of electronic storage. It introduces the Database Management System (DBMS), its applications, and key transformations from file systems to databases, emphasizing the reduction of redundancy and improved data management. The chapter also outlines key concepts in DBMS, such as database schema, data constraints, and queries.

Uploaded by

jsamuels02001
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 52

M

O
H
A
M
M
ED
M
AT
H
EE
N
L
R
STUDENT NOTES || CHAPTER 8 DATABASE CONCEPTS April 23, 2025

Contents

LICENSE 3

CHAPTER 8 DATABASE CONCEPTS 4


CHAPTER NOTES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
8.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
8.2 File System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

R
8.3 Database Management System (DBMS) . . . . . . . . . . . . . . . . . . . . . . . . 6
8.4 Relational Data Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10

L
8.5 Keys in a Relational Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

N
Summary of Chapter 8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Summary of Key Terms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

EE
MULTIPLE CHOICE QUESTIONS (MCQs) 14

FILL IN THE BLANKS


H 34
AT
2 MARKS QUESTIONS 35
M

3 MARKS QUESTIONS 39

5 MARKS QUESTIONS 42
ED

CHAPTER END EXERCISES 46


M
M
A
H
O
M

L R MOHAMMED MATHEEN M.C.A., M.A., B.ED., UGC NET.,


LECTURER, PRIMUS PU COLLEGE, BANGALORE - 560 035
2
STUDENT NOTES || CHAPTER 8 DATABASE CONCEPTS April 23, 2025

LICENSE

This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivs 4.0 Interna-
tional License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/ or
send a letter to Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.

“Karnataka Second PUC Computer Science Study Material / Student Notes” by L R Mohammed Matheen
is licensed under CC BY-NC-ND 4.0.

R
L
N
Figure 1: Licence

EE
This work is licensed under the Creative Commons Attribution-NonCommercial-NoDerivs 4.0 Interna-
tional License.

H
Portions of this work may include material under separate copyright. These materials are not covered by
AT
this Creative Commons license and are used by permission or under applicable copyright exceptions.

This book is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 4.0 Interna-


M

tional License.
ED
M
M
A
H
O
M

L R MOHAMMED MATHEEN M.C.A., M.A., B.ED., UGC NET.,


LECTURER, PRIMUS PU COLLEGE, BANGALORE - 560 035
3
STUDENT NOTES || CHAPTER 8 DATABASE CONCEPTS April 23, 2025

CHAPTER 8 DATABASE CONCEPTS

CHAPTER NOTES

8.1 Introduction

Manual record-keeping systems are inefficient and prone to errors. Consider a teacher manually recording
attendance for 50 students over 26 working days: that results in 1,300 manual entries monthly!

R
L
Limitations of Manual Record-Keeping

1. Rewriting student details across records introduces chances of error.

N
2. Data redundancy and inconsistency due to repeated entries.

EE
3. Difficulty in modifying or retrieving information.
4. Risk of physical damage/loss.
5. Error-prone calculations.
H
AT
Why Move to Electronic Storage?
M

• Easy copying and promotion of records.


• Efficient search, update, and deletion.
• Better management via computerised data files.
ED
M

8.2 File System


M
A

A file is a container on a computer to store data like text, code, images, videos, CSVs, etc.
H

Example: Two Data Files


O

• STUDENT
M

• ATTENDANCE

Table 8.1 — STUDENT File Maintained by Office Staff

L R MOHAMMED MATHEEN M.C.A., M.A., B.ED., UGC NET.,


LECTURER, PRIMUS PU COLLEGE, BANGALORE - 560 035
4
STUDENT NOTES || CHAPTER 8 DATABASE CONCEPTS April 23, 2025

Roll
Number SName SDateofBirth GName GPhone GAddress

1 Atharv 2003-05- Amit Ahuja 5711492685 G-35, Ashok Vihar, Delhi


Ahuja 15
2 Daizy 2002-02- Baichung 7110047139 Flat no. 5, Darjeeling Appt.,
Bhutia 28 Bhutia Shimla

R
3 Taleem 2002-02- Himanshu 9818184855 26/77, West Patel Nagar,
Shah 28 Shah Ahmedabad

L
4 John 2003-08- Danny — S -13, Ashok Village, Daman

N
Dsouza 18 Dsouza
5 Ali Shah 2003-07- Himanshu 9818184855 26/77, West Patel Nagar,

EE
05 Shah Ahmedabad
6 Manika P. 2002-03- Sujata P. 7802983674 HNO-13, B- block, Preet Vihar,
10
H Madurai
AT
M

Table 8.2 — ATTENDANCE File Maintained by Class Teacher

AttendanceDate RollNumber SName AttendanceStatus


ED

2018-09-01 1 Atharv Ahuja P


M

2018-09-01 2 Daizy Bhutia P


2018-09-01 3 Taleem Shah A
M

2018-09-01 4 John Dsouza P


A

2018-09-01 5 Ali Shah A


H

2018-09-01 6 Manika P. P
O

2018-09-02 1 Atharv Ahuja P


M

2018-09-02 2 Daizy Bhutia P


2018-09-02 3 Taleem Shah A
2018-09-02 4 John Dsouza A
2018-09-02 5 Ali Shah P
2018-09-02 6 Manika P. P

L R MOHAMMED MATHEEN M.C.A., M.A., B.ED., UGC NET.,


LECTURER, PRIMUS PU COLLEGE, BANGALORE - 560 035
5
STUDENT NOTES || CHAPTER 8 DATABASE CONCEPTS April 23, 2025

8.2.1 Limitations of File System

Problem Description

Difficulty in Access Application programs required for


data retrieval.

R
Data Redundancy Same data (e.g., guardian names)

L
repeated.

N
Data Inconsistency Inconsistent updates across files.

EE
Data Isolation No link/mapping between files.
Data Dependence Program changes needed when
structure changes.
Controlled Data Sharing H Difficult to manage user access levels.
AT
M
ED

8.3 Database Management System (DBMS)

A DBMS is software to store, manage, and retrieve logically related data efficiently.
M
M

Common DBMS Software:

• MySQL
A

• Oracle
H

• PostgreSQL
• SQL Server
O

• MS Access
M

• MongoDB

Table 8.3 — Use of Database in Real-Life Applications

L R MOHAMMED MATHEEN M.C.A., M.A., B.ED., UGC NET.,


LECTURER, PRIMUS PU COLLEGE, BANGALORE - 560 035
6
STUDENT NOTES || CHAPTER 8 DATABASE CONCEPTS April 23, 2025

Application Database Maintains Information About

Banking Customer, Account, Loans, Transactions


Crop Loan Farmer info, land, credit card, repayment
Inventory Management Products, orders, customers
Organisation Resources Employee, salary, department, branches

R
Online Shopping Items, users, preferences

L
File System to DBMS: Key Transformations

N
• Remove duplicated columns.

EE
• Split STUDENT table and creating another GUARDIAN table.

• Introduce GUID (Guardian ID).


H
AT
• Originally, the STUDENT file contained guardian information, which was repeated for students
having the same guardian (e.g., siblings).
M

• By splitting the STUDENT file and creating a separate GUARDIAN table (linked using GUID),
the DBMS design removed redundancy.
ED

• Similarly, removing the student name from ATTENDANCE and linking it via RollNumber estab-
lished a clean reference.
M

Figure 8.1 — Record Structure in DBMS


M

STUDENT GUARDIAN ATTENDANCE


A

-------- -------- -----------


RollNumber GUID AttendanceDate
H

SName GName RollNumber


O

SDateofBirth GPhone AttendanceStatus


M

GUID GAddress

Table 8.4 — Snapshot of STUDENT Table

L R MOHAMMED MATHEEN M.C.A., M.A., B.ED., UGC NET.,


LECTURER, PRIMUS PU COLLEGE, BANGALORE - 560 035
7
STUDENT NOTES || CHAPTER 8 DATABASE CONCEPTS April 23, 2025

RollNumber SName SDateofBirth GUID

1 Atharv Ahuja 2003-05-15 444444444444


2 Daizy Bhutia 2002-02-28 111111111111
3 Taleem Shah 2002-02-28
4 John Dsouza 2003-08-18 333333333333

R
5 Ali Shah 2003-07-05 101010101010
6 Manika P. 2002-03-10 466444444666

L
N
Table 8.5 — Snapshot of GUARDIAN Table

EE
GUID GName GPhone GAddress

444444444444 Amit Ahuja 5711492685 H G-35, Ashok Vihar, Delhi


AT
111111111111 Baichung Bhutia 7110047139 Flat no. 5, Darjeeling Appt., Shimla
101010101010 Himanshu Shah 9818184855 26/77, West Patel Nagar, Ahmedabad
M

333333333333 Danny Dsouza — S -13, Ashok Village, Daman


ED

466444444666 Sujata P. 7802983674 HNO-13, B- block, Preet Vihar, Madurai


M

Table 8.6 — Snapshot of ATTENDANCE Table


M

Date RollNumber Status


A

2018-09-01 1 P
H

2018-09-01 2 P
O

2018-09-01 3 A
M

2018-09-01 4 P
2018-09-01 5 A
2018-09-01 6 P
2018-09-02 1 P
2018-09-02 2 P

L R MOHAMMED MATHEEN M.C.A., M.A., B.ED., UGC NET.,


LECTURER, PRIMUS PU COLLEGE, BANGALORE - 560 035
8
STUDENT NOTES || CHAPTER 8 DATABASE CONCEPTS April 23, 2025

Date RollNumber Status

2018-09-02 3 A
2018-09-02 4 A
2018-09-02 5 P
2018-09-02 6 P

R
L
Figure 8.2 — STUDENTATTENDANCE DBMS Environment

N
+---------------------+ +---------------------+
| Teacher | | Office Staff |

EE
+----------+----------+ +----------+----------+
| |
v v
H
AT
+-------------------------------------------+
| DBMS Software |
+-------------------------------------------+
M

| | |
v v v
ED

Student Guardian Attendance


^ ^ ^
+-----------+-----------+
M

|
M

Database Catalog
A

Key Concepts in DBMS


H
O

Concept Description
M

Database Schema Structure of the database including table names, attributes, and constraints
Data Constraint Conditions imposed on values of attributes (e.g., NOT NULL, UNIQUE)
Meta-data Data about the data; includes schema and constraints
Database Instance Current snapshot of the data in the database
Query Request for accessing/manipulating data in the DBMS

L R MOHAMMED MATHEEN M.C.A., M.A., B.ED., UGC NET.,


LECTURER, PRIMUS PU COLLEGE, BANGALORE - 560 035
9
STUDENT NOTES || CHAPTER 8 DATABASE CONCEPTS April 23, 2025

Concept Description

Data Manipulation Operations such as insert, update, delete


Database Engine Internal component that processes queries and manages storage

8.4 Relational Data Model

R
The relational model stores data in the form of tables (relations) made up of attributes (columns) and

L
tuples (rows).

N
Table 8.7 — Relation Schemas

EE
Relation Attributes

STUDENT
H
RollNumber, SName, SDateofBirth, GUID
AT
ATTENDANCE AttendanceDate, RollNumber, AttendanceStatus
GUARDIAN GUID, GName, GPhone, GAddress
M
ED

Common Terminologies

Term Meaning
M

Attribute A column in a relation


M

Tuple A row in a relation


A

Domain Set of permissible values for an attribute


H

Degree Number of attributes (columns) in a relation


O

Cardinality Number of tuples (rows) in a relation


M

Three Important Properties of a Relation

1. Properties of Attributes:

• Attribute names must be distinct.


• The order of attributes in a relation does not matter.

L R MOHAMMED MATHEEN M.C.A., M.A., B.ED., UGC NET.,


LECTURER, PRIMUS PU COLLEGE, BANGALORE - 560 035
10
STUDENT NOTES || CHAPTER 8 DATABASE CONCEPTS April 23, 2025

2. Properties of Tuples:

• All tuples (rows) in a relation must be unique.


• The order of tuples in a relation does not matter.

3. Properties of Values:

• Every value in a tuple must be atomic (indivisible).


• Values may be NULL to represent missing or unknown information.

R
• All values in a column must be from the same domain.

L
Figure 8.4 — Relation GUARDIAN Example

N
GUID GName GPhone GAddress

EE
444444444444 Amit Ahuja 5711492685 G-35, Ashok Vihar, Delhi
111111111111 Baichung Bhutia 7110047139
H Flat no. 5, Darjeeling Appt., Shimla
AT
101010101010 Himanshu Shah 9818184855 26/77, West Patel Nagar, Ahmedabad
333333333333 Danny Dsouza — S -13, Ashok Village, Daman
M

466444444666 Sujata P. 7802983674 HNO-13, B- block, Preet Vihar, Madurai


ED

Degree = 4 (columns), Cardinality = 5 (rows)


M
M

8.5 Keys in a Relational Database


A

Keys help uniquely identify records and maintain relationships.


H
O

8.5.1 Candidate Key


M

• Any attribute (or combination) that can uniquely identify a tuple.


• Example: GUID, GPhone in GUARDIAN.

8.5.2 Primary Key

• Chosen candidate key to uniquely identify rows.


• Example: GUID in GUARDIAN table.

L R MOHAMMED MATHEEN M.C.A., M.A., B.ED., UGC NET.,


LECTURER, PRIMUS PU COLLEGE, BANGALORE - 560 035
11
STUDENT NOTES || CHAPTER 8 DATABASE CONCEPTS April 23, 2025

8.5.3 Composite Primary Key

• A key formed by combining two or more attributes.


• Example: {RollNumber, AttendanceDate} in ATTENDANCE.

8.5.4 Foreign Key

• Attribute that refers to a primary key in another table.


• Used to link two tables.

R
L
Figure 8.5 — STUDENTATTENDANCE Schema Diagram

N
+-------------------------------+

EE
| STUDENT |
|-------------------------------|
| RollNumber (PK) |
| SName |
H
AT
| SDateofBirth |
| GUID (FK → GUARDIAN.GUID) |
M

+-------------------------------+

|
ED

+-------------------------------+
| GUARDIAN |
M

|-------------------------------|
| GUID (PK) |
M

| GName |
| GPhone |
A

| GAddress |
H

+-------------------------------+

O

|
M

+-------------------------------+
| ATTENDANCE |
|-------------------------------|
| AttendanceDate |
| RollNumber (FK → STUDENT) |
| AttendanceStatus |
| (PK = RollNumber + Date) |

L R MOHAMMED MATHEEN M.C.A., M.A., B.ED., UGC NET.,


LECTURER, PRIMUS PU COLLEGE, BANGALORE - 560 035
12
STUDENT NOTES || CHAPTER 8 DATABASE CONCEPTS April 23, 2025

+-------------------------------+

Summary of Chapter 8

• Manual file systems are inefficient and lead to redundancy.

R
• DBMS manages data efficiently, with support for querying and concurrent access.
• The relational model uses tables linked via keys.

L
• Primary keys uniquely identify rows; foreign keys link tables.
• All data is stored in atomic form with defined schemas and constraints.

N
EE
Summary of Key Terms
H
AT
Term Explanation
M

File Container to store digital data like text,


audio, code, etc.
ED

DBMS Software that manages storage, access,


manipulation, and retrieval of data.
M

Database Organized collection of logically related


data.
M

Schema Structure of a database including tables,


A

attributes, and constraints.


H

Instance Current snapshot or state of data in a


database.
O

Attribute A column in a table representing a data


M

field.
Tuple A row in a table representing a single
record.
Domain Permissible set of values for an attribute.

L R MOHAMMED MATHEEN M.C.A., M.A., B.ED., UGC NET.,


LECTURER, PRIMUS PU COLLEGE, BANGALORE - 560 035
13
STUDENT NOTES || CHAPTER 8 DATABASE CONCEPTS April 23, 2025

Term Explanation

Degree Number of attributes (columns) in a


table.
Cardinality Number of records (rows) in a table.
Primary Key Attribute(s) that uniquely identify each
tuple in a relation.

R
Candidate Key Attributes that qualify to be primary key.

L
Alternate Key Candidate key not chosen as primary
key.

N
Composite Key A primary key made up of multiple

EE
attributes.
Foreign Key Attribute referring to a primary key in

H another table.
AT
Query Request to retrieve or manipulate data in
the database.
M

Constraint Condition or rule enforced on data to


maintain integrity.
ED

Meta-data Data that describes other data (e.g.,


schema, constraints).
M

Atomic Value Single indivisible value in a data field.


NULL Special value indicating missing or
M

unknown data.
A

Database Engine Core service that processes database


H

queries and manages storage.


Data Manipulation Operations such as INSERT, UPDATE,
O

DELETE performed on data.


M

MULTIPLE CHOICE QUESTIONS (MCQs)

1. What is the main purpose of a database management system (DBMS)?


A. Drawing graphs

L R MOHAMMED MATHEEN M.C.A., M.A., B.ED., UGC NET.,


LECTURER, PRIMUS PU COLLEGE, BANGALORE - 560 035
14
STUDENT NOTES || CHAPTER 8 DATABASE CONCEPTS April 23, 2025

B. Compiling code
C. Storing and managing data
D. Editing images
Answer: C
Explanation: DBMS is software that allows users to create, manage, and access databases for efficient
data handling.

R
L
2. In manual record-keeping, which of the following is a major disadvantage?
A. Costly software

N
B. Inconsistent handwriting

EE
C. Redundancy and inaccuracy
D. Online data sharing
Answer: C

H
Explanation: Manual systems often duplicate data and introduce errors, making them unreliable.
AT
M

3. Which component of a database is used to store records about events such as student attendance?
A. Entity B. Relation C. Schema D. Constraint Answer: B Explanation: A relation (or table) is used to
ED

store records like attendance, marks, etc.


M
M

4. What does ‘data redundancy’ mean?


A. Missing values
A

B. Use of online databases


H

C. Repetition of the same data in multiple files


D. Use of digital files
O

Answer: C
M

Explanation: Redundancy refers to duplication of data, which wastes space and may cause inconsis-
tency.

5. Which of the following is NOT a limitation of the file system?


A. Data isolation

L R MOHAMMED MATHEEN M.C.A., M.A., B.ED., UGC NET.,


LECTURER, PRIMUS PU COLLEGE, BANGALORE - 560 035
15
STUDENT NOTES || CHAPTER 8 DATABASE CONCEPTS April 23, 2025

B. Data independence
C. Data consistency
D. Controlled data sharing
Answer: C
Explanation: Data consistency is a goal, not a limitation. File systems often lack consistency.

R
6. Which attribute connects STUDENT and GUARDIAN tables in DBMS?

L
A. RollNumber
B. GName

N
C. GUID

EE
D. GPhone
Answer: C
Explanation: GUID (Guardian ID) is used as a foreign key in the STUDENT table to reference the
GUARDIAN table.
H
AT
M

7. Which of these is a benefit of DBMS over a file system?


ED

A. Redundancy increases
B. Harder to access
C. Better data integrity
M

D. Data stored manually


Answer: C
M

Explanation: DBMS enforces constraints and structure, which improves the accuracy and consistency
A

of data.
H
O
M

8. What type of value is considered ‘atomic’?


A. A null value
B. A unique identifier
C. An indivisible value
D. A composite key
Answer: C
Explanation: An atomic value cannot be broken down further — it’s the smallest unit of data in a field.

L R MOHAMMED MATHEEN M.C.A., M.A., B.ED., UGC NET.,


LECTURER, PRIMUS PU COLLEGE, BANGALORE - 560 035
16
STUDENT NOTES || CHAPTER 8 DATABASE CONCEPTS April 23, 2025

9. Which of these is a data constraint?


A. Variable naming
B. Data formats
C. NOT NULL
D. Query syntax
Answer: C

R
Explanation: Constraints like NOT NULL restrict the kind of data a column can accept.

L
N
EE
10. A schema defines:
A. The table rows
B. The data inside a table
C. The structure of a database
H
AT
D. The speed of transactions
Answer: C
Explanation: A schema outlines tables, columns, data types, and relationships — the blueprint of a
M

database.
ED
M

11. What is meta-data in a database system?


A. Summary table
M

B. Data about the data


C. A type of primary key
A

D. Redundant data
H

Answer: B
Explanation: Meta-data is stored in the database catalog and includes table structure, constraints, etc.
O
M

12. Which one is NOT a component of a relational database model?


A. Attribute
B. Table
C. Diagram
D. Tuple

L R MOHAMMED MATHEEN M.C.A., M.A., B.ED., UGC NET.,


LECTURER, PRIMUS PU COLLEGE, BANGALORE - 560 035
17
STUDENT NOTES || CHAPTER 8 DATABASE CONCEPTS April 23, 2025

Answer: C
Explanation: Diagrams may help visualize a database, but they are not core components like attributes
and tuples.

13. Which operation is not considered part of data manipulation?

R
A. Insert
B. Update

L
C. Schema creation
D. Delete

N
Answer: C

EE
Explanation: Creating a schema is a design task, not data manipulation. Data manipulation refers to
modifying records.

14. What does the term ‘database instance’ refer to?


A. The original schema H
AT
B. A table definition
C. A snapshot of the data at a particular time
M

D. A type of user account


Answer: C
ED

Explanation: A database instance represents the actual content of the database at a particular point in
time.
M
M

15. Which of the following statements is true for relational databases?


A

A. Tables are isolated


H

B. Tuples must be unique


C. Attributes may have different domains in one table
O

D. Rows are stored in hierarchical order


M

Answer: B
Explanation: Each tuple (row) in a relational table must be distinct to maintain data integrity.

16. Which key refers to a primary key from another table?


A. Alternate key
B. Candidate key
C. Foreign key
D. Composite key

L R MOHAMMED MATHEEN M.C.A., M.A., B.ED., UGC NET.,


LECTURER, PRIMUS PU COLLEGE, BANGALORE - 560 035
18
STUDENT NOTES || CHAPTER 8 DATABASE CONCEPTS April 23, 2025

Answer: C
Explanation: A foreign key is an attribute in one table that links to the primary key in another, establish-
ing relationships.

17. GUID in the GUARDIAN table is an example of:

R
A. Foreign key
B. Candidate key

L
C. Alternate key
D. Composite key

N
Answer: B

EE
Explanation: GUID is a unique value in GUARDIAN and can be used to uniquely identify records,
making it a candidate key.

H
AT
18. Which of the following is NOT stored in the meta-data (catalog)?
M

A. Table structure
B. Constraints
ED

C. Data records
D. Data types
Answer: C
M

Explanation: Meta-data stores the definitions and structure of data, not the actual content of records.
M
A

19. A tuple is:


H

A. A unique column name


O

B. A data file
M

C. A row in a table
D. A type of schema
Answer: C
Explanation: Each row in a table is called a tuple and represents one record in the relation.

L R MOHAMMED MATHEEN M.C.A., M.A., B.ED., UGC NET.,


LECTURER, PRIMUS PU COLLEGE, BANGALORE - 560 035
19
STUDENT NOTES || CHAPTER 8 DATABASE CONCEPTS April 23, 2025

20. In a relation, the number of columns is known as:


A. Tuple
B. Degree
C. Cardinality
D. Attribute
Answer: B
Explanation: Degree is the number of attributes (columns) in a relation.

R
L
21. What does the term ‘cardinality’ refer to in databases?

N
A. Number of columns
B. Number of unique values

EE
C. Number of rows
D. Type of key used
Answer: C
H
AT
Explanation: Cardinality refers to the number of tuples (rows) in a table.
M

22. What type of primary key does the ATTENDANCE table use?
ED

A. Single attribute
B. Alternate key
C. Composite key
M

D. Unique constraint
Answer: C
M

Explanation: ATTENDANCE uses a composite key — RollNumber + AttendanceDate — to uniquely


A

identify each record.


H
O

23. Which combination is used as a composite primary key in ATTENDANCE?


M

A. RollNumber and GName


B. RollNumber and AttendanceDate
C. RollNumber and SName
D. GUID and GName
Answer: B
Explanation: A student’s attendance on a particular date is uniquely identified by both their RollNumber
and AttendanceDate.

L R MOHAMMED MATHEEN M.C.A., M.A., B.ED., UGC NET.,


LECTURER, PRIMUS PU COLLEGE, BANGALORE - 560 035
20
STUDENT NOTES || CHAPTER 8 DATABASE CONCEPTS April 23, 2025

24. A primary key must be:


A. NULL
B. Repetitive
C. Unique and NOT NULL
D. From a foreign table
Answer: C

R
Explanation: Primary keys ensure the uniqueness of each tuple and cannot have NULL values.

L
N
EE
25. A student record showing multiple preferences in one field violates:
A. Domain integrity
B. Entity integrity
C. Atomicity
H
AT
D. Cardinality
Answer: C
Explanation: Each field must hold a single atomic (indivisible) value. Multiple values in one field
M

violate this.
ED
M

26. What happens if a file’s structure is changed in a file system?


A. Nothing changes
M

B. The application automatically updates


C. Old applications may not work correctly
A

D. File size reduces


H

Answer: C
Explanation: In file systems, applications are dependent on the file structure. Changing it may break
O

them.
M

27. The ability to limit access to data in DBMS is called:


A. Querying
B. Role sharing
C. Controlled data sharing

L R MOHAMMED MATHEEN M.C.A., M.A., B.ED., UGC NET.,


LECTURER, PRIMUS PU COLLEGE, BANGALORE - 560 035
21
STUDENT NOTES || CHAPTER 8 DATABASE CONCEPTS April 23, 2025

D. Tuple isolation
Answer: C
Explanation: DBMS allows certain users to access only specific parts of data based on their roles.

28. Which DBMS feature allows data changes over time?

R
A. Static schema
B. Database instance

L
C. Meta-data
D. Query cache

N
Answer: B

EE
Explanation: A database instance is the actual data at a point in time and changes as insertions or dele-
tions happen.

H
AT
29. In a well-designed relational database, redundancy is minimized by:
M

A. Adding repeated columns


B. Storing all data in one table
ED

C. Separating related data into different tables


D. Copying data across tables
Answer: C
M

Explanation: DBMS uses normalization to separate data into related tables and remove redundancy.
M
A

30. What is the purpose of a query in DBMS?


H

A. Design the database


O

B. Delete the database


M

C. Retrieve or manipulate data


D. Backup records
Answer: C
Explanation: A query is a command used to get, insert, update, or delete data from a database.

31. A database engine is:


A. A type of hardware
B. Used for reporting

L R MOHAMMED MATHEEN M.C.A., M.A., B.ED., UGC NET.,


LECTURER, PRIMUS PU COLLEGE, BANGALORE - 560 035
22
STUDENT NOTES || CHAPTER 8 DATABASE CONCEPTS April 23, 2025

C. Underlying component that processes queries


D. A manual entry tool
Answer: C
Explanation: The database engine is the core software module that stores, retrieves, and manipulates
data based on queries.

R
32. In relational databases, what does the term “degree” refer to? A. Number of rows B. Number
of keys C. Number of columns D. Number of schemas Answer: C Explanation: The degree of a

L
relation refers to the total number of attributes (columns) it contains. —

N
33. NULL is used to represent:

EE
A. Duplicate values
B. Unknown or inapplicable data
C. Redundant values
D. Negative numbers H
AT
Answer: B
Explanation: NULL represents a missing, unknown, or inapplicable value in a database column.
M
ED

34. The domain of an attribute defines: A. The speed of access B. The formatting style of rows C. The
set of valid values for that attribute D. The number of foreign keys in a table Answer: C Explanation: A
M

domain restricts what values an attribute can have — such as integer, date, or string.
M
A
H

35. Which of the following fields is NOT typically stored in a business-oriented database? A. Cus-
tomer details B. Employee records C. Product pricing D. Color scheme of the website Answer: D Ex-
O

planation: Visual elements like color schemes are not usually stored in transactional databases.
M

36. A set of fields that uniquely identifies a row is called a:


A. Schema
B. Query
C. Key

L R MOHAMMED MATHEEN M.C.A., M.A., B.ED., UGC NET.,


LECTURER, PRIMUS PU COLLEGE, BANGALORE - 560 035
23
STUDENT NOTES || CHAPTER 8 DATABASE CONCEPTS April 23, 2025

D. Constraint
Answer: C
Explanation: A key (such as a primary key) is used to uniquely identify a tuple in a relation.

37. In a relational database, a foreign key is used to: A. Automatically generate queries B. Identify
duplicate records C. Link records in two related tables D. Enforce data encryption Answer: C Explana-

R
tion: A foreign key establishes a connection between records in different tables.

L
N
38. Which of the following is considered a data manipulation operation?

EE
A. Designing a schema
B. Inserting a new record
C. Creating a table
D. Enforcing constraints H
AT
Answer: B
Explanation: Insertion is one of the core data manipulation tasks in a DBMS.
M
ED

39. Which of the following is NOT a data manipulation operation?


A. Insert
M

B. Delete
C. Update
M

D. Creating a table
A

Answer: D
Explanation: Creating a table is part of data definition, not manipulation.
H
O
M

40. What is the function of the NOT NULL constraint in a database?


A. It allows multiple values
B. Ensures the attribute must always have a value
C. Prevents duplicate rows
D. Makes a key composite
Answer: B
Explanation: NOT NULL ensures that a field must always contain a value — it cannot be left empty.

L R MOHAMMED MATHEEN M.C.A., M.A., B.ED., UGC NET.,


LECTURER, PRIMUS PU COLLEGE, BANGALORE - 560 035
24
STUDENT NOTES || CHAPTER 8 DATABASE CONCEPTS April 23, 2025

41. Which of the following supports logical organization of data?


A. File System
B. Operating System
C. Database Schema
D. Data Dictionary
Answer: C

R
Explanation: A schema logically organizes data by defining tables, fields, and relationships.

L
N
42. Which DBMS type is listed in the textbook as open-source?

EE
A. Oracle
B. SQL Server
C. PostgreSQL
D. MS Access H
AT
Answer: C
Explanation: PostgreSQL is one of the open-source DBMS examples given in the chapter.
M
ED

43. Which technique is used in DBMS to avoid data inconsistency?


A. File backups
M

B. Repetitive data entry


C. Data normalization and schema design
M

D. Ignoring updates
A

Answer: C
Explanation: Good database design, including normalization, reduces redundancy and inconsistency.
H
O
M

44. Relationships between tables in a DBMS are created using:


A. Primary Keys
B. Constraints
C. Foreign Keys
D. Data files
Answer: C
Explanation: Foreign keys link one table to another by referencing a primary key.

L R MOHAMMED MATHEEN M.C.A., M.A., B.ED., UGC NET.,


LECTURER, PRIMUS PU COLLEGE, BANGALORE - 560 035
25
STUDENT NOTES || CHAPTER 8 DATABASE CONCEPTS April 23, 2025

45. Redundant data can lead to:


A. Faster performance
B. Data inconsistency
C. Better backups
D. Easier file access
Answer: B

R
Explanation: Redundancy means storing the same data in multiple places, which may get out of sync

L
and cause inconsistency.

N
EE
46. Which rule applies to attributes in a relational table?
A. They must be composite
B. They must all have NULL values
H
AT
C. They must have unique names
D. They must be stored in alphabetical order
Answer: C
M

Explanation: In a relation, every attribute (column) must have a unique name.


ED
M

47. To uniquely identify each student’s attendance on a particular day, DBMS uses:
A. Multiple tables
M

B. Student name
C. Composite primary key
A

D. Guardian name
H

Answer: C
Explanation: A combination of RollNumber and AttendanceDate forms a composite key in the ATTEN-
O

DANCE table.
M

48. Which of the following lets you specify rules on a column?


A. Table view
B. Meta-data
C. Constraint

L R MOHAMMED MATHEEN M.C.A., M.A., B.ED., UGC NET.,


LECTURER, PRIMUS PU COLLEGE, BANGALORE - 560 035
26
STUDENT NOTES || CHAPTER 8 DATABASE CONCEPTS April 23, 2025

D. Query
Answer: C
Explanation: Constraints like NOT NULL, UNIQUE, and CHECK are applied to columns to enforce
rules.

R
49. A student record (row) in the STUDENT table is an example of:
A. Attribute

L
B. Tuple
C. Schema

N
D. Key

EE
Answer: B
Explanation: Each row of a table is called a tuple in relational databases.

H
AT
50. Which feature ensures correctness and reliability of database content?
M

A. Tuples
B. SQL
ED

C. Constraints
D. Domains
Answer: C
M

Explanation: Constraints enforce rules on data, ensuring accuracy, consistency, and reliability.
M

51.
Assertion (A): A database schema defines the structure of a database.
A

Reason (R): Schema stores actual data records.


H

A. Both A and R are true, and R is the correct explanation of A


B. Both A and R are true, but R is not the correct explanation of A
O

C. A is true, but R is false


M

D. A is false, but R is true


Answer: C
Explanation: Schema defines the organization (not the content) of a database. Data is stored in the
instance.

L R MOHAMMED MATHEEN M.C.A., M.A., B.ED., UGC NET.,


LECTURER, PRIMUS PU COLLEGE, BANGALORE - 560 035
27
STUDENT NOTES || CHAPTER 8 DATABASE CONCEPTS April 23, 2025

52.
Assertion (A): In a relational database, each attribute must have a unique name.
Reason (R): Unique attribute names help avoid ambiguity during data manipulation.
A. Both A and R are true, and R is the correct explanation of A
B. Both A and R are true, but R is not the correct explanation of A
C. A is true, but R is false
D. A is false, but R is true
Answer: A

R
Explanation: Unique column names ensure clarity in queries and prevent confusion during joins or

L
selections.

N
EE
53.
Assertion (A): A primary key must be unique and NOT NULL.

H
Reason (R): A primary key is used to link data between unrelated databases.
AT
A. Both A and R are true, and R is the correct explanation of A
B. Both A and R are true, but R is not the correct explanation of A
C. A is true, but R is false
M

D. A is false, but R is true


Answer: C
ED

Explanation: Primary keys ensure uniqueness within a table; they don’t link across unrelated
databases.
M
M

54.
A

Assertion (A): A foreign key is an attribute that helps relate two tables.
H

Reason (R): A foreign key always references the primary key of another table.
O

A. Both A and R are true, and R is the correct explanation of A


B. Both A and R are true, but R is not the correct explanation of A
M

C. A is true, but R is false


D. A is false, but R is true
Answer: A
Explanation: Foreign keys enforce referential integrity by referencing a primary key from another ta-
ble.

L R MOHAMMED MATHEEN M.C.A., M.A., B.ED., UGC NET.,


LECTURER, PRIMUS PU COLLEGE, BANGALORE - 560 035
28
STUDENT NOTES || CHAPTER 8 DATABASE CONCEPTS April 23, 2025

55.
Assertion (A): A composite primary key is made using more than one attribute.
Reason (R): Composite keys are used when no single attribute can uniquely identify records.
A. Both A and R are true, and R is the correct explanation of A
B. Both A and R are true, but R is not the correct explanation of A
C. A is true, but R is false
D. A is false, but R is true
Answer: A

R
Explanation: Composite keys are necessary when one column alone is not enough to ensure unique-

L
ness.

N
EE
56.
Assertion (A): File systems provide strong data consistency across multiple files.

H
Reason (R): File systems automatically update redundant data when a change is made.
AT
A. Both A and R are true, and R is the correct explanation of A
B. Both A and R are true, but R is not the correct explanation of A
M

C. A is true, but R is false


D. A is false, and R is false
Answer: D
ED

Explanation: File systems suffer from inconsistency because they do not manage linked data centrally.
M
M

57.
A

Assertion (A): Constraints in DBMS ensure data integrity.


Reason (R): Constraints allow only valid data to be stored in the database.
H

A. Both A and R are true, and R is the correct explanation of A


O

B. Both A and R are true, but R is not the correct explanation of A


C. A is true, but R is false
M

D. A is false, but R is true


Answer: A
Explanation: Constraints like NOT NULL, UNIQUE, and FOREIGN KEY maintain correctness of
data.

L R MOHAMMED MATHEEN M.C.A., M.A., B.ED., UGC NET.,


LECTURER, PRIMUS PU COLLEGE, BANGALORE - 560 035
29
STUDENT NOTES || CHAPTER 8 DATABASE CONCEPTS April 23, 2025

58.
Assertion (A): A field storing multiple values in one cell improves query speed.
Reason (R): Relational databases allow non-atomic values for flexibility.
A. Both A and R are true, and R is the correct explanation of A
B. Both A and R are true, but R is not the correct explanation of A
C. A is true, but R is false
D. A is false, and R is false
Answer: D

R
Explanation: Relational databases enforce atomicity — only one value per field. Non-atomic data makes

L
queries harder.

N
EE
59.
Assertion (A): The domain of an attribute defines the allowed values for that attribute.

H
Reason (R): Domain helps ensure that data stored in a column is valid.
AT
A. Both A and R are true, and R is the correct explanation of A
B. Both A and R are true, but R is not the correct explanation of A
C. A is true, but R is false
M

D. A is false, but R is true


Answer: A
ED

Explanation: Domain constraints prevent the entry of invalid data like letters in numeric columns.
M

60.
M

Assertion (A): All candidate keys are automatically selected as primary keys.
A

Reason (R): Candidate keys are eligible to become primary keys.


A. Both A and R are true, and R is the correct explanation of A
H

B. Both A and R are true, but R is not the correct explanation of A


O

C. A is false, but R is true


D. A is true, but R is false
M

Answer: C
Explanation: Only one candidate key is chosen as the primary key; the rest are alternate keys.

61.
Assertion (A): Metadata contains information about database structure.

L R MOHAMMED MATHEEN M.C.A., M.A., B.ED., UGC NET.,


LECTURER, PRIMUS PU COLLEGE, BANGALORE - 560 035
30
STUDENT NOTES || CHAPTER 8 DATABASE CONCEPTS April 23, 2025

Reason (R): Metadata helps the DBMS validate queries and enforce constraints.
A. Both A and R are true, and R is the correct explanation of A
B. Both A and R are true, but R is not the correct explanation of A
C. A is false, but R is true
D. A is true, but R is false
Answer: A
Explanation: Metadata includes schema details and supports operations like query execution and vali-
dation.

R
L
N
62.

EE
Assertion (A): Cardinality of a relation refers to the number of columns in the table.
Reason (R): Columns represent the attributes of a relation.
A. Both A and R are true, and R is the correct explanation of A

H
B. Both A and R are true, but R is not the correct explanation of A
AT
C. A is false, but R is true
D. A is true, but R is false
Answer: C
M

Explanation: Cardinality is the number of rows. The number of columns is called the degree.
ED
M

63.
Assertion (A): Normalization removes data redundancy.
M

Reason (R): Redundant data may lead to data inconsistency.


A. Both A and R are true, and R is the correct explanation of A
A

B. Both A and R are true, but R is not the correct explanation of A


H

C. A is true, but R is false


D. A is false, but R is true
O

Answer: A
M

Explanation: Normalization breaks data into logical pieces to reduce repetition and inconsistency.

64.
Assertion (A): The NOT NULL constraint prevents NULL entries in a column.
Reason (R): It ensures that every row has a value in that column.

L R MOHAMMED MATHEEN M.C.A., M.A., B.ED., UGC NET.,


LECTURER, PRIMUS PU COLLEGE, BANGALORE - 560 035
31
STUDENT NOTES || CHAPTER 8 DATABASE CONCEPTS April 23, 2025

A. Both A and R are true, and R is the correct explanation of A


B. Both A and R are true, but R is not the correct explanation of A
C. A is true, but R is false
D. A is false, but R is true
Answer: A
Explanation: NOT NULL guarantees that no row can leave that field blank.

R
L
65.
Assertion (A): DBMS allows multiple users to interact with the same data concurrently.

N
Reason (R): DBMS uses controlled data sharing and access permissions.

EE
A. Both A and R are true, and R is the correct explanation of A
B. Both A and R are true, but R is not the correct explanation of A
C. A is true, but R is false
D. A is false, but R is true
H
AT
Answer: A
Explanation: Concurrent data access is handled safely by DBMS using access control and isolation
techniques.
M
ED

66.
M

Assertion (A): The structure of a table can be modified using data manipulation queries.
Reason (R): Commands like ALTER and CREATE are part of data manipulation language.
M

A. Both A and R are true, and R is the correct explanation of A


B. Both A and R are true, but R is not the correct explanation of A
A

C. A is false, but R is true


H

D. A is true, but R is false


Answer: C
O

Explanation: Table structure is modified using DDL (not DML). ALTER and CREATE belong to
M

DDL.

67.
Assertion (A): DBMS helps reduce data inconsistency by storing data in one central location.
Reason (R): Centralized control and constraints ensure that all data updates remain consistent.

L R MOHAMMED MATHEEN M.C.A., M.A., B.ED., UGC NET.,


LECTURER, PRIMUS PU COLLEGE, BANGALORE - 560 035
32
STUDENT NOTES || CHAPTER 8 DATABASE CONCEPTS April 23, 2025

A. Both A and R are true, and R is the correct explanation of A


B. Both A and R are true, but R is not the correct explanation of A
C. A is true, but R is false
D. A is false, but R is true
Answer: A
Explanation: Central control ensures integrity and consistency across users and applications.

R
L
68.
Assertion (A): A database instance can change over time.

N
Reason (R): An instance represents the current snapshot of the data.

EE
A. Both A and R are true, and R is the correct explanation of A
B. Both A and R are true, but R is not the correct explanation of A
C. A is true, but R is false
D. A is false, but R is true
H
AT
Answer: A
Explanation: The instance reflects dynamic data — it evolves as records are added or changed.
M
ED

69.
Assertion (A): SQL allows users to retrieve, insert, and update data.
M

Reason (R): SQL is the standard language for managing relational databases.
A. Both A and R are true, and R is the correct explanation of A
M

B. Both A and R are true, but R is not the correct explanation of A


C. A is true, but R is false
A

D. A is false, but R is true


H

Answer: A
Explanation: SQL supports data manipulation and retrieval; it is the core language of DBMS interac-
O

tion.
M

70.
Assertion (A): Degree of a relation is defined by the number of attributes it contains.
Reason (R): Attributes define the structure of each record in a relation.
A. Both A and R are true, and R is the correct explanation of A

L R MOHAMMED MATHEEN M.C.A., M.A., B.ED., UGC NET.,


LECTURER, PRIMUS PU COLLEGE, BANGALORE - 560 035
33
STUDENT NOTES || CHAPTER 8 DATABASE CONCEPTS April 23, 2025

B. Both A and R are true, but R is not the correct explanation of A


C. A is false, but R is true
D. A is true, but R is false
Answer: A
Explanation: Degree = number of columns, and attributes (columns) define record structure.

FILL IN THE BLANKS

R
1. A __________ is a software used to create, manage, and manipulate a database. (Database Manage-

L
ment System)

N
2. The structure or design of a database, including table names, columns, and relationships, is called the

EE
__________. (Database Schema)

3. The actual data in a database at a particular point in time is called the __________. (Database In-
stance)
H
AT
4. A __________ is a column or set of columns that can uniquely identify a row in a table. (Candidate
Key)
M

5. Out of the candidate keys, the one selected to uniquely identify records is called the __________.
(Primary Key)
ED

6. A primary key that consists of more than one attribute is known as a __________. (Composite Primary
Key)
M

7. An attribute in one table that refers to the primary key in another table is called a __________. (Foreign
Key)
M

8. __________ refers to repeating the same data in multiple places, leading to wastage of space. (Data
A

Redundancy)
H

9. __________ happens when the same data in different places does not match. (Data Inconsistency)

10. The process of retrieving data from a database using specific commands is called __________.
O

(Querying)
M

11. The number of attributes in a relation is called its __________. (Degree)

12. The number of tuples or rows in a relation is called its __________. (Cardinality)

13. In relational databases, each column in a table is also known as an __________. (Attribute)

14. Each row in a relation or table is called a __________. (Tuple)

15. The set of allowed values for an attribute is called its __________. (Domain)

L R MOHAMMED MATHEEN M.C.A., M.A., B.ED., UGC NET.,


LECTURER, PRIMUS PU COLLEGE, BANGALORE - 560 035
34
STUDENT NOTES || CHAPTER 8 DATABASE CONCEPTS April 23, 2025

16. __________ are restrictions placed on data to ensure its accuracy and integrity. (Constraints)

17. The term __________ is used for data that describes other data. (Meta-data)

18. A value that represents missing or unknown data is called __________. (NULL)

19. The component that actually processes and manages queries in a DBMS is called the __________.
(Database Engine)

20. __________ is the ability to modify database content through insert, delete, and update operations.

R
(Data Manipulation)

21. A __________ is a collection of logically related data stored in structured format. (Database)

L
22. A __________ is a column that is a candidate key but not chosen as a primary key. (Alternate Key)

N
23. A DBMS allows data to be shared among multiple users with __________ access. (Controlled)

EE
24. In a relation, each attribute must contain __________ values only, which means it cannot be split
further. (Atomic)

H
25. One advantage of DBMS over file system is that it reduces data __________ and improves consis-
AT
tency. (Redundancy)

26. The __________ model is the most commonly used data model in relational databases. (Relational)
M

27. In relational databases, a __________ is used to request information from one or more tables.
(Query)
ED

28. A __________ ensures that each tuple in a relation is uniquely identifiable. (Primary Key)

29. Data stored in a central location and accessed by multiple users increases the risk of __________.
M

(Data Vulnerability)
M

30. In relational databases, the order of rows and columns is __________ to the relation’s structure.
(Irrelevant)
A
H

2 MARKS QUESTIONS
O
M

1. What is a database management system (DBMS)?


A database management system (DBMS) is a software that is used to create, manage, update/modify, and
retrieve data from a database. It serves as an interface between the database and end users or application
programs.

L R MOHAMMED MATHEEN M.C.A., M.A., B.ED., UGC NET.,


LECTURER, PRIMUS PU COLLEGE, BANGALORE - 560 035
35
STUDENT NOTES || CHAPTER 8 DATABASE CONCEPTS April 23, 2025

2. Define the term ‘Database Schema’.


Database Schema is the design or structure of a database. It includes table names, fields/columns, the
data types of each column, any constraints on the data, and relationships among the tables. It represents
the logical or visual architecture of the database.

R
3. What is meant by data redundancy in a file system?
Data redundancy means the same data is duplicated in different files or places. This occurs in file systems

L
when identical data, like student names or guardian information, is stored in multiple files, leading to
excess storage use and potential data inconsistency.

N
EE
4. State any two limitations of file systems.
(i) Data Redundancy – Same data is stored in multiple places.H
AT
(ii) Data Inconsistency – Different values for the same data in different files due to redundancy.
M
ED

5. Define metadata in the context of DBMS.


Metadata refers to data about data. It includes the database schema and constraints, stored by DBMS in
a database catalog or dictionary, describing the structure and rules of the data stored.
M
M
A

6. Differentiate between Database Schema and Database Instance.


H

Database Schema is the structure or blueprint of a database, showing how data is organized.
Database Instance is the snapshot of data in the database at a particular point in time.
O
M

7. What is meant by atomic value in relational databases?


Atomic value means that each data value stored in an attribute must be indivisible into meaningful sub-
parts. For example, a phone number stored in one column should not be split into parts.

L R MOHAMMED MATHEEN M.C.A., M.A., B.ED., UGC NET.,


LECTURER, PRIMUS PU COLLEGE, BANGALORE - 560 035
36
STUDENT NOTES || CHAPTER 8 DATABASE CONCEPTS April 23, 2025

8. What is the purpose of using a query in a database system?


A query is a request made to a database to retrieve or manipulate data in a desired format. It allows users
to extract information from one or more tables.

9. Explain the role of the database engine in DBMS.

R
Database engine is the core software component in a DBMS responsible for creating databases, storing
data, and handling queries for data retrieval and manipulation.

L
N
EE
10. What is a foreign key?
A foreign key is an attribute in one table that refers to the primary key in another table. It is used to
establish and enforce relationships between two tables.
H
AT
M

11. What is the difference between Degree and Cardinality of a relation?


Degree refers to the number of attributes (columns) in a relation.
ED

Cardinality refers to the number of tuples (rows) in a relation.


M
M

12. What is a candidate key in a relation?


A candidate key is any attribute or set of attributes in a relation that can uniquely identify each tuple. A
A

relation may have multiple candidate keys.


H
O
M

13. Distinguish between Primary Key and Alternate Key.


Primary Key is the candidate key chosen to uniquely identify tuples in a relation.
Alternate Key is any other candidate key that is not selected as the primary key.

L R MOHAMMED MATHEEN M.C.A., M.A., B.ED., UGC NET.,


LECTURER, PRIMUS PU COLLEGE, BANGALORE - 560 035
37
STUDENT NOTES || CHAPTER 8 DATABASE CONCEPTS April 23, 2025

14. Define Composite Primary Key with an example context.


Composite Primary Key is formed by combining two or more attributes to uniquely identify a tuple
when no single attribute is sufficient. For example, AttendanceDate and RollNumber together can form
a composite primary key.

15. What is the relational data model?

R
The relational data model organizes data into tables (relations) consisting of rows and columns, where
each table stores data for a specific entity and is linked to others through keys.

L
N
EE
16. Mention any two properties of a relation in a relational model.
(i) Each attribute must have a unique name.
(ii) Each tuple in a relation must be distinct.
H
AT
M

17. Define the term constraint in the context of databases.


Constraints are rules applied to columns in a table to ensure data validity and consistency. For example,
NOT NULL, UNIQUE, etc.
ED
M

18. Differentiate between Data Redundancy and Data Inconsistency.


M

Data Redundancy is the duplication of the same data in multiple places.


Data Inconsistency occurs when the duplicated data has conflicting values.
A
H
O

19. What is meant by Controlled Data Sharing in DBMS?


Controlled Data Sharing means providing different levels of data access to different users. For example,
M

teachers can update attendance, but parents can only view it.

20. Explain the concept of a domain in relational databases.


Domain is the set of permissible values that an attribute can take. For instance, the domain of a phone
number field would be 10-digit positive integers.

L R MOHAMMED MATHEEN M.C.A., M.A., B.ED., UGC NET.,


LECTURER, PRIMUS PU COLLEGE, BANGALORE - 560 035
38
STUDENT NOTES || CHAPTER 8 DATABASE CONCEPTS April 23, 2025

3 MARKS QUESTIONS

1. What are the main limitations of a file system that are overcome by a DBMS?
Answer:
The main limitations of a file system are:
- Data Redundancy: Same data stored in multiple files leads to wastage of storage.
- Data Inconsistency: Duplicate data may have conflicting values.
- Data Isolation: Related data is stored in separate files without any mapping.

R
- Data Dependence: Changes in file structure require changes in application programs.

L
- Controlled Data Sharing: Difficult to implement user-level access control.

N
EE
2. Explain any three advantages of using a Database Management System (DBMS).
Answer:

H
- Efficient Data Management: DBMS allows easy storing, updating, and retrieval of data.
- Reduced Redundancy: Related data is stored once and accessed through relationships.
AT
- Controlled Access: Different users can be given different access privileges.
M

3. What is metadata? How is it useful in a DBMS?


ED

Answer:
Metadata is data about the data. It includes database schema, constraints, and descriptions of tables and
M

fields. It is stored in a database catalog or dictionary and helps the DBMS manage structure, relationships,
and access rights effectively.
M
A

4. Differentiate between Database Schema and Database Instance.


H

Answer:
O

- Database Schema: It is the structure/design of a database; static and defined once.


M

- Database Instance: It is the current state of the database with actual data; changes over time.

5. Explain the concept of a query in DBMS. How is it used?


Answer:
A query is a request to retrieve or manipulate data from one or more tables in a database. It can be used
to select, update, delete, or insert data, and is generally written in a query language like SQL.

L R MOHAMMED MATHEEN M.C.A., M.A., B.ED., UGC NET.,


LECTURER, PRIMUS PU COLLEGE, BANGALORE - 560 035
39
STUDENT NOTES || CHAPTER 8 DATABASE CONCEPTS April 23, 2025

6. What are the different types of data manipulation operations in a DBMS? Explain.
Answer:
- Insertion: Adding new records into tables.
- Deletion: Removing existing records.
- Update: Modifying existing data in records.

R
L
7. What do you understand by the term ‘Relational Data Model’? Mention any two key charac-
teristics.

N
Answer:

EE
The Relational Data Model stores data in tables (relations) with rows (tuples) and columns (attributes).
Characteristics:
- Data is structured into relations.
- Relations are linked via keys. H
AT
M

8. Define the terms Attribute, Tuple, and Domain in relational databases.


Answer:
ED

- Attribute: A column in a relation representing a data field.


- Tuple: A row in a relation representing a record.
M

- Domain: Set of valid values an attribute can take.


M
A

9. Explain the terms Degree and Cardinality of a relation with reference to relational databases.
Answer:
H

- Degree: Number of attributes (columns) in a relation.


O

- Cardinality: Number of tuples (rows) in a relation.


M

10. Differentiate between Primary Key, Candidate Key, and Alternate Key.
Answer:
- Candidate Key: An attribute or set of attributes that can uniquely identify tuples.
- Primary Key: A selected candidate key used to identify tuples.
- Alternate Key: Candidate key(s) not chosen as the primary key.

L R MOHAMMED MATHEEN M.C.A., M.A., B.ED., UGC NET.,


LECTURER, PRIMUS PU COLLEGE, BANGALORE - 560 035
40
STUDENT NOTES || CHAPTER 8 DATABASE CONCEPTS April 23, 2025

11. What is a Composite Primary Key? When is it used?


Answer:
A Composite Primary Key is made by combining two or more attributes when a single attribute alone
cannot uniquely identify a tuple. It is used in cases where multiple fields together ensure uniqueness.

R
L
12. Define Foreign Key. How does it establish a relationship between two relations?
Answer:

N
A Foreign Key is an attribute in one table that refers to the primary key in another table. It creates a link

EE
between the two tables, allowing data in one to be associated with data in another.

H
AT
13. What is meant by atomicity of data in a relational model? Why is it important?
Answer:
M

Atomicity means that each attribute must contain a single, indivisible value. It ensures data is stored in
the most basic form, allowing consistency, easy processing, and accurate querying.
ED
M

14. What are constraints in DBMS? Explain any two with examples.
Answer:
M

Constraints are rules applied to data in a database to maintain accuracy and consistency.
Examples:
A

- NOT NULL: Prevents NULL values in a column.


H

- UNIQUE: Ensures all values in a column are different.


O
M

15. Explain the term data dependency. Why is it considered a limitation in file systems?
Answer:
Data dependency means that changes in data format or structure require corresponding changes in appli-
cation programs. In file systems, this leads to inefficiency and difficulty in managing updates.

L R MOHAMMED MATHEEN M.C.A., M.A., B.ED., UGC NET.,


LECTURER, PRIMUS PU COLLEGE, BANGALORE - 560 035
41
STUDENT NOTES || CHAPTER 8 DATABASE CONCEPTS April 23, 2025

16. Distinguish between File System and Database System in terms of data access, redundancy, and
sharing.
Answer:
- Data Access: File systems require specific programs; DBMS allows queries.
- Redundancy: File systems have more redundancy; DBMS minimizes it.
- Sharing: File systems lack controlled sharing; DBMS offers access control.

R
L
17. What are the three main properties of a relation in a relational database?
Answer:

N
- Attributes must have unique names; order doesn’t matter.

EE
- Tuples must be distinct; order is irrelevant.
- Attribute values must be atomic and from the same domain.

H
AT
18. How does DBMS ensure controlled data sharing? Give an example.
M

Answer:
DBMS allows different users to have different access rights. For example, teachers can edit attendance
ED

data while parents can only view it. This is managed through user roles and permissions.
M

5 MARKS QUESTIONS
M

1. Explain the limitations of a file system that are overcome by using a Database Management
System (DBMS).
A

Answer:
H

The limitations of a file system are:


O

• Difficulty in Access: Data retrieval depends on custom programs and cannot be performed flexibly.
M

• Data Redundancy: Duplicate data is stored in multiple files, leading to increased storage usage.
• Data Inconsistency: When duplicated data is not updated consistently across files, conflicting
values may arise.
• Data Isolation: Related data is stored separately without any interlinking or mapping, making it
hard to retrieve meaningful information.
• Data Dependence: If file structure changes, associated programs also need modification.

L R MOHAMMED MATHEEN M.C.A., M.A., B.ED., UGC NET.,


LECTURER, PRIMUS PU COLLEGE, BANGALORE - 560 035
42
STUDENT NOTES || CHAPTER 8 DATABASE CONCEPTS April 23, 2025

• Controlled Data Sharing: Different levels of access control are difficult to implement for multiple
users in a file system.

2. Differentiate between File System and Database Management System on five points.

Answer:

R
Aspect File System Database Management System (DBMS)

L
Data Access Requires writing custom programs Enables querying using structured

N
language

EE
Redundancy High, due to duplication in files Reduced, data stored in related tables
Inconsistency Likely due to multiple copies Minimised with centralized data

H management
AT
Data Sharing Difficult to implement Provides controlled access to multiple
users
M

Dependency High data dependence on Low, programs are independent of data


programs format
ED
M

3. What is a Database Schema? Explain with its importance. Also differentiate between Database
M

Schema and Database Instance.


A

Answer:
H

• Database Schema: It is the design or blueprint of a database that defines table names, fields, data
types, constraints, and relationships. It represents the logical structure of a database.
O

• Importance: It helps ensure proper organization, storage, and retrieval of data. All constraints and
M

rules of the database are established in the schema.


• Difference:

Basis Database Schema Database Instance

Definition Structure of the database Data stored at a specific time

L R MOHAMMED MATHEEN M.C.A., M.A., B.ED., UGC NET.,


LECTURER, PRIMUS PU COLLEGE, BANGALORE - 560 035
43
STUDENT NOTES || CHAPTER 8 DATABASE CONCEPTS April 23, 2025

Basis Database Schema Database Instance

Nature Static (remains mostly unchanged) Dynamic (changes with operations)


Representation Table design, column definitions Actual rows and data entries

R
4. Define Candidate Key, Primary Key, Composite Primary Key, Alternate Key, and Foreign Key.

L
Explain how they help maintain data integrity.

N
Answer:

EE
• Candidate Key: A set of one or more attributes that can uniquely identify a tuple in a table.
• Primary Key: A selected candidate key used to uniquely identify records; it cannot be NULL.
• Composite Primary Key: A primary key formed by combining two or more attributes when no
single attribute can uniquely identify a record.
H
AT
• Alternate Key: Any other candidate key not selected as the primary key.
• Foreign Key: An attribute in a table that refers to the primary key in another table to establish a
M

relationship.

These keys maintain data integrity by: - Ensuring uniqueness (Primary/Candidate Key), - Preventing
ED

duplication (Alternate Key), - Linking tables accurately (Foreign Key), - Allowing structured referencing
and data validation.
M
M

5. Explain the relational data model with its major components and key properties.
A

Answer:
H

• Relational Data Model: Organizes data into relations (tables) consisting of rows (tuples) and
O

columns (attributes).
M

• Components:

1. Relation/Table: Represents an entity (e.g., STUDENT).


2. Attributes: Columns that define properties (e.g., Name, RollNumber).
3. Tuples: Rows that store actual data.
4. Domain: Set of permissible values for an attribute.

• Key Properties:

L R MOHAMMED MATHEEN M.C.A., M.A., B.ED., UGC NET.,


LECTURER, PRIMUS PU COLLEGE, BANGALORE - 560 035
44
STUDENT NOTES || CHAPTER 8 DATABASE CONCEPTS April 23, 2025

1. Attributes must have unique names.


2. Tuples must be distinct.
3. The sequence of tuples and attributes is immaterial.
4. All values in an attribute must be atomic.
5. A NULL value is allowed for unknown or inapplicable data.

R
6. What is a query in DBMS? How does a DBMS support data manipulation through queries?

L
Describe types of operations possible.

Answer:

N
• Query: A query is a request to a database to retrieve or modify data using a query language such

EE
as SQL.
• DBMS Support: DBMS processes the query through its query processor and returns the desired
result from the stored data.
H
AT
• Types of Operations:

1. Insertion: Add new data into the database.


M

2. Deletion: Remove existing data.


3. Updation: Modify existing data.
4. Selection: Retrieve specific data based on conditions.
ED

These operations allow users and applications to interact with the database effectively and maintain the
data’s relevance and accuracy.
M
M
A

7. Define and explain the terms Attribute, Tuple, Domain, Degree, and Cardinality with their
H

significance in relational databases.


O

Answer:
M

• Attribute: A column in a table representing a data field (e.g., Name, Age).


• Tuple: A row in a table representing a complete record.
• Domain: The set of valid values that an attribute can hold.
• Degree: Number of attributes (columns) in a relation.
• Cardinality: Number of tuples (rows) in a relation.

Significance: These terms help in defining, storing, and manipulating data effectively in a structured and
meaningful way in relational databases.

L R MOHAMMED MATHEEN M.C.A., M.A., B.ED., UGC NET.,


LECTURER, PRIMUS PU COLLEGE, BANGALORE - 560 035
45
STUDENT NOTES || CHAPTER 8 DATABASE CONCEPTS April 23, 2025

8. Explain the concept of Data Constraints in a database. Name and explain at least two types.

Answer:

• Data Constraints: Restrictions applied to data stored in a table to ensure accuracy, validity, and
integrity.
• Types:

R
1. NOT NULL Constraint: Ensures that a column cannot have a NULL value.

L
2. UNIQUE Constraint: Ensures that all values in a column are distinct.

N
• Constraints prevent invalid or duplicate data and help maintain the consistency and reliability of
the database.

EE
H
9. What are the key differences between Candidate Key, Composite Key, and Foreign Key? Explain
AT
with use-case importance.

Answer:
M

Key Type Description


ED

Candidate Key Attributes that can uniquely identify tuples; multiple per relation possible
Composite Key A key formed using two or more attributes to ensure uniqueness
M

Foreign Key An attribute in one table referring to the primary key in another table
M
A

Use-Case Importance: - Candidate Key: Basis for choosing primary key. - Composite Key: Used
when no single field is unique. - Foreign Key: Maintains referential integrity between related tables.
H
O

CHAPTER END EXERCISES


M

1. Give the terms for each of the following:

a) Collection of logically related records.


Answer: Database

b) DBMS creates a file that contains description about the data stored in the database.
Answer: Metadata (or Data Dictionary)

L R MOHAMMED MATHEEN M.C.A., M.A., B.ED., UGC NET.,


LECTURER, PRIMUS PU COLLEGE, BANGALORE - 560 035
46
STUDENT NOTES || CHAPTER 8 DATABASE CONCEPTS April 23, 2025

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


Answer: Primary Key

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

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

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

L
Answer: Database Management System (DBMS)

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

Answer:
H
Foreign keys are allowed to have NULL values because they are not necessarily part of the primary key in
AT
the foreign (referencing) table. If a record does not have a corresponding value in the referenced table or
the relationship is optional, the foreign key can be set to NULL. For example, if a student has no guardian
M

information, the GUID in the STUDENT table (foreign key) can be NULL.
ED
M

3. Differentiate between:

a) Database state and database schema


M

Answer:
- Database Schema: Structure of the database; defines tables, fields, and constraints. It is static.
A

- Database State: The data present in the database at a specific time. It is dynamic and changes over
H

time.
O

b) Primary key and foreign key


M

Answer:
- Primary Key: Uniquely identifies a tuple within a relation.
- Foreign Key: Refers to the primary key of another table to establish a relationship.

c) Degree and cardinality of a relation


Answer:
- Degree: Number of attributes (columns) in a table.
- Cardinality: Number of tuples (rows) in a table.

L R MOHAMMED MATHEEN M.C.A., M.A., B.ED., UGC NET.,


LECTURER, PRIMUS PU COLLEGE, BANGALORE - 560 035
47
STUDENT NOTES || CHAPTER 8 DATABASE CONCEPTS April 23, 2025

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

Answer:
DBMS avoids redundancy by organizing data in related tables and referencing common data using keys
(like primary and foreign keys). For example, guardian details can be stored once in a separate table and

R
referred to using GUID, avoiding repetition of the same data.

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

EE
Answer:
- Difficulty in data access
- Data redundancy
H
AT
- Data inconsistency
- Data isolation
- Data dependence
M

- Lack of controlled data sharing


ED

Relational DBMS overcomes these by organizing data in structured tables, supporting keys, queries, con-
straints, and providing controlled access to multiple users.
M
M

6. Sports Preferences Exercise


A

Table: Sports Preferences


H

Roll_no Preference
O
M

9 Cricket
13 Football
17 Badminton
17 Football
21 Hockey

L R MOHAMMED MATHEEN M.C.A., M.A., B.ED., UGC NET.,


LECTURER, PRIMUS PU COLLEGE, BANGALORE - 560 035
48
STUDENT NOTES || CHAPTER 8 DATABASE CONCEPTS April 23, 2025

Roll_no Preference

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

R
field?
Answer: Yes, NULL can be assigned to represent unknown or non-applicable data.

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

N
Answer: The property of atomicity is violated — each attribute should contain only one value. A

EE
UNIQUE or PRIMARY key constraint can be used to prevent duplicate roll numbers in such a context.

c) Kabaddi was not chosen by any student. Is it possible to have this tuple in the Sports Preferences
relation?
H
AT
Answer: No, since there’s no roll number (NULL), the tuple does not represent a valid record and violates
the requirement of PRIMARY KEY (which cannot be NULL).
M
ED

7. Are the states of both the relations equivalent? Justify.

Answer:
M

Yes, the two relations are equivalent in terms of relation state, as the order of rows (tuples) and columns
(attributes) is immaterial in relational databases, provided the data and structure are the same.
M
A
H

8. Design a canteen database.


O

a) To store item name with price:


- Relation: ITEMS
M

- Attributes: ItemCode (Primary Key), ItemName, Price


- Restriction: Price > 0, ItemName NOT NULL

b) To generate bill: - New relation: BILL - Attributes: BillNo (Primary Key), ItemCode (Foreign
Key), Quantity - Restriction: Each bill is unique (BillNo), and item must exist in ITEMS

c) To store calories:
- Attribute Calories should be added to the ITEMS table.

L R MOHAMMED MATHEEN M.C.A., M.A., B.ED., UGC NET.,


LECTURER, PRIMUS PU COLLEGE, BANGALORE - 560 035
49
STUDENT NOTES || CHAPTER 8 DATABASE CONCEPTS April 23, 2025

9. EMP-DEPENDENT database

a) Candidate Keys in EMPLOYEE:


Answer: AadharNumber, EmployeeID

b) To retrieve dependents of an employee:


Answer: Use DEPENDENT table; key required is EmployeeID

R
c) Degree of EMPLOYEE and DEPENDENT:

L
Answer:
- EMPLOYEE: Degree = 5 (AadharNumber, Name, Address, Department, EmployeeID)

N
- DEPENDENT: Degree = 3 (EmployeeID, DependentName, Relationship)

EE
10. SCHOOL_UNIFORM Database – Insert Validity H
AT
a) UNIFORM Relation tuples:
M

i) 7, Handkerchief, NULL
Invalid – UColor is NOT NULL
ED

ii) 4, Ribbon, Red


Valid – UCode 4 is already defined
M

iii) 8, NULL, White


M

Invalid – UName is NOT NULL


A

b) COST Relation tuples:


H

i) 7, S, 0
O

Invalid – Price should be > 0


M

ii) 9, XL, 100


Invalid – UCode 9 not defined in UNIFORM (foreign key violation)

11. MULTIPLEX database

L R MOHAMMED MATHEEN M.C.A., M.A., B.ED., UGC NET.,


LECTURER, PRIMUS PU COLLEGE, BANGALORE - 560 035
50
STUDENT NOTES || CHAPTER 8 DATABASE CONCEPTS April 23, 2025

a) Is Movie_ID a valid primary key in MOVIE?


Answer: Yes, if Movie_ID is unique for each movie.

b) Is AudiNo a valid primary key in AUDI?


Answer: No, because one movie can be shown in multiple auditoriums. Use combination of AudiNo
and Movie_ID as composite primary key.

c) Is there a foreign key?


Answer: Yes, Movie_ID in AUDI is a foreign key referencing Movie_ID in MOVIE.

R
L
N
12. STUDENT-PROJECT database

EE
a) Primary key of each table:
- STUDENT: RollNo
- PROJECT: ProjectNo
H
- PROJECT-ASSIGNED: (Registration_ID, ProjectNo) (composite primary key)
AT
b) Foreign Key(s) in PROJECT-ASSIGNED:
Answer: Registration_ID (references STUDENT), ProjectNo (references PROJECT)
M

c) Alternate key in STUDENT:


Answer: Registration_ID (unique, but not primary key)
ED

d) Can duplicate RollNo be assigned?


Answer: No, RollNo is the primary key; must be unique.
M


M

13. Validity of operations


A

a) Insert record with missing RollNo:


Answer: Invalid – RollNo is primary key; cannot be NULL.
H

b) Insert record with missing Registration_ID:


O

Answer: Invalid – Foreign key must refer to valid STUDENT entry.


M

c) Insert project without submission date:


Answer: Valid, if SubmissionDate allows NULL.

d) Insert IP-101-19 and ProjectNo 206 in PROJECT-ASSIGNED:


Answer: Invalid – Both values must exist in STUDENT and PROJECT respectively as foreign key
references.

L R MOHAMMED MATHEEN M.C.A., M.A., B.ED., UGC NET.,


LECTURER, PRIMUS PU COLLEGE, BANGALORE - 560 035
51
STUDENT NOTES || CHAPTER 8 DATABASE CONCEPTS April 23, 2025

For more information Visit:

https://matheenhere.blogspot.com

R
L
N
EE
H
AT
M
ED
M
M
A
H
O
M

L R MOHAMMED MATHEEN M.C.A., M.A., B.ED., UGC NET.,


LECTURER, PRIMUS PU COLLEGE, BANGALORE - 560 035
52

You might also like