0% found this document useful (0 votes)
2 views

RDBMS Notes

The document covers fundamental concepts related to databases, including definitions of data, information, and DBMS, as well as characteristics, advantages, and disadvantages of DBMS. It explains various database models, normalization processes, SQL commands, and the database life cycle. Additionally, it introduces ER modeling and its components, providing a comprehensive overview of database management principles.

Uploaded by

shahmeerjabbar66
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)
2 views

RDBMS Notes

The document covers fundamental concepts related to databases, including definitions of data, information, and DBMS, as well as characteristics, advantages, and disadvantages of DBMS. It explains various database models, normalization processes, SQL commands, and the database life cycle. Additionally, it introduces ER modeling and its components, providing a comprehensive overview of database management principles.

Uploaded by

shahmeerjabbar66
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/ 35

📘 Chapter 1 – Exercise Part-II: Short Questions

1. Define Data?
Data is a collection of raw facts and figures related to an
object, such as a person, organization, or event. Data can
be in the form of text, numbers, images, sounds, or
videos.

2. Define Information?
Information is processed data that provides useful
meanings. It is the output of data processing and helps in
decision-making.

3. Define DBMS?
DBMS (Database Management System) is a software tool
used to create, manage, and retrieve data in a database
efficiently and conveniently.

4. Characteristics of DBMS?
 Provides security and removes redundancy
 Self-describing and supports data abstraction
 Supports multi-user environment
 Allows sharing of data and multiple views
 Follows ACID properties (Atomicity, Consistency,
Isolation, Durability)

5. Define Field and Record?


 Field: A set of related characters that represent the
smallest unit of data. Example: Name, Roll_No.
 Record: A collection of related fields treated as a
single unit. Example: A student's record includes
Name, Roll_No, Address, etc.

6. Name the components of DBMS?


1. Software
2. Hardware
3. Data
4. Procedures
5. Database Languages
6. Query Processor
7. Runtime Database Manager
8. Database Manager
9. Database Engine
10. Reporting Tool
7. DBMS vs Flat File?

DBMS Flat File


Does not support multi-
Supports multi-user access
user access
Removes redundancy Redundancy issues exist
Supports complex No support for complex
transactions transactions
Expensive but cost-effective Cheap but limited in
long term features

8. Advantages and Disadvantages of DBMS?


 Advantages: Data sharing, independence, security,
backup/recovery, advanced capabilities
 Disadvantages: High hardware/software cost,
training needed, database damage risks, data
conversion cost

9. What is Microsoft Access?


Microsoft Access is a DBMS developed by Microsoft. It
combines a graphical user interface with database tools
and uses the Jet Database Engine.

10. What is MySQL?


MySQL is an open-source relational DBMS written in
C/C++. It is widely used in web-based applications and
supports platforms like Windows and Linux.

11. What is Tuple?


A tuple is a row in a database table. It represents a single
record.

12. What is File Management System?


A File Management System is a way to store and manage
data using individual files, without using a DBMS. It often
leads to redundancy and lacks multi-user features.

13. Define Data Redundancy?


Data redundancy refers to the unnecessary duplication of
data in a system, which may cause inconsistencies.
14. What is meant by Efficient Database?
An efficient database stores, retrieves, and manages data
quickly and accurately, using minimal resources and
maintaining data integrity.

15. Define Data Integration


Data integration is the process of combining data from
different sources into a single, unified view to avoid
duplication and improve data consistency.
📘 Chapter 2 – Exercise Part-II: Short Questions

1. What is a Legacy Database?


A legacy database is a group of different old-style
databases (relational, object-oriented, hierarchical, etc.)
that are still in use but often outdated and difficult to
integrate with modern systems.

2. Define File Processing System.


A File Processing System (FPS) is a way of storing,
retrieving, and Controlling data using separate files. It
requires knowledge of file hierarchy and structure to
access or modify data.

3. Write Down Three Disadvantages of File Processing


System.
1. Data Redundancy and Inconsistency
2. Difficulty in Accessing Data
3. Security Problems
4. Define Hierarchical Database Model.
A hierarchical database model organizes data in a tree-
like structure where each child has only one parent. It
supports one-to-many relationships and uses pointers to
link records.

5. Write Two Advantages of Hierarchical Database


Model.
1. Fast Navigation due to close storage of parent and
child records
2. Minimized Disk I/O because related records are
stored together

6. What is Data Redundancy in File Processing System?


Data redundancy refers to the repetition or duplication
of data in multiple files, often causing inconsistency and
unnecessary storage usage.

7. Define Network Model.


The network model is a database model that allows
many-to-many relationships. Each record (member) can
have multiple parent records (owners), making it more
flexible than the hierarchical model.

8. Write the Name of the First Database Model.


Hierarchical Model – It was the first database model
used, based on tree structures.

9. What are the Disadvantages of the Network Model?


1. System Complexity due to many pointers
2. Lack of Structural Independence – Changes in
structure require changes in applications
📘 Chapter 3 – Sample Short Questions with Answers

1. What is logical view of data?


The logical view of data refers to how data is perceived
by users rather than how it is actually stored. It focuses
on the structure and relationships of data that are
meaningful to users.

2. What is Database Model?


A database model is the logical framework that defines
how data is stored, organized, and accessed in a
database. It includes entities, relationships, and data
rules.

3. Semantic Data Model?


The semantic data model is a conceptual model that
represents data using real-world meanings. It shows
objects, their attributes, and relationships like "is_a",
"has_a", and "instance_of".
4. Relational Model?
The relational model organizes data into tables
(relations) of rows and columns. Proposed by E.F. Codd,
it uses primary keys and foreign keys to maintain data
integrity and relationships.

5. Database Model & Internet?


Database models like the relational model are used with
internet technologies to manage and serve web-based
data. Examples include using MySQL or SQL Server in
dynamic websites and applications.

6. Write the name of advantages of Database Model.


 Simple structure
 High data accuracy
 Easy access to data
 Supports ACID properties
 Data consistency and integrity
 Supports scalability and concurrency

7. What are our data accuracy requirements?


Data accuracy refers to storing and retrieving correct and
non-redundant data. It's essential for financial, legal, and
critical systems where reliable results are required.

8. Do we need scalability?
Yes, scalability is important to handle growing amounts
of data and users. A good database model should
support horizontal or vertical scaling without
performance loss.

9. How important is concurrency? Will multiple users


and applications need simultaneous data access?
Concurrency is very important. Multiple users or apps
may need access to the same data simultaneously. DBMS
must support it without causing data conflicts or
inconsistencies.

10. What are our performance and reliability needs?


Performance needs include fast query responses and
smooth handling of large transactions. Reliability refers
to consistent uptime, data integrity, and
backup/recovery capabilities.
✅ Chapter 4 – Easy Short Question Answers

1. Define Tables.
A table is a collection of data arranged in rows and
columns. Each row is a record, and each column is a field
(attribute).

2. Define Relational Model.


The relational model stores data in tables and connects
them using keys like primary and foreign keys. It was
introduced by E.F. Codd.

3. Define Data Integrity.


Data integrity means keeping data correct, accurate, and
consistent in a database.

4. Define Entity.
An entity is any real-world thing like a person, place, or
object about which data is stored in a database.
5. Define Attributes.
Attributes are the properties or details of an entity. For
example, for a student, attributes could be Name, Roll
Number, and Age.

6. What is Primary Key?


A primary key is a column (or set of columns) in a table
that uniquely identifies each row. It cannot be null or
duplicate.

7. What is Composite Key?


A composite key is a primary key made up of two or
more columns that together uniquely identify a row in a
table.

8. What is Foreign Key?


A foreign key is a column that links one table to another
by referring to the primary key in the other table.
9. What is meant by atomic values of a field?
Atomic values mean that a field should contain only one
value — not a list or group. Example: A field should store
one phone number, not multiple.

10. Define Domain of a relation.


Domain is the set of valid values that a column
(attribute) can have. For example, the domain of an Age
column could be 1–100.
✅ Chapter 5 – Normalization of Database Tables
Exercise – Part-II: Short Questions (Textbook-based,
Simplified)

1. Define Normalization.
Normalization is the process of organizing data into
simpler and better database structures. It helps avoid
data repetition (redundancy) and keeps the data
consistent.

2. Write any two benefits of normalized data.


 Reduces unnecessary duplicate data
 Prevents problems when inserting, updating, or
deleting data

3. Define Partial Dependencies.


A partial dependency happens when a non-key field
depends only on part of a composite key, not the whole
key. Removed in 2NF.
4. Define Functional Dependencies.
A functional dependency means one field’s value can
uniquely identify another field’s value.
Example: If we know Roll_No, we can find Name — so
Name is dependent on Roll_No.

5. What is Deletion Anomaly?


It happens when deleting one record also deletes useful
related data.
For example, deleting a student may also remove course
information by mistake.

6. What is Transitive Dependency?


A transitive dependency exists when a non-key field
depends on another non-key field instead of the primary
key. Removed in 3NF.

7. What is meant by Anomaly?


An anomaly is a problem in the database (like insertion,
update, or deletion errors) due to poor design.
8. What is the purpose of 3NF?
The purpose of Third Normal Form (3NF) is to remove
transitive dependencies and make the table structure
cleaner and more efficient.

9. Why do we do 2NF?
We apply Second Normal Form (2NF) to remove partial
dependencies and make sure all non-key fields depend
fully on the whole primary key.

10. Define BCNF.


Boyce-Codd Normal Form is an advanced version of 3NF.
A table is in BCNF if every determinant is a candidate key
.
✅ Chapter 6: Relational Algebra and SQL – Short
Questions (Textbook-based)

1. What is Relational Algebra?


Relational algebra is a procedural query language that
takes a table (relation) as input and gives another table
as output using operations like select, project, union,
etc.

2. What are SQL Commands?


SQL commands are instructions used to perform tasks
like inserting, deleting, updating, or retrieving data in a
database.

3. What is DDL?
DDL (Data Definition Language) is used to define or
change the structure of a database. Examples: CREATE,
ALTER, DROP.

4. What is DML?
DML (Data Manipulation Language) is used to manage
data in the database like adding, editing, and deleting
records. Examples: INSERT, UPDATE, DELETE.

5. What is SQL Operator?


SQL operators are symbols or words used in SQL queries
to perform actions like comparisons, arithmetic, or logic.
Examples: +, =, AND, OR.

6. Define DCL.
DCL (Data Control Language) controls access to data in a
database. Examples: GRANT (give access) and REVOKE
(remove access).

7. What is Join?
Join is used to combine rows from two or more tables
based on a related column between them.

8. How many kinds of Join? Name them.


There are 4 types of joins in SQL:
 INNER JOIN
 LEFT (OUTER) JOIN
 RIGHT (OUTER) JOIN
 FULL (OUTER) JOIN

9. What is the syntax of Select operator?


Syntax: σ condition (Relation)
Example: σ age > 17 (Student)
It selects rows that meet the given condition.

10. What does Average function do?


The AVG() function calculates the average value of a
numeric column in a table.

11. What is Cartesian Product?


It returns all possible combinations of rows from two
tables.
If table A has 3 rows and B has 2, the result will have 3 ×
2 = 6 rows.

12. Define Arithmetic Operator in SQL.


Arithmetic operators perform basic math operations.
Examples: +, -, *, /, %.
13. Define the Projection Operation.
Projection (∏) selects specific columns (attributes) from
a table, removing duplicates.

14. Define Union with Example.


The UNION operation combines results from two tables,
removing duplicates.
Example:
SELECT name FROM ClassA
UNION
SELECT name FROM ClassB;

15. Write any 5 names of Logical Operators.


 AND
 OR
 NOT
 IN
 BETWEEN
✅ Chapter 7: Database Life Cycle (DBLC) – Short
Questions with Book-Based Answers

1. What is database life cycle?


The Database Life Cycle (DBLC) is a series of steps that
show the complete history and development of a
database in an information system, from planning to
maintenance.

2. What are the six phases of database life cycle?


1. Database Initial Study
2. Database Design
3. Implementation and Loading
4. Testing and Evaluation
5. Operation
6. Maintenance and Evolution

3. What are the two basic database design strategies?


1. Top-down design
2. Bottom-up design
These strategies are used to organize how a
database is built.

4. What is top-down design?


Top-down design starts from a general idea and moves to
specific details, beginning with identifying entities and
then defining their attributes.

5. What is bottom-up design?


Bottom-up design starts from specific data items, groups
them into sets, and moves toward a general structure. It
focuses first on attributes, then entities.

6. What is centralized design with diagram?


Centralized design is used for small or simple databases.
A single person or small team designs the database by
identifying needs, creating the conceptual design, and
verifying it with users.
📌 Diagram: Refer to Page 168 of the textbook for the
actual diagram.
7. What is decentralized design?
Decentralized design is used in large systems with many
entities and complex operations. Different teams design
parts of the database and later combine their work into
one model.

8. What is Testing and Evaluation?


This phase checks if the database performs well, keeps
data safe, and works correctly. It involves testing the
database, fine-tuning, and evaluating it with applications.

9. Define Conceptual Data Modeling.


It creates a high-level design of the database using ER
(Entity-Relationship) models, without focusing on
hardware or software. It represents business processes
and user needs.

10. Define Logical Database Design.


In this phase, entities and their relationships are turned
into tables (relations), with attention to data types, keys,
and normalization.
11. Define Physical Database Design.
This step designs the actual storage structure in the
DBMS. It includes file organization, indexes, and focuses
on performance and security.

12. Define Implementation and Loading.


This phase includes installing the DBMS, creating the
database, and loading data from different sources into
the database.

13. Draw a diagram of Centralized versus Decentralized


Design.
📌 Refer to Page 168 in the textbook for the comparison
diagram of Centralized and Decentralized designs.

14. What is Database Design?


Database design is the process of creating a database
structure that supports company operations and ensures
proper data storage, retrieval, and management.
15. What is importance of Maintenance and Evolution?
It involves regular updates like backups, fixes, and
improvements. It keeps the database running well and
ready for future changes.
✅ Chapter 8 – Entity Relationship (ER) Modeling: Short
Questions

1. Define ER Modeling.
ER (Entity Relationship) modeling is a method to design
the logical structure of databases using diagrams. These
diagrams include entities, their attributes, and
relationships.

2. What is Entity?
An entity is any real-world object (like a person, place, or
event) that we store data about in a database.

3. Draw ER Model Diagram


📌 The ER diagram includes:
 Rectangles for entities
 Ellipses for attributes
 Diamonds for relationships
(Diagram on page 175 of your book)
4. Explain about history of ER model
The ER model was proposed by Peter Chen in 1971 to
create a consistent way to represent data in relational
databases.

5. Why do we use ER model?


 Helps understand data structure
 Easy to convert into relational schema
 Acts as a blueprint for designing databases
 Helps communicate database structure clearly

6. Difference between Specialization and Generalization


 Specialization: One entity splits into sub-entities
(Top-down)
 Generalization: Multiple entities combine into one
(Bottom-up)

7. Define Sub Class.


A subclass is a group of entities with special features that
inherits attributes from a superclass.
8. Define Super Class.
A superclass is a main entity type from which one or
more subclasses are derived.

9. What are the main components of ER model?


 Entities
 Attributes
 Relationships
 Keys
 Cardinality

10. What is Relational Model?


Proposed by E.F. Codd, it represents data as tables
(relations). Each table has rows (records) and columns
(fields).

11. Difference between Sub-Class and Super-Class


 Superclass: General entity with shared features
 Subclass: Specific entity that extends the superclass
with extra features
12. Define Subtype/Supertype Entity
This shows a parent-child relationship where subtype
(child) inherits all attributes of supertype (parent).

13. Define Strong Entity


A strong entity has a primary key and exists
independently in the database.

14. Define Weak Entity


A weak entity depends on a strong entity and doesn't
have a full primary key. It uses a foreign key to link.

15. What is Relationship Participation?


It shows how many times an entity can be part of a
relationship. It includes total and partial participation.

16. Define Partial Participation


Only some instances of the entity participate in the
relationship. Not every record is involved.
17. Define Composite Entity
Also called a bridge entity, it is used in many-to-many
relationships and shares primary keys of both related
entities.

18. What is Aggregation?


Aggregation shows a relationship between relationships.
It treats relationships as entities in a larger relationship.

19. What is Cardinality?


Cardinality defines how many instances of one entity
relate to instances of another. E.g., one-to-one, one-to-
many.

20. What is Association?


Association defines the connection or relationship
between two entities in an ER diagram.
✅ Chapter 9 – Transaction Management: Short
Questions

1. Define transaction.
A transaction is a group of tasks that act as a single unit
of work. It must be either fully completed or not done at
all—no partial completion is allowed.

2. Define consistency.
Consistency means a transaction must leave the
database in a valid state, following all rules and
constraints.

3. Name properties of transaction.


The ACID properties:
 Atomicity
 Consistency
 Isolation
 Durability

4. Name any 3 states of transaction.


1. Active
2. Partially Committed
3. Committed
(Other states: Failed, Aborted)

5. Define transaction log.


A transaction log is a file that records all changes made
to the database. It is used for recovery in case of failure.

6. Define atomicity.
Atomicity ensures that all operations in a transaction are
completed; if one fails, all are undone.

7. Define durability with example.


Durability means that once a transaction is committed,
its results are saved permanently, even if the system
crashes afterward.
Example: If money is transferred and the system crashes,
the changes remain saved.

8. What are series of process of transaction?


 Read operation
 Write operation
 Commit or Rollback

9. Define isolation.
Isolation ensures that concurrent transactions do not
affect each other. One transaction's changes are not
visible to others until it finishes.

10. Define individual transaction recovery.


This means rolling back only one transaction that failed
without affecting others, using the transaction log.

11. What is the difference between shared lock &


exclusive lock?
 Shared Lock: Multiple users can read but not write
 Exclusive Lock: Only one user can read and write; no
one else can access during the lock

12. Write any 2 characteristics of good concurrency


protocol.
1. Avoids conflicts between transactions
2. Maintains consistency and isolation

13. What is validation phase?


This phase checks if a transaction can be safely
committed without violating isolation or causing
conflicts.

14. Write names of two-phase locking protocols.


1. Centralized 2PL
2. Distributed 2PL

15. What is deadlock with example?


A deadlock occurs when two transactions wait for each
other to release resources, and neither can proceed.
Example: Transaction A locks Table 1 and waits for Table
2, while Transaction B locks Table 2 and waits for Table 1.

You might also like