100% found this document useful (1 vote)
932 views17 pages

Dbms-Module-1 Solutions

The document discusses the components of a DBMS including interfaces for different users and internal modules. It also discusses the advantages of DBMS over file processing systems including data redundancy, restricting unauthorized access, providing backup and recovery, and enforcing integrity constraints. Additionally, it defines concepts like value sets, data models, metadata and databases and explains the three schema architecture of a DBMS.

Uploaded by

neelagund
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
932 views17 pages

Dbms-Module-1 Solutions

The document discusses the components of a DBMS including interfaces for different users and internal modules. It also discusses the advantages of DBMS over file processing systems including data redundancy, restricting unauthorized access, providing backup and recovery, and enforcing integrity constraints. Additionally, it defines concepts like value sets, data models, metadata and databases and explains the three schema architecture of a DBMS.

Uploaded by

neelagund
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 17

DBMS-18CS53

MODULE-1- INTRODUCTION TO DBMS

1. With neat diagram explain the component models of the DBMS and

their interfaces [ 8 Marks CO-1 RBTL-L2]

Answer: The below diagram show the component models of the DBMS

The above figure illustrate in a simplified form, the typical DBMS


components. The figure is divided into two parts.

 The top part of the figure refers to the various users of the database
environment and their interfaces.

 The lower part shows the internal modules of the DBMS responsible
for storage of data and processing of transactions.

The top part of Figure shows interfaces for the DBA staff, casual users,
application programmers and parametric users.

DBIT,Bangalore Page 1
DBMS-18CS53

 The DBA staff works on defining the database and tuning it by making
changes to its definition using the DDL and other privileged
commands.

 The DDL compiler processes schema definitions, specified in the DDL,


and stores descriptions of the schemas (meta-data) in the DBMS
catalog.

 Casual users and persons with occasional need for information from
the database interact using the interactive query interface and
Query Compiler compiles them into the internal form. query
optimizer is concerned with the rearrangement and possible
reordering of operations, elimination of redundancies, and use of
efficient search algorithms during execution.
 Application programmers write programs in host languages such as
Java, C, or C++ that are submitted to a precompiler.
 The precompiler extracts DML commands from an application
program written in a host programming language. These commands
are sent to the DML compiler for compilation into object code for
database access. The rest of the program is sent to the host language
compiler. The object codes for the DML commands and the rest of the
program are linked, forming a canned transaction whose executable
code includes calls to the runtime database processor.
 Canned transactions are executed repeatedly by parametric users via
PCs or mobile apps; these users simply supply the parameters to the
transactions.

In the lower part of the figure, runtime database processor executes

(1) The privileged commands

(2) The executable query plans

(3) The canned transactions with runtime parameters.

DBIT,Bangalore Page 2
DBMS-18CS53

It works with the system catalog and may update it with statistics. It
also works with the stored data manager.

concurrency control and backup recovery systems ,They are

integrated into the working of the runtime database processor for purposes
of transaction management.

----------------------------------------------------------------------------------------------------

2. Explain the main characteristics of Database approach versus the file


processing approach [8 Marks CO-1 RBTL-2]

Answer:The main characteristics of the database approach versus thefile-


processing approach are the following:

■ Self-describing nature of a database system

■ Insulation between programs and data, and data abstraction

■ Support of multiple views of the data

■ Sharing of data and multiuser transaction processing

■Self-describing nature of a database system: The database system


contains not only the database it contains the complete definition ( Database
+ metadata ) of the database and this definition is stored in the DBMS
catalog. The definition is used by the DBMS software and the DBMS users
who wants to know the structure of the database. Since the data is stored in
the DBMS catalog The DBMS software works equally with all the types of
applications where as in the traditional file system the data definition is part
of the application program hence they work only with the specific Database.
but there are some database such as NOSQL which does not require the
DBMS catalog (mete data) in this the data is stored as self describing data.

■ Insulation between programs and data, and data abstraction: In


traditional file system since the structure of the data file is embedded in the
application program any changes in the data structure then changes should
be also done in the application program, where as in the database approach,
the detailed structure and organization of each file are stored in the catalog.
DBIT,Bangalore Page 3
DBMS-18CS53

so any changes made in the structure of the database will not affect the
application program. this process is called program data independence.

The characteristics of database that helps to achieve the program data


independence is called data abstraction,DBMS provide the user with
conceptual representation of data and many data models can be used to
represent the data abstraction.

■ Support of multiple views of the data: Typically database has many


types of users and each of these users may want different view of
perspective so the DBMS should provide multiple views of the data as per
the need of the different users.

■ Sharing of data and multiuser transaction processing: As we know that


multi user database support multiple users to access the database at a
same time, the DBMS must include the concurrency control and also ensure
the transaction processing.

----------------------------------------------------------------------------------------------

3. Define the following with examples: [4 Marks CO-1 RBTL-1]


I. Value set II. Data model III. Metadata IV. Database

Answer:
Value Set: The value set specifies the set of values that may be assigned
for each individual entity. For example, we can specify the value set for
designation attribute as ( software Engg, Software Analyst, Lecture,
Assistant professor, Principal, Peon, Sweeper) etc.

Data model: Data models are used to represent the logical structure of
the database, different types of models can be used to represent the
structure of the database.

Meta data: The information about the database stored in the DBMS
catalog is called the meta-data. Meta data contains the data type, size ,
name and storage information.

DBIT,Bangalore Page 4
DBMS-18CS53

Database: Database is a collection of related data. Example The


Company Database contains the Information of the Each Employees.
----------------------------------------------------------------------------------------------------

4. List Advantages and Disadvantages of DBMS and Explain any five


advantages comparing with file Systems [8 Marks CO-1 RBTL-2]
Answer:
Following are the advantages of the DBMS:
 Data Redundancy
 Restricting Unauthorized access
 Providing backup and recovery
 Providing multiple user interface
 Efficient data access
 Enforcing Integrity constraints

Data Redundancy: Most of the DBMS provides facilities for controlling the
data redundancy using Normalization.
Restricting unauthorized access: When multiple users access the
database some of the users are not allowed to access the database.
Providing backup and recovery: DBMS must provide the facility of backup
and recovery from the hardware and software. The backup subsystem of the
DBMS is responsible for the recovery and backup.
Providing multiple user interfaces: Since database support different type
of user so the DBMS must provide different user different interface to access
the data.
Enforcing Integrity constraints: Most of the database applications have
certain integrity constraints that must hold for the data. Example: simple
integrity constraint is the data type.

Following are the Disadvantages of the DBMS:


 Significant disadvantage of DBMS is cost.
 Complexity of Backup and Recovery.
 Problems associated with centralization.
 Requirement of new and specialized manpower.

DBIT,Bangalore Page 5
DBMS-18CS53

---------------------------------------------------------------------------------------------------
5. With neat diagram explain the architecture of the typical DBMS [6
Marks]
Answer:
The below diagram shows the architecture of the typical DBMS

The goal of the three-schema architecture, shown in Figure above, is to


separate the user applications from the physical database. In this
architecture, schemas can be defined at the following three levels:
Internal Level:
 It has a Internal/ physical Schema
 It describes the physical storage structure of the database.
 It uses a physical data model and describes the complete details of
data storage and access paths for the database.
Conceptual Level:
 It has a conceptual/ logical schema
 It describes the structure of the whole database for a community of
users.
 It hides the details of physical storage structures and concentrates on
describing entities, data types, relationships, user operations, and
constraints.
External Level:
 This level includes a number of external schemas or user views.
 Each external schema describes the part of the database that a

DBIT,Bangalore Page 6
DBMS-18CS53

particular user group is interested in and hides the rest of the


database from that user group.
-----------------------------------------------------------------------------------------------------
6. What is data independence? Explain different data independence [4
Marks CO-1 RBTL-2]
Answer:
Definition: The capacity/ability to change the schema at one level of a
database system without having to change the schema at the next
higher level is called Data Independence.

There are two types of data independence:

Physical Data Independence: is the ability to change the internal schema


without having to change the conceptual schema.
Example: By creating the additional access structure to improve the
performance of the retrieval or update.
Logical Data Independence:is the ability to change the conceptual schema
without having to change the external schema.
Example: We may change the conceptual schema to expand the database by
adding a record types or data items or reduce the database by
removing the records.
The below diagram shows the Data Independence

-------------------------------------------------------------------------------------------------------

DBIT,Bangalore Page 7
DBMS-18CS53

7. Define the following with examples: [8 Marks CO-1 RBTL-1]

I. Schema II. Data model III. Instance IV. Canned Transactions

Answer:

I) Schema: A database schema is the skeleton structure that represents


the logical view of the entire database. It defines how the data is
organized and how the relations among them are associated. It
formulates all the constraints that are to be applied on the data.
Example: Schema of Student Entity:
STUDENT

II) Data Model: Data Models is a collection of concepts that can be used
to describe the structure of the Database OR Data models define how
the logical structure of a database is modeled.
Example: Below Example shows Entity Relationship Model

III) Instance: The data which is stored in the database at a particular


moment of time is called an instance of the database
Example: The student table has two instances

IV) Canned Transaction: are standard types of queries and updates


which frequently used by Naive or parametric end users to constantly
querying and updating database
----------------------------------------------------------------------------------------------

DBIT,Bangalore Page 8
DBMS-18CS53

8. Write a short notes on specialization and Generalization with


example [6 Marks CO-1 RBTL-1]
Answer:
Specialization:

 Specialization is a top-down approach, and it is opposite to


Generalization. In specialization, one higher level entity can be broken
down into two lower level entities.

 Specialization is used to identify the subset of an entity set that


shares some distinguishing characteristics.

 Normally, the superclass is defined first, the subclass and its related
attributes are defined next, and relationship set are then added.

For example: In an Employee management system, EMPLOYEE entity


can be specialized as TESTER or DEVELOPER based on what role
they play in the company.

Generalization:

 Generalization is like a bottom-up approach in which two or more


entities of lower level combine to form a higher level entity if they have
some attributes in common.

 In generalization, an entity of a higher level can also combine with the


entities of the lower level to form a further higher level entity.

DBIT,Bangalore Page 9
DBMS-18CS53

 Generalization is more like subclass and superclass system, but the


only difference is the approach. Generalization uses the bottom-up
approach.

 In generalization, entities are combined to form a more generalized


entity, i.e., subclasses are combined to make a superclass.

For example, Faculty and Student entities can be generalized and


create a higher level entity Person.

--------------------------------------------------------------------------------------------------------
9. What are structural constraints with relationship type? Explain with
example? [6 Marks CO-1 RBTL-1]
Answer:

 Structural Constraints are also called Structural properties of a


database management system (DBMS).
 Cardinality Ratios and Participation Constraints taken together are
called Structural Constraints.
 The Structural constraints are represented by Min-Max notation.
This is a pair of numbers(m, n) that appear on the connecting line
between the entities and their relationships.
 The minimum number of times an entity can appear in a relation is
represented by m whereas, the maximum time it is available is
denoted by n.
 If m is 0 it signifies that the entity is participating in the relation
partially, whereas, if m is either greater than or equal to 1, it denotes
total participation of the entity.
 Example:

DBIT,Bangalore Page 10
DBMS-18CS53

---------------------------------------------------------------------------------------------
10. Explain different type of attributes that appear in ER Model with an
example [6 Marks CO-1 RBTL-2]
Answer: There are five types of attributes: Simple, Composite, Single-
valued, Multi-valued, and Derived attribute.
1. Simple attribute:
An attribute which cannot be further subdivided into components
is a simple attribute.
Example: The roll number of a student, the id number of an
employee.
2. Composite attribute:
An attribute which can be splitted into components is a composite
attribute.
Example: The address can be further splitted into house number,
street number, city, state, country and pincode, the name can also
be splitted into first name middle name and last name.
3. Single-valued attribute:
The attribute which takes up only a single value for each entity
instance is single-valued attribute.
Example: The age of a student.
4. Multi-valued attribute:
The attribute which takes up more than a single value for each
entity instance is multi-valued attribute.
Example: Phone number of a student: Landline and mobile.
5. Derived attribute:
An attribute that can be derived from other attributes is derived
attribute.
Example: Total and average marks of a student.

DBIT,Bangalore Page 11
DBMS-18CS53

-------------------------------------------------------------------------------------------
11. Design ER Diagram for keeping track information about Bank
database taking into account at least four entities [4 Marks CO-1
RBTL-5]
Answer:

--------------------------------------------------------------------------------------------------------
12. Define the following: [10 Marks CO-1 RBTL-1]

I. Weak entity II. Degree of a relation III. role names and


recursive relationship. IV. Participation Constraints V.
Cardinality ratio
Answer:
I. Weak Entity: Entity which do not have key attribute is called the weak
Entity. Weak Entity are denoted by double rectangle. Weak entity
participation will be total participation always.
Example: PAYMENT entity is weak entity that is dependent on Entity
OFFICER

DBIT,Bangalore Page 12
DBMS-18CS53

II. Degree of a Relation: In DBMS, a degree of relationship represents the


number of entity types that associate in a relationship. For example,
we have two entities, one is a student and the other is a bag and they
are connected with the primary key and foreign key. So, here we can
see that the degree of relationship is 2 as 2 entities are associating in
a relationship.

III. Role names and Recursive Relation:

Role Names:The role name signifies the role that a participating entity from
the entity type plays in each relationship instance, and it helps to
explain what the relationship means.
For example, in the WORKS_FOR relationship type, EMPLOYEE plays the
role of employee or worker and DEPARTMENT plays the role of
department or employer.

Recursive Relationship: When there is a relationship between two entities


of the same type, it is known as a recursive relationship.
For example, in the EMPLOYEE relationship type, 1 EMPLOYEE supervises
N EMPLOYEES.
----------------------------------------------------------------------------------------------

DBIT,Bangalore Page 13
DBMS-18CS53

13. What are roles and responsibility of DBA and Database Designers [4
Marks CO-1 RBTL-1]
Answer:
DBA: DBA stands for Database Administrators, primary job is to ensure that
data is available, easily accessible and protected from loss and
corruption. DBA is also responsible for software installation and
maintenance, Data transformation and loading, database backup and
recovery,providing the authentication and monitoring the performance
of the database users.

Database Designers: Database designers are responsible for defining the


detailed database design, including tables, indexes, views, constraints,
triggers, stored procedures and other database specific constructs
needed to store, retrieve and delete the persistent objects.
------------------------------------------------------------------------------------------------------
14. Explain different types of user friendly interface and different types
of users who typically use each [5 marks CO-1 RBTL-2]
Answer: Different types of friendly interfaces are:
 Menu –Based interfaces for Web clients or Browsing
 Applications for Mobile Devices
 Formed Based Interfaces
 Graphical User Interfaces
 Natural Language Interfaces
 Keyword Database Search
 Speech Input and Output
 Interfaces for parametric Users
 Interfaces for DBA

 Menu –Based interfaces for Web clients or Browsing: These interfaces


present the user with lists of options (called menus), where the user
can make their request selecting the options.
 Applications for Mobile Devices: These interfaces provide the mobile
applications for the user to access their data.

DBIT,Bangalore Page 14
DBMS-18CS53

 Formed Based Interfaces: These interfaces provide the form to the


users and the users use the form to enter the fields to insert new data ,
user can fill certain data or all data.
 Graphical User Interfaces: A GUI typically displays a schema to the
user in diagrammatic form. The user then can specify a query by
manipulating the diagram.
 Natural Language Interfaces: These interfaces accept request written
in English or some other language and attempt to understand them. The
natural language interface refers to the words in its schema as well as to
the set of standard words in a dictionary to interpret the request.

Following the different types of user:

DBIT,Bangalore Page 15
DBMS-18CS53

ER DIAGRAM FOR LIBRARY MANAGEMENT:

ER DIAGRAM FOR COMPANY DATABASE

DBIT,Bangalore Page 16
DBMS-18CS53

EXTRA TASK FOR YOU:

Design ER Diagram for AIRLINE database taking into account at least


four entities specify primary key, structural constraints and weak
entity [4 Marks CO-1 RBTL-5]

DBIT,Bangalore Page 17

You might also like