DBMS UNIT QUESTION BANK SOLUTIONS
DBMS UNIT QUESTION BANK SOLUTIONS
Question Bank
SECTION A - UNIT I
SECTION - B
Topic Name: Introduction: Database system:
1. Define Data base? Explain the terms i) Data ii) Information iii) Table iv) Row v) Column
3. List six major steps that you would take in setting up a database for a particular
enterprise. [7M] [R20, SET 1, January- 2023] [Applying]
Topic Name: Characteristics (Database Vs File System):
4. Discuss in brief about the characteristics of DBMS? [7M] [R20, SET 1, Feb/March
2022] [Creating]
5. Differentiate between File system and DBMS? [7M][R20, SET 1, Feb/March 2022]
[Understanding]
6.Why DBMS is preferred over flat file system for maintaining the database of an
organization. [7M] [R20, SET 3, January- 2023] [Applying]
7. Discuss in detail about database users. [7M] [R20, SET 4, January- 2023] [Understanding]
8. Describe the different types of DBMS users. [7M] [R20, SET 2, January- 2023] [Applying]
9. Define DBMS? What are advantages of DBMS? Explain. [7M] [R20, SET 3, January-
2023] [Understanding].
10. What are the applications of DBMS? Explain in detail. [7M] [R20, SET 2, January-
2023] [Analyse]
11. What is a database? What are applications of databases? Explain [7M] [R20, SET 4,
January- 2023] [Remembering]
13. What are various types of data models? Explain. [7M] [R20, SET 3, January- 2023]
[Understanding]
14. What is a data model? What are the different data models? Explain E-R model and
15. What is logical data independence and why is it important? [7M] [R20, SET1, January-
2023] [Understanding]
16. Explain the difference between external, internal, and conceptual schemas. How are these
different schema layers related to the concepts of logical and physical data in
18. Describe levels of abstraction in a DBMS. [7M] [R20, SET 1, January- 2023]
[Understanding]
20. Explain about three tier architecture in database. [7M] [R20, SET 2, January- 2023]
[Understanding].
21. With a neat diagram, explain in detail about the structure of a DBMS.[7M] [R20, SET 2,
January- 2023] [Understanding]
22. Describe the importance of environment and structure of database systems. How the
environment effects the applications of database systems? Explain [7M] [ Applying].
Topic Name: Centralized and Client Server architecture for the database.
23. Explain about centralized architecture for DBMS. [7M] [R20, SET 2, January- 2023]
[Analyse]
24. Discuss about client server architecture for the database in detail. [7M] [R20, SET 3,
January- 2023] [Creating]
25. Explain in brief about the Client Server architecture for the database? [7M] [R20, SET 1,
January 2023] [ Understanding]
26. What are the different types entities in ER model explain with an example?
27. Explain the types of attributes available in entity relational model?
28. Define these terms: relationship, relationship set explain with an example?
29. Describe the Key Constraints with Employee Department example?
30. Differentiate between the Ternary and Quaternary relationship in ER model?
DBMS is a collection of data. In DBMS, File system is a collection of data. In this system,
the user is not required to write the the user has to write the procedures for
procedures. managing the database.
DBMS gives an abstract view of data that File system provides the detail of the data
hides the details. representation and storage of data.
DBMS provides a crash recovery File system doesn't have a crash mechanism, i.e.,
mechanism, i.e., DBMS protects the user if the system crashes while entering some data,
from the system failure. then the content of the file will lost.
DBMS provides a good protection It is very difficult to protect a file under the file
mechanism. system.
Strong entity: An entity that can stand on its own and is not dependent on any other entity. It has
a primary key that uniquely identifies each instance of the entity.
Weak entity: An entity that depends on another entity to exist. It does not have a primary key,
but instead has a partial key that helps identify instances in combination with the primary key of
the identifying entity.
Associative entity: An entity that associates other entities or elements within an entity set.
Entity :- A real-world object that has independent existence. For example, a customer entity
might have attributes like name, address, and phone number.
Entity set:- A group of entities that share the same attributes. For example, a customer entity
set would be a group of customers with the same attributes.
In a database management system (DBMS), a super class is a general concept that is represented
by an entity type, while a subclass is a specific concept that is represented by an entity type:
Super class
A high-level entity that can be divided into subclasses. It's also known as a parent class.
Sub class
A sub-grouping of entities within an entity type. It's also known as a child or derived class.
Question Bank
UNIT I
1. Define Data base? Explain the terms i) Data ii) Information iii) Table iv) Row v)
Column vi) Record [8M] [Analyse] [Model question]
Ans: Data
Data is the raw material from which useful information is derived. The
word data is the plural of Datum. Data is commonly used in both singular
and plural forms. It is defined as raw facts or observations. It takes variety
of forms, including numeric data, text and voice and images. Data is a
collection of facts, which is unorganized but can be made organized into
useful information. The term Data and Information come across in our
daily life and are often interchanged.
Example: Weights, prices, costs, number of items sold etc.
Information
Data that have been processed in such a way as to increase the knowledge
of the person who uses the data. The term data and information are
closely related. Data are raw material resources that are processed into
finished information products. The information as data that has been
processed in such way that it can increase the knowledge of the person
who uses it.
In practice, the database today may contain either data or information
Table
Table is a collection of data which is orgnanied in terms of rows and
columns.
1
Rows:
Rows are also known as records. It is represented in horizontal line.
Columns:
Columns are called fields that contain the collection of characters.
Records:
Records in DBMS are groups of fields within a table that refer to specific
objects.
Ans: A database management system (DBMS) is system software for creating and managing
databases. A DBMS makes it possible for end users to create, protect, read, update and delete
data in a database.
DESKTOP DATABASE
WORK GROUP DATABASE
ENTERPRISE DATABASE
Desktop Database :-
A Single User database supports only one user at a time. In other words, if
user A is using the database, user B and C must wait until user A is done. A single
user database that runs on a personal computer is called a desktop database.
Workgroup Database :-
A multiuser database supports multiple users at the same time. When the
multiuser database supports a relatively small number of users (usually fewer than
50) a specific department with is an organization, it is called a workgroup
database.
Enterprise Database :-
When the database is used by the entire organization and support many users
2
(more than 50, usually hundreds) across many departments, the database is known
as an enterprise database.
Distributed Database :-
OPERATIONAL DATABASE
DATA WAREHOUSE DATABASE
Operational database :-
A database that is designed primarily to support a company’s day- to-
day operations. Also known as a transactional database or production
database.
A File System is a collection of raw data files stored in the hard-drive, whereas a database is
intended for easily organizing, storing and retrieving large amounts of data. In other words, a
database holds a bundle of organized data typically in a digital form for one or more users.
3. List six major steps that you would take in setting up a database for a particular
enterprise. [7M] [R20, SET 1, January- 2023] [Applying]
Ans: There are six steps fo setting up a database for a particular enterprise.
3
Find and organize the information required:
Gather all of the types of information you might want to record in the database, such as
product name and order number.
Divide your information items into major entities or subjects, such as Products or
Orders. Each subject then becomes a table.
Decide what information you want to store in each table. Each item becomes a field,
and is displayed as a column in the table. For example, an Employees table might include fields
such as Last Name and Hire Date.
Choose each table’s primary key. The primary key is a column that is used to uniquely
identify each row. An example might be Product ID or Order ID.
Look at each table and decide how the data in one table is related to the data in other
tables. Add fields to tables or create new tables to clarify the relationships, as necessary.
Analyze your design for errors. Create the tables and add a few records of sample data.
See if you can get the results you want from your tables. Make adjustments to the design, as
needed.
Apply the data normalization rules to see if your tables are structured correctly. Make
adjustments to the tables, as needed.
4. Discuss in brief about the characteristics of DBMS? [7M] [R20, SET 1, Feb/March 2022]
[Creating]
(Or)
5. Differentiate between File system and DBMS? [7M][R20, SET 1, Feb/March 2022]
[Understanding]
(Or)
4
6.Why DBMS is preferred over flat file system for maintaining the database of an
organization. [7M] [R20, SET 3, January- 2023] [Applying]
Ans: File Systems Versus A DBMS (Characteristics)
In earlier days, the databases were created directly on top of file systems.
File system has many disadvantages.
7. Discuss in detail about database users. [7M] [R20, SET 4, January- 2023]
[Understanding]
8. Describe the different types of DBMS users. [7M] [R20, SET 2, January- 2023]
[Applying]
Ans:
Database users are a person who interacts with data, and depending on their role and tasks they
have different levels of access and rights within a database. (or)
Database users are categorized based up on their interaction with the database. They are
Database Administrators (DBA)
Database Designers
System Analysts
Database Administrators (DBA) are the most important type of database users in DBMS.
Database Administrator is an individual or a team of users.
To access the database, DBAs have to provide login credentials (account ID and
password) to all other users when required.
Database Administrators (Database admins) are also responsible to keep a check on data
integrity, data consistency, data redundancy, hardware and software installation
requirements, and routine maintenance of the databases. They are also responsible for
handling data loss, which can be caused due to any error or even due to system failures.
It monitor the backup & recovery of the database records and it also provides technical
support.
Database Designers:
Database Designers are the users in DBMS who design and create the structure of the
database including triggers, indexes, schemas, entity relationships, tables, constraints, etc. which
complete the database. It provides responsible for implementing the overall design of the
database.
Systems analysts:
Systems analysts design and modify systems by turning user requirements into a set of
functional specifications, which are the blueprint of the system. System analysts design the
database, and they are also responsible for the user interfaces.
Application Programmers also known as Back-End Developers, are computer professional users
who are responsible for developing the application programs (C, C++, Java, PHP, Python, etc.)
or the user interface so that other users can use these applications to interact with the database.
They interact with the database using DML (Data Manipulation Language) queries to store data
inside the database and when needed, they can also fetch the data from it.
End Users:
End users are the people who use the application programs to run the organization’s daily
6
operations.
(Or)
End users are basically those people whose jobs require access to the database for querying,
updating, and generating reports.
Standalone Users
These are the users who occasionally access the database but they require different information
each time.
These are the users who basically make up a sizeable portion of database end-users. The main
job function revolves basically around constantly querying and updating the database for this we
basically use a standard type of query known as the canned transaction that has been
programmed and tested
These users basically include engineers, scientists, business analytics, and others who thoroughly
familiarize themselves with the facilities of the DBMS in order to implement their application to
meet their complex requirements.
Standalone Users :
These are those users whose job is basically to maintain personal databases by using a ready-
made program package that provides easy-to-use menu-based or graphics-based interfaces, An
example is the user of a tax package that basically stores a variety of personal financial data for
tax purposes. These users become very proficient in using a specific software package.
9. Define DBMS? What are advantages of DBMS? Explain. [7M] [R20, SET 3, January-
2023] [Understanding].
7
Ans: The following are some of the advantages of the databases approach as compared with the
file processing system.
Program-Data Independence.
Minimal Data Redundancy.
Minimized data inconsistency.
Improved data sharing.
Increased productivity of application development.
Improved data quality.
Improved data accessibility and responsiveness.
Reduced program maintenance.
Improved decision making.
Data Independence is the ability to modify the definition of the data source in one
level without effecting that definition of data source on the other or higher levels.
Consider the Customer Master File contains both the Order Filling System and
Invoicing System. Suppose it is decided to change the Customer Address field length in
the records in the Customer Master File from 20 to 30 characters. In DBMS there is no
need to make such modifications in all related application programs. But it is not in the
case of file processing system.
The design goal with the database approach is that all data files are integrated into
a single, logical structure. Each data item is recorded in only one place in the database.
This can be achieved by means of Integrity rules supported by the DBMS.
8
Minimized Data Inconsistency (or) Improved Data Consistency: -
The DBMS helps create an environment in which end users have better access to
move and better managed data. Such access makes it possible for end users to respond
quickly to changes in their environment.
A major advantage of the database approach is that it greatly reduces cost and time to
develop new business applications. The main reason is that the database management
system provides a number of high-level productivity tools such as forms and report
generators and high-level languages that automate some of the activities of database
design and implementation.
Stored data must be changed frequently for a various reasons. As all the data items
will stored only once in database, managing data becomes very easy, which reduces the
program maintenance.
Better managed data and improved data access make it possible to generate
better quality information, on which better decisions are based.
10. What are the applications of DBMS? Explain in detail. [7M] [R20, SET 2, January-
9
2023] [Analyse] [Or]
11. What is a database? What are applications of databases? Explain [7M] [R20, SET 4,
January- 2023] [Remembering]
13. What are various types of data models? Explain. [7M] [R20, SET 3, January- 2023]
[Understanding]
14. What is a data model? What are the different data models? Explain E-R model and
Ans: The Data models emphasis on how the data are represented on the database or on
how the data structures are implemented. These models are classified into three
categories,
Hierarchical Model.
10
Network Model.
Relational Model.
Hierarchical Model :-
Advantages
Because all the data are held in a common database, data sharing becomes
easy.
Because of root and child relationship, there is always a link between the
parent segment and its child segments. Because of this property child
segmentis always automatically refers to its parent, it yields to data integrity.
In hierarchical data implementation, we can easily represent the I:M
relationships.
Searching is fast and efficient.
Disadvantages
Network Model :-
Advantages
The M:M relationships are easy in network model.
Data Access is flexible than hierarchical model.
11
The data redundancy can be eliminated.
The data independence can be achieved.
There is greater speed and efficiency than relational database models.
Disadvantages
Relational Model :-
15. What is logical data independence and why is it important? [7M] [R20, SET1, January-
2023] [Understanding]
Ans: Logical data independence allows us to make changes like adding, modifying or deleting
an attribute, entity, or even a relationship. Doing such modifications does not call for rewriting
the application program, but to make corresponding alterations in the program. It enables us to
merge two records into one without affecting the external layer. If one wants to split an existing
record into two, it is possible without interfering with the end-user view level structure of a given
database.
Making timely modifications to the conceptual level in order to keep your DBMS up to date is
essential. This is why logical data independence is said to be leading a pivotal role. It not only
helps improve the performance and speed of the DBMS but also turns out to be helpful in
making your database much handier and more reliable.
12
16. Explain the difference between external, internal, and conceptual schemas. How
are these different schema layers related to the concepts of logical and physical
Other name for this level is user view level, the external model is the end
users view of the data environment. The term end users refers to people who use
the application programs to manipulate the data and generate information. End
users usually operate in an environment in which an application has a specific
business unit focus.
Among three models this model was very essential. This conceptual
model was nothing but the blue print of the entire database. It is a representation of
data as viewed by the entire organization.
13
The internal scheme (Logical Independence) is expressed using SQL,
creatingthe tables EMP and DEPT as shown in above figure.
The Physical model (Physical Independence) operates at the lowest level
of abstraction, describing the way data are saved on storage media such as disks
or tapes.
This Layer fully dependent upon the software (SQL) and Hardware (disks or
tapes).
Logical Independence : A condition that exists when the internal model can be
changed without affecting the conceptual model.
Physical Independence : A condition that exists when the physical model can be
changed without affecting the internal model.
17. Explain the difference between physical and logical data independence. ? [7M] [R20,
SET 4, January- 2023] [Analyse]
18. Describe levels of abstraction in a DBMS. [7M] [R20, SET 1, January- 2023]
[Understanding]. (Or)
19. Describe three tier schema architecture for data independence. [7M] [R20, SET 4,
January- 2023] [Analyse].
14
The data in a DBMS is described at three levels of abstraction.
The database description consists of a schema at each of these three levels of
abstraction.
External, Conceptual and Physical Views describe how users see the data.
Conceptual schema defines logical structure.
Physical schema describes the files and indexes used.
Conceptual schema:
15
It summarizes how the relations described in the conceptual schema are
actually stored on secondary storage devices such as disks and tapes.
Decides what file organizations to use to store the relations and create
auxiliary data structures, called indexes, to speed up data retrieval
operations.
A sample physical schema for the university database is to store all
relations as unsorted files of records.
o Create indexes on the first column of the students, faculty and
courses relations, the salary column of faculty, and the capacity of
column of rooms.
External Schema:
20. Explain about three tier architecture in database. [7M] [R20, SET 2, January- 2023]
[Understanding].
Database Architecture
Database architecture uses programming languages to design a particular type of
software for businesses or organizations. Database architecture focuses on the design,
development, implementation and maintenance of computer programs that store and organize
information for businesses, agencies and institutions.
The architecture of a DBMS can be seen as either single tier or multi-tier. The tiers
are classified as follows:
1-tier architecture.
2-tier architecture and
3-tier architecture.
n-tier architecture.
1-tier architecture:
One-tier architecture involves putting all of the required components for a software
16
application or technology on a single server or platform.
2-tier architecture:
The two-tier is based on Client Server architecture. The two-tier architecture is like
client server application. The direct communication takes place between client and server. There
is no intermediate between client and server.
3-tier architecture:
A 3-tier architecture separates its tiers from each other based on the complexity of the
users and how they use the data present in the database. It is the most widely used architecture
to design a DBMS.
21. With a neat diagram, explain in detail about the structure of a DBMS.[7M] [R20, SET
17
2, January- 2023] [Understanding].
Ans: The database system is divided into three components: Query Processor,
Storage Manager, and Disk Storage. These are explained as following below
1. Query Processor: It interprets the requests (queries) received from end user via an
application program into instructions. It also executes the user request which is received
from the DML compiler.
DML Compiler: It processes the DML statements into low level instruction (machine
language), so that they can be executed.
DDL Interpreter: It processes the DDL statements into a set of table containing meta data
(data about data).
Embedded DML Pre-compiler: It processes DML statements embedded in an application
program into procedural calls.
Query Optimizer: It executes the instruction generated by DML Compiler.
18
the constraints and executing the DCL statements. It is responsible for updating,
storing, deleting, and retrieving data in the database.
Authorization Manager: It ensures role-based access control, i.e,. checks whether the
particular person is privileged to perform the requested operation or not.
Integrity Manager: It checks the integrity constraints when the database is modified.
File Manager: It manages the file space and the data structure used to represent
information in the database.
Buffer Manager: It is responsible for cache memory and the transfer of data between the
secondary storage and main memory.
Data Dictionary: It contains the information about the structure of any database object. It
is the repository of information that governs the metadata.
The structure of a Database Management System (DBMS) can be divided into three main
components: the Internal Level, the Conceptual Level, and the External Level.
1. Internal Level: This level represents the physical storage of data in the database. It is
responsible for storing and retrieving data from the storage devices, such as hard drives or
solid-state drives. It deals with low-level implementation details such as data compression,
indexing, and storage allocation.
2. Conceptual Level: This level represents the logical view of the database. It deals with the
overall organization of data in the database and the relationships between them. It defines
the data schema, which includes tables, attributes, and their relationships. The conceptual
level is independent of any specific DBMS and can be implemented using different DBMS.
3. External Level: This level represents the user’s view of the database. It deals with how
users access the data in the database. It allows users to view data in a way that makes sense
to them, without worrying about the underlying implementation details. The external level
19
provides a set of views or interfaces to the database, which are tailored to meet the needs of
specific user groups.
22. Describe the importance of environment and structure of database systems. How the
environment effects the applications of database systems? Explain [7M] [ Applying] [Model
Question].
The database system is composed of the five major parts shown in figure
HARDWARE
SOFTWARE
Operating system software
DBMS software
Application programs
PEOPLE
Systems administrators
Data administrators
Database designers
Programmers
End users
PROCEDURES
DATA
20
HARDWARE :-
SOFTWARE :-
DBMS Software :-
Application programs :-
PEOPLE :-
Systems administrators
Data administrators
Database designers
Programmers
End users
System administrators :
The person responsible for coordinating theactivities of the data processing
functions.
Data administrators : -
The person responsible for the overall information resources ofan organisation.
21
Database Designers :-
Database designers design the database structure.
Programmers :-
Programmer to develop the application programmers.
End users :-
End users are the people who use the application programs to run the
organization’s daily operations.
PROCEDURES :-
Procedures are the instructions and rules that govern the design and use
of the database system.
DATA :-
The word data covers the collection of facts stored is the database.
Topic Name: Centralized and Client Server architecture for the database.
23. Explain about centralized architecture for DBMS. [7M] [R20, SET 2, January- 2023]
[Analyse]
22
24. Discuss about client server architecture for the database in detail. [7M] [R20, SET 3,
January- 2023] [Creating] [Or]
25. Explain in brief about the Client Server architecture for the database? [7M] [R20, SET
1, January 2023] [ Understanding]
23
processing. When a client requires access to additional functionality-such as database access-
that does not exist at that machine, it connects to a server that provides the needed functionality.
A server is a machine that can provide services to the client machines, such as file
access, printing, archiving, or database access. In the general case, some machines install only
client software, others only server software, and still others may include both client and server
software. However, it is more common that client and server software usually run on separate
machines.
24
Entity Relational Model:
26. What are the different types entities in ER model explain with an example?
There are different types of entities
1. Strong entity.
2. Weak entity.
3. Associative entity (or) Composite entity (or) bridge entity
Strong Entities
1. A strong entity type is an entity that exists independently of other entity types.
2. Strong entity type always has a unique characteristic called an identifier.
3. That is an attribute or combination of attribute
4. That uniquely identified each occurrence (incidence) of that entity type. 5. It can be denoted as single
line rectangle. Syntax: Ex: Example:
Consider the example, student takes course, Here student is a strong entity
2.Weak Entities
1. A weak entity is an entity type whose existence depends on some other entity type.
2. The entity has a primary key 3. That is partially or totally derived from the parent entity in the
relationship. It is represented by double line rectangle.
ASSOCIATIVE ENTITY
1. An associative entity is an entity type that associates the instances of one or more entity type.
2. It means a many to many relationship exits
3. It is also called composite entity or bridge entity
4. And it contains attributes that are peculiar to the relationship between those entity instances.
Attribute
Types of Attributes
1. Key Attribute
The attribute which uniquely identifies each entity in the entity set is called the key attribute. For
example, Roll_No will be unique for each student. In ER diagram, the
key attribute is represented by an oval with underlying lines.
Key Attribute
2. Composite Attribute
An attribute composed of many other attributes is called a composite attribute. For example, the Address
attribute of the student Entity type consists of Street, City, State, and Country. In ER diagram, the
composite attribute is represented by an oval comprising of ovals.
Composite Attribute
4. Derived Attribute
An attribute that can be derived from other attributes of the entity type is known as a derived attribute.
e.g.; Age (can be derived from DOB). In ER diagram, the derived attribute is represented by a dashed oval.
Derived Attribute
The Complete Entity Type Student with its Attributes can be represented as: Entity and Attributes
28. Define these terms: relationship, relationship set explain with an example?
In a database management system (DBMS), a "relationship" refers to a logical connection between
different tables within a database, established through shared attributes, allowing you to link related data
across multiple tables and access information from various parts of the database
simultaneously; essentially, it describes how different entities in a database are connected to each other.
Relationship set in a Database Management System (DBMS) is essential as it provides the ability to
store, recover, and oversee endless sums of information effectively in cutting-edge data administration,
hence making a difference in organizations.
A relationship set denotes a set of relationships of the same type. In other words it demonstrates
relationships between entities in a database
Key Constraints
Now consider another relationship set called Manages between the Employees and Departments
entity sets such that each department has at most one manager, although has single employee is
allowed to manage more than one department. The restriction that each department has at most one
manager is an example of a key constraint, and it implies that each Departments entity appears in at
most one Manages relationship in any allowable instance of Manages. This restriction is indicated in
the ER diagram of Figure 2.6 by using an arrow from Departments to Manages. Intuitively, the arrow
states that given a Departments entity, we can uniquely determine the Manages relationship in which
it appears.
Ternary:
Definition: A relationship where three distinct entity sets are involved.
Why needed: Sometimes, a relationship cannot be accurately represented using only binary
relationships between entities, requiring a ternary relationship to capture the full interaction.
Quaternary:
Definition: A relationship where four distinct entity sets are involved.
Complexity: As the number of entities involved increases, the complexity of modeling and representing
the relationship in a database can also increase
Generalization is a process in the Entity-Relationship (ER) model that combines multiple entities with
shared attributes into a higher-level entity. It's a bottom-up approach that emphasizes similarities
between entities and hides differences in the schema.
Here's how generalization works in the ER model:
Identify common attributes: Find the attributes that are shared by multiple entities
Create a higher-level entity: Combine the entities into a single, higher-level entity
Incorporate common attributes: The common attributes become part of the higher-level entity
For example, you can generalize the entities "STUDENT" and "FACULTY" into a higher-level entity called
"PERSON". The common attributes, like "P_NAME" and "P_ADD", become part of the "PERSON" entity,
while specialized attributes, like "S_FEE", become part of the "STUDENT" entity.
14. Explain about the specialization with an example?