0% found this document useful (0 votes)
9 views39 pages

DBMS UNIT QUESTION BANK SOLUTIONS

This document is a question bank for a Database Management System course for II B.Tech II Sem for the academic year 2024-2025. It includes various questions covering definitions, applications, data models, responsibilities of a DBA, and concepts related to ER diagrams and data independence. The questions are divided into sections focusing on different topics such as database characteristics, users, advantages, and architecture.

Uploaded by

nikhilawolf
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)
9 views39 pages

DBMS UNIT QUESTION BANK SOLUTIONS

This document is a question bank for a Database Management System course for II B.Tech II Sem for the academic year 2024-2025. It includes various questions covering definitions, applications, data models, responsibilities of a DBA, and concepts related to ER diagrams and data independence. The questions are divided into sections focusing on different topics such as database characteristics, users, advantages, and architecture.

Uploaded by

nikhilawolf
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/ 39

Department of Computer Science &Engineering

Data Base Management System


Class & Sem: II B.Tech II Sem Academic Year: 2024-2025

Question Bank
SECTION A - UNIT I

1.Write the definition of DBMS?


2. Explain the terms Data, Information, Metadata in brief?
3. Write any five applications of Database?
4. Which are the data models to store the data?
5. Write the schema for University database?
6. Write the responsibilities of DBA?
7. Explain two differences between file system Vs Database system?
8. Discuss about the physical data independence in DBMS?
9. What is the main drawback in DBMS?
10. Difference between hierarchy and the network data model?
11. What is an Entity and draw the different types of entities?
12. Explain the terms single valued and derived attributes?
13. What is Null value attribute?
14. What are the Entity and Entity sets?
15. Explain the different types of relationships?
16. What are the symbols used in ER diagrams?
17. What is Cardinality?
18. Explain in brief about Key Constraints?
19. What is Super and sub Classes?
20. What is inheritance in ER model?

SECTION - B
Topic Name: Introduction: Database system:

1. Define Data base? Explain the terms i) Data ii) Information iii) Table iv) Row v) Column

vi) Record [8] [Analyse].

2 Explain DBMS? Differentiate between Database and Files. [7] [Understanding].

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]

Topic Name: Database Users(Actors on Scene, Workers behind the scene):

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]

Topic Name: Advantages of Database systems:

9. Define DBMS? What are advantages of DBMS? Explain. [7M] [R20, SET 3, January-
2023] [Understanding].

Topic Name: Database applications:

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]

Topic Name: Brief introduction of different Data Models

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

relation model briefly. [7M] [R20, SET1, Feb/March- 2022] [Understanding]

Topic Name: Concepts of Schema, Instance and data independence

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

dependence? [7M] [R20, SET 2, January- 2023] [Understnding]


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]

Topic Name: Three tier schema architecture for data independence:


19. Describe three tier schema architecture for data independence. [7M] [R20, SET 4,
January- 2023] [Analyse].

20. Explain about three tier architecture in database. [7M] [R20, SET 2, January- 2023]
[Understanding].

Topic Name: Database system structure, environment

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]

Entity Relational Model:

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?

Generalization and Specialization:

31. What is Generalization and how it is implemented using ER?


32. Explain about the specialization with an example?
33. How the Is-A relationship implemented using ER?
SECTION - A

1. Write the definition of DBMS?


A database management system (DBMS) is a software system for creating and managing
databases. A DBMS enables end users to create, protect, read, update and delete data in a
database.

2. Explain the terms Data, Information, Metadata in brief?


Data: Data is the raw material from which useful information is derived, like numbers, text,
images, or measurements, which can be raw and uninterpreted.
Information: Data that have been processed in such a way as to increase the knowledge of the
person who uses the data.
Data that has been processed, analyzed, and organized to convey meaning and
understanding.
Metadata: Data that describe the properties or characteristics of other data.
Data that describes other data, providing details like the author, creation date, file type, or
location, allowing for easier discovery and management of the original data.
3. Write any five applications of Database?
1. Banking: For customer information, accounts, and loans, and banking transactions.
2. Airlines: For reservations and schedule information. Airlines were among the first to use
databases in a geographically distributed manner - terminals situated around the world accessed
the central database system through phone lines and other data networks.
3. Universities: For student information, course registrations, and grades.
4. Credit card transactions: For purchases on credit cards and generation of monthly statements.
5. Finance: For storing information about holdings, sales, and purchases of financial instruments
such as stocks and bonds.

4. Which are the data models to store the data?


Types of data models include:
 Relational: Data is stored in two-dimensional tables, with each row representing a record and
each column representing an attribute
 Hierarchical: Data is organized in a tree structure, with the root node containing the root data
and child nodes added to the parent node
 Network: Data is organized in a graph, with any record able to have multiple parents
 Entity-relationship: A visual representation of real-world problems, with entities represented by
rectangles, attributes represented by ellipses, and relationships represented by diamonds and
rhombus
 Object-oriented: Data and relationships are contained in a single structure called an object

5. Write the schema for University database?


The conceptual schema(also called as logical schema) describes the stored data in terms of the
data model of the DBMS. In a relational DBMS, the conceptual schema describes all relations that
are stored in the database. In our sample university database, these relations contain information
about entities, such as students and faculty, and about relationships, such as students’ enrollment
in courses. Students(sid: string, name: string, login: string, age: integer, gpa: real) Faculty(fid:
string, fname: string, salary : real) Courses(cid: string, cname: string, credits: integer) Rooms(nw:
integer, address: string, capacity: integer) Enrolled (sid: string, cid: string, grade: string) Teaches
(fid: string, cid: string)
6. Write the responsibilities of DBA?
The DBA is responsible for many critical tasks:
 Design of the conceptual and physical schemas: The DBA is responsible for interacting with the
users of the system to understand what data is to be stored in the DBMS and how it is likely to be
used. Based on this knowledge, the DBA must design the conceptual schema (decide what
relations to store) and the physical schema (decide how to store them).
 Security and authorization: The DBA is responsible for ensuring that unauthorized data access is
not permitted. In general, not everyone should be able to access all the data. In a relational
DBMS, users can be granted permission to access only certain views and relations. Data
availability and recovery from failures: The DBA must take steps to ensure that if the system
fails, users can continue to access as much of the uncorrupted data as possible.
 Database tuning:-The needs of users are likely to evolve with time. The DBA is responsible for
modifying the database, in particular the conceptual and physical schemas, to ensure adequate
performance as user requirements change
7. Explain two differences between file system Vs Database system?

Difference Between File System and DBMS

DBMS File System

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.

8. Discuss about the physical data independence in DBMS?


Physical data independence: the conceptual schema insulated users from changes in physical
storage details. This is the independence to change the internal schema without having to change
the conceptual schema.

9. What is the main drawback in DBMS?


The disadvantage of the DBMS system is overhead cost. The processing overhead introduced by
the DBMS to implement security, integrity, and sharing of the data causes a degradation of the
response and throughput times. An additional cost is that of migration from a traditionally
separate application environment to an integrated one.

10. Difference between hierarchy and the network data model?


The network data model extends the hierarchical model by relaxing its strict parent-child
relationship constraints. While the hierarchical model enforces a single parent for each node, the
network model allows multiple parents, supporting more complex many-to-many relationships.
This flexibility is crucial for scenarios where data entities have more interdependencies than can
be represented in a hierarchical tree structure.
11. What is an Entity and draw the different types of entities?
An entity is a thing or concept that can have data stored about it, and is usually represented as a
rectangle in an Entity Relationship Diagram.

 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.

12. Explain the terms single valued and derived attributes?

 Single Valued Attribute:


o Only allows one value per entity instance.
o Examples: "Gender" (Male or Female), "Eye Color" (Blue, Brown, etc.)
 Derived Attribute:
o Value is calculated based on other attributes.
o Not directly stored in the database.
o Example: "Age" can be derived from a "Date of Birth" attribute

13. What is Null value attribute?


In general, a null attribute value is the equivalent of nothing. However, it's important to be precise
in our terminology because there are many ways to represent nothing: An attribute has a value
that indicates nothingness (null) An attribute exists but has no value (empty)
14. What are the Entity and Entity sets?

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.

15. Explain the different types of relationships?


In a Database Management System (DBMS), the three primary types of relationships between
tables are: one-to-one, one-to-many, and many-to-many; where "one" represents a single record
in a table and "many" indicates multiple related records in another table, essentially defining how
data from different tables can be linked together.
16. What are the symbols used in ER diagrams?

The symbols used in an Entity Relationship (ER) diagram are:


 Rectangles: Represent entity types
 Ellipses: Represent attributes
 Diamonds: Represent relationship types
 Lines: Connect attributes to entity types and entity types to other relationship types
 Underlined attributes: Represent primary keys
 Double ellipses: Represent multi-valued attributes

17. What is Cardinality?


Cardinality at its most basic can be defined as the number of elements in a given set. In the
specific case of databases, it refers to the number of lines or records in the record.

18. Explain in brief about Key Constraints in ER Diagram?


Constraints in an Entity-Relationship (ER) diagram define how entities participate in relationships
and how interactions between entities can be designed in a database.
19. What is Super and sub Classes?

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.

20. What is inheritance in ER model?


In an Entity-Relationship (ER) model, "inheritance" refers to the concept where a subclass (lower-
level entity) automatically inherits attributes and relationships from its super class (higher-level
entity).
Department of Computer Science & Engineering
Data Base Management System

Class & Sem: II B.Tech I Sem Academic Year: 2023-2024

Question Bank
UNIT I

Topic Name: Introduction: Database system:

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.

2 Explain DBMS? Differentiate between Database and Files. [7M] [Understanding][Model


Question]

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.

TYPES OF DATABASES (or) CLASSIFICATIONS OF DATABASE


MANAGEMENT SYSTEM

A DBMS can support many different types of databases.


1. Database can be classified according to the Number of Users.

 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.

2. Database can be classified according to the database Locations.


 CENTRALIZED DATABASE
 DISTRIBUTED DATABASE
Centralized Database :-

A database that supports data located at a single site is called a centralized


database.

Distributed Database :-

A database that supports data distributed across several different sites is


called a distributed database.

3. Database can be classified according to the Data Usage.

 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.

Data warehouse database :-


A database that focus primarily on storing data used to generate
information required to make tactical or strategic decisions.

Differentiate between Database and Files

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.

 Determine the purpose of your database.

This helps prepare you for the remaining steps.

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 the information into tables:

Divide your information items into major entities or subjects, such as Products or
Orders. Each subject then becomes a table.

 Turn information items into columns:

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.

 Specify primary keys:

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.

 Set up the table relationships:

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.

 Refine your design:

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 normalization rules:

Apply the data normalization rules to see if your tables are structured correctly. Make
adjustments to the tables, as needed.

Topic Name: Characteristics (Database Vs File System):

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.

 Not enough primary memory to process large data sets. If data is


maintained in other storage devices like disks, tapes and bringing
relevant data to main memory, it increases the cost of performance.
Problem in accessing the large data due to addressing the data using
32 bit or 64 bit mode addressing mechanism.
 Programs must be written to process the user request to process the
data stored in files which are complex in nature because of large
volume of data to be searched.
 Inconsistent data and complexity in providing concurrent accesses.
 Not sufficiently flexible to enforce security policies in which
different users have permission to access different subsets of
the data.

A DBMS is a piece of software that is designed to make the preceding


tasks easier. By storing data in a DBMS, rather than as a collection of
operating system Files, we can use the DBMS's features to manage the
data in a robust and efficient manner.

Topic Name: Database Users(Actors on Scene, Workers behind the scene):

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

 Application Programmers / Back-End Developers


5
 End Users

Database Administrators (DBA):

Database Administrators (DBA) are the most important type of database users in DBMS.
Database Administrator is an individual or a team of users.

 Database Administrators (DBAs) can grant or revoke authorization permission to all


other users at any point of time

 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 / Back-End Developers:

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.

There are several categories of end-users these are as follows.

 Casual End users

 Naive or Parametric End Users

 Sophisticated End Users

 Standalone Users

Casual End users:

These are the users who occasionally access the database but they require different information
each time.

Naive or Parametric End Users:

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

Sophisticated End Users:

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.

Topic Name: Advantages of Database systems:

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.

 Program – Data Independence: -

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.

Data Independence is viewed in two categories


 Logical data independence
 Physical data independence

Logical Data Independence is related to the logical structure of the database


system. It shows the ability to modify the logical relations in one level without affecting
the constraints in the other level. i.e. it gives the logical accessing ability.

Physical Data Independence is related to the implementation criteria of the


database system. It shows the ability to modify the physical relations in one level without
affecting in the other levels where the same data structure used. i.e. it gives the physical
structure accessing ability.

 Minimal data redundancy: -

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: -

By eliminating data redundancy, the data inconsistency can be reduced to great


extent: For example, any data item is stored only once. So, updating data values is
greatly simplified when each value is stored in one place only. It avoids the wastage
storage space.

 Improved Data Sharing: -

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.

 Increased Productivity of Application Development: -

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.

 Improved Data Quality: -

The database provides a number of tools and processes to improve data


quality. Database designers can specify integrity constraints that are execute by the
DBMS. (A constraint is a rule that cannot be violated by database users).

 Improved Data Accessibility and Responsiveness: -

With a relational database, end users without programming experience can


retrieve and display data, using the language called structural query language.

 Reduced Program Maintenance: -

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.

 Improved decision making :-

Better managed data and improved data access make it possible to generate
better quality information, on which better decisions are based.

Topic Name: Database applications:

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]

Ans :Database System Applications

Databases are widely used. Here are some representative applications:


 Banking: For customer information, accounts, and loans, and banking transactions.
 Airlines: For reservations and schedule information. Airlines were
among the first to use databases in a geographically distributed
manner - terminals situated around the world accessed the central
database system through phone lines and other data networks.
 Universities: For student information, course registrations, and grades.
 Credit card transactions: For purchases on credit cards and generation
of monthly statements.
 Telecommunication: For keeping records of calls made, generating
monthly bills, maintaining balances on prepaid calling cards, and
storing information about the communication networks.
 Finance: For storing information about holdings, sales, and purchases
of financial instruments such as stocks and bonds.
 Sales: For customer, product, and purchase information.
 Manufacturing: For management of supply chain and for tracking
production of items in factories, inventories of items in warehouses /
stores, and orders for items.
 Human resources: For information about employees, salaries, payroll
taxes and benefits, and for generation of paychecks.
Topic Name: Brief introduction of different Data Models

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

relation model briefly. [7M] [R20, SET1, Feb/March- 2022] [Understanding]

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 :-

The hierarchical model is based on the tree structure that is composed of


root segments and child segments. The segment is equivalent of a record type. The
hierarchical database model implements a set of one-to-many relationships
between a parent and Childs. The following figure illustrates the basic structure of
a 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

 Even though hierarchical implementation maintains the data integrity, it


isstruggling with data dependency.
 Data redundancy was appear in the hierarchical model
 In Hierarchical model, it is not possible to represent the many to many
relationship because of the principle of the tree construction (Branches
of atree were not overlapped).
 Limited query flexibility.

Network Model :-

By using network implementation model, we can eliminate the limitations of


the hierarchical model. It uses the links or pointers to establish the relationship
between the entities or segments. By using network models, we can improve the
database performance and make the database more portable than hierarchical
database.

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

 Network database design is very difficult to design.


 It is very difficult to make the changes in the design of the database.
 This model was struggling with structural dependency.
 Greater query flexibility than hierarchical model but less than relational
model.

Relational Model :-

The relational database model is implemented through a very sophisticated


RDBMS. The RDBMS performs basic functions performed by the hierarchical model,
relational model and other functions that make the relational database model
easierto understand. It uses a special data structure called Table to store the data.
Advantages
 This model makes free the designing complexities from the user.
 This model exhibits both data independence and structural independence.
 With less programming efforts, we can easily communicate with the
database by query language called using SQL.
 New data and records can be added easily.

Topic Name: Concepts of Schema, Instance and data independence

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

data in dependence? [7M] [R20, SET 2, January- 2023] [Understnding]

Ans: External Model or External schema or External layer :-

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.

Conceptual Model (or) Conceptual schema or Conceptual layer :-

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.

The most widely used conceptual model is the ER (E means ENTITY


andR means RELATION) model. In ER model can represent the main entities, which
are used to collect the data. Normally Entity Relationship (ER) diagrams are used to
represent interactions in between the entities. It holds the logical representation of
data.
Internal Model or Internal schema or Internal layer :
The internal model maps the conceptual model to the DBMS. The internal
model is the representation of the database as seen by the DBMS. In other
words, the internal model requires the designer to match the conceptual model’s
characteristics and constructs.
Internal Model (Logical Independence)

CREATE TABLE DEPT


(DEPTNO NUMBER(2) PREMARY
KEY,DNAME
VARCHAR2(20),
LOC VARCHAR2(20));

CREATE TABLE EMP


(EMPNO NUMBER(4) PRIMARY KEY,
ENAME VARCHAR2(20),
SALARY NUMBER(8,2),
DEPTNO NUMBER(2), FOREIGN KEY(DEPT NO)REFERENCES
DEPT(DEPT NO));

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]

Physical Data Independence Logical Data Independence


It mainly concern about how the data is stored It mainly concerned about the structure or the
into the system. changing data definition.
It is easy to retrieve. It is difficult to retrieve because the data is
mainly dependent on the logical structure of
data.
As compared to the logical independence it is As compared to the physical independence it
easy to achieve physical data independence. is not easy to achieve logical data
independence.
Any change at the physical level, does not The change in the logical level requires a
require to change at the application level. change at the application level.
The modifications made at the internal level The modifications made at the logical level is
may or may not be needed to improve the significant whenever the logical structure of
performance of the structure. the database is to be changed.
It is concerned with the internal schema. It is concerned with the conceptual schema.
Example: Change in compression techniques, Example: Add/Modify or Delete a new
Hashing algorithms and storage attribute.

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].

Ans: Levels of Abstraction in a DBMS (Three tier schema architecture )

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:

 The conceptual schema(also called as logical schema) describes the


stored data in terms of the data model of the DBMS.
 In a relational DBMS, the conceptual schema describes all relations
that are stored in the database.
 In our sample university database, these relations contain information
about entities, such as students and faculty, and about relationships,
such as students’ enrollment in courses.

Students(sid: string, name: string, login: string, age: integer, gpa:real)

Faculty(fid: string, fname: string, salary : real)


Courses(cid: string, cname: string, credits: integer)
Rooms(nw: integer, address: string, capacity: integer)
Enrolled (sid: string, cid: string, grade: string) Teaches
(fid: string, cid: string)
The choice of relations, and the choice of fields for each relation, is not always
obvious, and the process of arriving at a good conceptual schema is called conceptual
database design.
Physical Schema:

 The physical schema specifies storage details.

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:

 This schema allows data access to be customized at the level of


individual users or groups of users.
 A database has exactly one conceptual schema and one physical
schema, but it may have several external schemas.
 An external schema is a collection of one or more views and relations
from the conceptual schema.
 A view is conceptually a relation, but the records in a view are not stored in the
DBMS.

Topic Name: Three tier schema architecture for data independence:

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.

Topic Name: Database system structure, environment

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.

Query Processor contains the following components

 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.

2. Storage Manager: Storage Manager is a program that provides an interface between


the data stored in the database and the queries received. It is also known as Database
Control System. It maintains the consistency and integrity of the database by applying

18
the constraints and executing the DCL statements. It is responsible for updating,
storing, deleting, and retrieving data in the database.

It contains the following components

 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.

 Transaction Manager: It controls concurrent access by performing the operations in a


scheduled way that it receives the transaction. Thus, it ensures that the database remains in
the consistent state before and after the execution of a transaction.

 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.

3. Disk Storage: It contains the following components

 Data Files: It stores the data.

 Data Dictionary: It contains the information about the structure of any database object. It
is the repository of information that governs the metadata.

 Indices: It provides faster retrieval of data item.

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 :-

Hardware refers to all of the system’s physical devices for example


computers (micro computers, mainframes, workstations and servers) storage
devices, printers, network devices (hubs, switches, routers, fiber optics) and other
devices.

 SOFTWARE :-

Three types of software and needed


 Operating system software
 DBMS software
 Application programs

 Operating system software :-

Operating system software manages all hardware components.


Examples of operating system software include Microsoft windows,
Linux, Mac OS, Unix and MVS etc.

 DBMS Software :-

DBMS software manages the database within the database system.


Some examples of DBMS software include Microsoft Access and SQL
server etc.

 Application programs :-

Computer programs that is used to access and manipulate data in the


database and provides information to users.

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]

Ans: Centralized DBMS Architecture


Architectures for DBMSs have followed trends similar to those for general
computer system architectures. Earlier architectures used mainframe computers to provide the
main processing for all functions of the system, including user application programs and user
interface programs, as well as all the DBMS functionality.

As prices of hardware declined, most users replaced their terminals with


personal computers (PCs) and workstations. At first, database systems used these computers in
the same way as they had used display terminals, so that the DBMS itself was still a centralized
DBMS in which all the DBMS functionality, application program execution, and user interface
processing were carried out on one machine. Gradually, DBMS systems started to exploit the
available processing power at the user side, which led to client/server DBMS architectures.

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]

Ans: Client/Server Architecture:


The client/server architecture was developed to deal with computing environments in
which a large number of PCs, workstations, file servers, printers, database servers, Web servers,
and other equipment are connected via a network. The idea is to define specialized servers with
specific functionalities.
The resources provided by specialized servers can be accessed by many client
machines. The client machines provide the user with the appropriate interfaces to utilize these
servers, as well as with local processing power to run local applications. This concept can be
carried over to software, with specialized software-such as a DBMS or a CAD (computer-aided
design) package being stored on specific server machines and being made accessible to
multiple clients.

The concept of client/server architecture assumes an underlying framework that


consists of many PCs and workstations as well as a smaller number of mainframe machines,
connected via local area networks and other types of computer networks. A client in this
framework is typically a user machine that provides user interface capabilities and local

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.

In client/server architecture, the user interface programs and application programs


can run on the client side. When DBMS access is required, the program establishes a connection
to the DBMS (which is on the server side); once the connection is created, the client program can
communicate with the DBMS. A standard called Open Database Connectivity (ODBC) provides
an application programming interface (API), which allows client-side programs to call the
DBMS, as long as both client and server machines have the necessary software installed. Most
DBMS vendors provide ODBC drivers for their systems.

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.

5. It is represented by a diamond shape with in a rectangle.


EXAMPLE:

27. Explain the types of attributes available in entity relational model?


Attributes are the properties that define the entity type. For example, Roll_No,
Name, DOB, Age, Address, and Mobile_No are the attributes that define entity type
Student. In ER diagram, the attribute is represented by an Elipse.

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

3. Multi valued Attribute


An attribute consisting of more than one value for a given entity. For example, Phone_No (can be more
than one for a given student). In ER diagram, a multi valued attribute is represented by a double oval.

Multi valued 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

29. Describe the Key Constraints with Employee Department example?

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.

30. Differentiate between the Ternary and Quaternary relationship in ER model?


In an Entity-Relationship (ER) model, a "ternary relationship" involves three entities participating in a
single relationship, while a "quaternary relationship" involves four entities participating in a single
relationship; essentially, they represent the degree of complexity in how entities are connected within a
data model.

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 and Specialization:

13. What is Generalization and how it is implemented using ER?

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?

In specialization, an entity is divided into sub-entities based on its characteristics. It is a top-down


approach where the higher-level entity is specialized into two or more lower-level entities. For
Example, an EMPLOYEE entity in an Employee management system can be specialized into DEVELOPER,
TESTER, etc. as shown in Figure 2. In this case, common attributes like E_NAME, E_SAL, etc. become
part of a higher entity (EMPLOYEE), and specialized attributes like TES_TYPE become part of a
specialized entity (TESTER).
Specialization is also called as ” Top-Down approach”.

15. How the Is-A relationship implemented using ER?


In an ER diagram, an "ISA" relationship, which stands for "is a", represents a hierarchical relationship
between entities where one entity is considered a specialized type of another, essentially meaning "a
subclass is a type of super class"; it's visually depicted by a triangle with the point connecting to the super
class entity and the base connected to the subclass entity.
The isa relationship is a special relationship. It is represented by a triangle with isa inside; top point
connected to super class, bottom side connected to the subclass.

You might also like