Chapter 8 Database Concepts
Chapter 8 Database Concepts
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
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
3 MARKS QUESTIONS 39
5 MARKS QUESTIONS 42
ED
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.
tional License.
ED
M
M
A
H
O
M
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
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
A file is a container on a computer to store data like text, code, images, videos, CSVs, etc.
H
• STUDENT
M
• ATTENDANCE
Roll
Number SName SDateofBirth GName GPhone GAddress
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
2018-09-01 6 Manika P. P
O
Problem Description
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
A DBMS is software to store, manage, and retrieve logically related data efficiently.
M
M
• MySQL
A
• Oracle
H
• PostgreSQL
• SQL Server
O
• MS Access
M
• MongoDB
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.
• 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
GUID GAddress
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
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
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
|
M
Database Catalog
A
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
Concept Description
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
1. Properties of Attributes:
2. Properties of Tuples:
3. Properties of Values:
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
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) |
+-------------------------------+
Summary of Chapter 8
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
field.
Tuple A row in a table representing a single
record.
Domain Permissible set of values for an attribute.
Term Explanation
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
unknown data.
A
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
Answer: C
M
Explanation: Redundancy refers to duplication of data, which wastes space and may cause inconsis-
tency.
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
A. Redundancy increases
B. Harder to access
C. Better data integrity
M
Explanation: DBMS enforces constraints and structure, which improves the accuracy and consistency
A
of data.
H
O
M
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
D. Redundant data
H
Answer: B
Explanation: Meta-data is stored in the database catalog and includes table structure, constraints, etc.
O
M
Answer: C
Explanation: Diagrams may help visualize a database, but they are not core components like attributes
and tuples.
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.
Explanation: A database instance represents the actual content of the database at a particular point in
time.
M
M
Answer: B
Explanation: Each tuple (row) in a relational table must be distinct to maintain data integrity.
Answer: C
Explanation: A foreign key is an attribute in one table that links to the primary key in another, establish-
ing relationships.
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
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.
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
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
Answer: C
Explanation: In file systems, applications are dependent on the file structure. Changing it may break
O
them.
M
D. Tuple isolation
Answer: C
Explanation: DBMS allows certain users to access only specific parts of data based on their roles.
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
Explanation: DBMS uses normalization to separate data into related tables and remove redundancy.
M
A
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
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
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
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
D. Ignoring updates
A
Answer: C
Explanation: Good database design, including normalization, reduces redundancy and inconsistency.
H
O
M
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
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
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
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
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
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
Explanation: File systems suffer from inconsistency because they do not manage linked data centrally.
M
M
57.
A
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
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
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.
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
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.
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
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.
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
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
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
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)
15. The set of allowed values for an attribute is called its __________. (Domain)
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
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
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
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
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
teachers can update attendance, but parents can only view it.
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
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
Answer:
O
- Database Instance: It is the current state of the database with actual data; changes over time.
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
9. Explain the terms Degree and Cardinality of a relation with reference to relational databases.
Answer:
H
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.
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
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.
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
• 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.
• 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
3. What is a Database Schema? Explain with its importance. Also differentiate between Database
M
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
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:
• Key Properties:
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:
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
Answer:
M
Significance: These terms help in defining, storing, and manipulating data effectively in a structured and
meaningful way in relational databases.
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
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
b) DBMS creates a file that contains description about the data stored in the database.
Answer: Metadata (or Data Dictionary)
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:
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
Answer:
- Primary Key: Uniquely identifies a tuple within a relation.
- Foreign Key: Refers to the primary key of another table to establish a relationship.
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
Relational DBMS overcomes these by organizing data in structured tables, supporting keys, queries, con-
straints, and providing controlled access to multiple users.
M
M
Roll_no Preference
O
M
9 Cricket
13 Football
17 Badminton
17 Football
21 Hockey
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
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
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.
9. EMP-DEPENDENT database
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
i) 7, S, 0
O
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
—
M
https://matheenhere.blogspot.com
R
L
N
EE
H
AT
M
ED
M
M
A
H
O
M