Dbms Question Bank
Dbms Question Bank
Question Bank
Course & Branch: BCA (DATA SCIENCE) Year & Sem:2025-2026 & 4th sem
I. Short questions: -
1. What are advantages and disadvantages of database system?
3. What is data independence? What is difference between physical and logical data independence?
2. What is ER Model? Discuss basic concepts used in ER Model including design notation and various
type of constraints.
b) Differentiate between weak entity and strong entity with ER diagram notations. How a weak
entity set can be converted into strong entity set?
b) Differentiate between file system and database system approach. Discuss pros and cons of both
approaches
7. What do you understand by the term integrity constraint? Explain entity and referential integrity
constraint along with example.
b) What do you understand by relational model? What are the characteristics of relational database
management system?
9.) Explain insertion, deletion and updation anamolies with suitable example.
10.Suppose you are given the following requirements for a simple database for National Hockey
League(NHL)
(iv)Each player has a name position(such as left wing or goalie),a skill level and a set of injury
records.
(vI)A game is played between two teams(host_team and guest_team)and has a date(such as
May11th,1999) and a score(such as 4 or 2).
Construct a clean and concise ER diagram for NHL database. List your assumptions and clearly
indicate the cardinality mapping as well as any role indicators in ER diagram.
Advantages:
Disadvantages:
3. What is data independence? What is the difference between physical and logical
data independence?
Data Independence is the ability to change the schema at one level of the database
system without having to change the schema at the next higher level.
An Entity Set is a collection of similar types of entities that share common properties.
Each entity in the set is a real-world object or concept.
o 1:1 (one-to-one)
o 1:N (one-to-many)
o M:N (many-to-many)
10. What is distributed database? Write one advantage of distributed database.
Advantage: It improves data availability and fault tolerance by distributing the data
across multiple sites.
Commercial DBMS (like Oracle, SQL Server, MySQL, etc.) are used to manage
large-scale databases in organizations. They provide:
o Support for multiple users and concurrent transactions.
o High reliability, performance, and security features.
o Scalable solutions for large volumes of data.
o Tools for backup, recovery, and maintenance.
Diagram:
From notebook
Components of DBMS:
1. DBMS Engine: The core part of the DBMS responsible for managing data storage,
retrieval, and updates. It handles tasks such as query processing, transaction
management, and data manipulation.
2. Database Schema: The schema defines the logical structure of the database, such as
the tables, views, and relationships. It acts as a blueprint for the organization of data.
3. Database Manager: The database manager includes the Query Processor and
Transaction Manager:
o Query Processor: Translates high-level user queries into low-level operations
that the DBMS can understand and execute.
o Transaction Manager: Ensures that database operations are executed in a
manner that adheres to the ACID properties (Atomicity, Consistency,
Isolation, Durability).
4. Data Dictionary/Repository: A system catalog that contains metadata (data about the
data), such as table structures, constraints, and access permissions.
5. Storage Manager: Manages the physical storage of data. It includes the File
Manager, Buffer Manager, and Disk Space Manager, which are responsible for
storing, retrieving, and maintaining the data on disk.
6. Data Access Language (SQL): The language used by users to interact with the
DBMS. SQL is typically used for querying and manipulating data.
1. Entity:
o An entity represents a real-world object or concept in the database. For example, a
Student or Course could be entities in a university database.
o Entities have attributes that describe their properties. For example, a Student
entity may have attributes like Student_ID, Name, and Age.
2. Entity Set:
o An entity set is a collection of similar types of entities. For example, all students in a
university form a Student entity set.
3. Attribute:
o An attribute is a property or characteristic of an entity. It represents the data that
needs to be stored. Attributes can be simple (e.g., Name), composite (e.g., Full
Name), or multi-valued (e.g., Phone Numbers).
4. Relationship:
o A relationship represents an association between two or more entities. For example,
a Student enrolls in a Course, forming a relationship between the two entities.
5. Relationship Set:
o A relationship set is a collection of similar relationships. For example, all enrollments
of students in courses form an Enrollment relationship set.
6. Primary Key:
o A primary key is an attribute or a set of attributes that uniquely identifies an entity
within an entity set. For example, Student_ID can serve as the primary key for the
Student entity.
ER Diagram Notations:
Types of Constraints:
1. Cardinality Constraints:
o Specifies the number of instances of an entity that can or must be associated with
another entity. The cardinality can be one-to-one, one-to-many, or many-to-many.
2. Participation Constraints:
o Specifies whether all or only some instances of an entity participate in a relationship.
This can be total or partial participation.
3. Key Constraints:
o Specifies that each entity in an entity set must have a unique identifier.
Logical Data Independence refers to the ability to change the conceptual schema without
having to change the external schemas or application programs. Achieving logical data
independence is difficult due to several reasons:
Strong Entity: A strong entity can exist independently and has a primary key that
uniquely identifies each record in the entity set. A strong entity is typically
represented as a rectangle with a single primary key.
Weak Entity: A weak entity cannot exist without a corresponding strong entity. It
relies on a "parent" strong entity for its identification and usually does not have a
complete key of its own. Weak entities are represented by a double rectangle and
require a relationship with a strong entity for identification.
A weak entity can be converted into a strong entity by creating a unique identifier (primary
key) for the weak entity and ensuring it can exist independently.
The three-tier architecture of a DBMS refers to the separation of the DBMS system into
three distinct layers:
1. Presentation Layer (Client Tier): The front-end interface where users interact with
the database. This layer handles the presentation and user interaction, usually through
an application or web interface.
2. Application Layer (Logic Tier): This layer contains the business logic or processing
logic. It interprets user requests, performs the necessary computations, and passes data
to/from the database.
3. Data Layer (Database Tier): The back-end layer, which is responsible for managing
the database. This layer stores the data and responds to queries and updates from the
application layer.
Advantages:
Data Tree-like structure Graph structure with complex Table-based structure (rows
Structure (parent-child). relationships. and columns).
Less flexible, rigid More flexible, but still Highly flexible and easy to
Flexibility
structure. complex. modify.
Data Retrieval Simple, but inefficient More complex queries are Efficient data retrieval using
Aspect Hierarchical Model Network Model Relational Model
7. Integrity Constraints:
Integrity constraints are rules that ensure data in a database is accurate, consistent, and
reliable. These rules prevent the entry of invalid data and ensure that relationships between
entities are logically sound. Integrity constraints help maintain data quality and consistency
throughout the lifecycle of a database. There are two major types of integrity constraints:
entity integrity and referential integrity.
The entity integrity constraint ensures that each row in a table is uniquely identifiable. This
is generally achieved through the use of a primary key, which guarantees that each record in
the table is distinct and can be uniquely referenced.
Primary Key: A primary key is a column (or combination of columns) in a table that
uniquely identifies each row in the table. The values in the primary key column(s)
must be unique and cannot be null.
Example: Consider a Students table. Each student is uniquely identified by a
Student_ID which serves as the primary key. No two students can have the same
Student_ID, and the Student_ID cannot be null because it is essential to identify
each student.
Students Table:
In this table, the Student_ID uniquely identifies each student, and no two rows can
have the same Student_ID. The Student_ID column cannot contain null values, as
that would violate the entity integrity.
The referential integrity constraint ensures that relationships between tables remain
consistent. Specifically, it ensures that a foreign key in one table must either point to a valid
primary key in another table or be null.
Foreign Key: A foreign key is a column (or a combination of columns) in one table
that refers to the primary key in another table. The value in the foreign key column
must match an existing value in the referenced table or be null.
Example: Consider a Courses table that references a Students table. If we have a
Student_ID column in the Courses table as a foreign key that refers to the
Student_ID column in the Students table, the Student_ID in the Courses table
must correspond to an existing Student_ID in the Students table.
Courses Table:
In this case, Student_ID in the Courses table must be valid and match an existing
Student_ID from the Students table. If Student_ID = 103 appears in the Courses
table but does not exist in the Students table, it would violate referential integrity.
The relational model is a database model that organizes data into tables (also called
relations). The relational model was introduced by E.F. Codd in 1970. In this model, data is
stored in rows and columns, and relationships between different pieces of data are established
through foreign keys.
Tables: Each table consists of rows and columns. Each row represents a unique
record, and each column represents an attribute of the entity the table describes.
Primary Key: A primary key is a column (or a set of columns) that uniquely
identifies each row in the table.
Foreign Key: A foreign key is a column that establishes a link between two tables by
referring to the primary key in another table.
Normal Forms: The relational model includes normalization rules (such as First
Normal Form, Second Normal Form, etc.) that help eliminate redundancy and ensure
data consistency.
Characteristics of RDBMS:
1. Tabular Structure: Data is stored in tables (relations) with rows and columns.
2. Data Integrity: RDBMS enforces data integrity through primary and foreign keys, ensuring
accurate and consistent data.
3. SQL (Structured Query Language): RDBMS uses SQL for querying and managing the data in
the database.
4. Normalization: RDBMS supports data normalization techniques to eliminate redundancy and
ensure data consistency.
5. ACID Transactions: RDBMS supports ACID (Atomicity, Consistency, Isolation, Durability)
properties for transaction management, ensuring that database transactions are reliable.
6. Data Independence: RDBMS provides logical and physical data independence, allowing
changes to the database schema without affecting the application.
7. Security: RDBMS provides strong security mechanisms to control access to the data and
protect sensitive information.
8. Multi-User Support: RDBMS supports multiple concurrent users, providing mechanisms for
locking and isolation to prevent conflicts.
In a Hospital Management System, there are various entities and relationships that need to
be represented. Common entities include Patient, Doctor, Appointment, Treatment,
Nurse, and Department. The relationships between these entities involve appointments,
treatments, and assignments of nurses to patients.
Relationships:
1. Insertion Anomaly:
o An insertion anomaly occurs when new data cannot be added to the database
without including other unnecessary data.
o Example: Suppose a table stores Student_ID, Course_ID, and Instructor_ID
all together. If a new course is being added but there is no instructor assigned yet,
we cannot insert the course without an instructor. This leads to the insertion
anomaly.
2. Deletion Anomaly:
o A deletion anomaly occurs when the deletion of certain data leads to unintended
loss of other related data.
o Example: If a Course table has Course_ID, Instructor_ID, and Student_ID,
deleting a course could inadvertently remove the Instructor_ID from the table,
which is not intended.
3. Update Anomaly:
o An update anomaly occurs when data needs to be updated in multiple places, but it
is not updated everywhere, leading to inconsistencies.
o Example: If a student's address is stored in several places (e.g., in Courses,
Students, etc.), updating the address in one place but not in the other will lead to
inconsistent data.
Entities:
Relationships:
Database systems are essential in a variety of sectors, ranging from business and finance to
healthcare and research. Here are some key applications:
1. Banking Systems: Banks use databases to manage customer accounts, transactions, loans,
and other financial services.
2. Healthcare: Patient records, medical history, appointment scheduling, and treatment
tracking are all managed using databases.
3. E-commerce: Online retail platforms use databases to store customer data, inventory,
orders, and payment information.
4. Education: Schools, universities, and online education platforms store student records,
grades, course materials, and schedules.
5. Telecommunications: Telecommunication companies use databases to track customers,
billing information, call records, and network management.
6. Social Media: Social media platforms manage user profiles, posts, messages, and
relationships using databases.
7. Government: Government departments use databases to manage public records, taxes,
welfare services, and more.
In each of these applications, the database ensures that data is organized, secure, and
accessible when needed, contributing to operational efficiency and informed decision-
making.