0 ratings0% found this document useful (0 votes) 122 views55 pagesDBMS 3 Module
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here.
Available Formats
Download as PDF or read online on Scribd
Introducti
the types of Databases.
1.1__ Introduction to DBMS
‘Q. Explain the detailed concept of DEMS.
‘© Allof us are very much familiar with the term called
‘as data. We come across term data regularly in our
day to day life. The name of a person, the price of a
book, a number of students in a college, pin code of a
city, ete. are some examples of data.
© In our daily life, we have to remember the bulk
amount of data. But it is easier for us to remember
only some amount of data.
Example
‘* You may be in a position to tell accurately the age,
height, income, educational qualification, residential
address, etc. of your close friends.
‘© But it is very difficult for you to memorize all these
information for a large number of individuals in your
company.
1. Data
‘© The facts and figures that can be recorded in system
and that have some special meaning assigned to it.
‘The system can be a manual system (register) or it
can be a computerized system,
‘© Example : Date of a customer like name, telephone
number, address and product purchased date ete.
As need of data increased, there was need to develop a
‘computer based system for storing and managing data
‘asa file system or information system,
2. Database
F
ion To Database Concepts
Introduction, Characteristics of Databases, File system v/s Database system, Data abstraction and Data
Independence, DBMS system architecture, Database Administrator (DBA), Role of DBA, Selt-learning Topics: Identify
* Acdatabase is a collection of data items stored in one
place and having something common between them
Like a college database contains teachers, students,
books, canteen etc. college is common (Base) between
all above data items.
* So Data with a common base (Background) is called as
Database (Data + Base).
‘+ Example : College database stores information about
studenta, teachors, classes, subjects (data with college
as base).
«The database acts as a logical collection of relevant
data, It is designed to offer an organized mechanism
for storing, managing and retrieving stored
information.
* A Database Management System (DBMS) is «
collection of software or programs which help user in
creation and maintenance of « database (set of
information). Hence it is also known as &
‘computerized record-keeping system.Or veteiniewmcam
DBMS is the software system that helps in the process
of defining, constructing, manipulating the database
* Database management aystem has become an integral
Part of the information systems of many organizations
a it is used to handle a huge amount of data.
+ Computer-based Information Systems (IS) is
capable of serving to many complex tasks in @
coordinated manner. Such systems handle large
volumes of data, multiple users and several
applications in a centralized database environment.
‘* The heart of an Information System (IS) is database
management system. This is because most
Information Systems (IS) have to handle huge
amounts of data. This core module of an IS is also
called as Database Management System (DBMS).
° Examples
© MS Access, Fox Pro by Microsoft
© Oracle by Oracle corp.
© SQL Server By Microsoft.
o _ Ingres, DB2 by IBM.
Ex. 1.1.1 : Draw EER diagram for Library Management
‘System showing aggregation. MU _ Dec. 17.10 Marks
Soin. :
Fig. Ex. 1.1.1 : Library Management System
(Reter Chapter 2 for Details)
1.2 Characteristics of DBMS
Q. Explain the features of DBMS.
@. Explain various advantages of Databases. rd
© The database approach has many important
characteristics due to which database has become an
integral part of the software industry.
2 introduction To Database
teristics of the 4
The various
mentioned below :
Data integrity
Data security
Data independence
‘Transaction control - Commit and Rollback
Coneurrency control
Data recovery — Backup and Restore
1. Data integrity
Integrity constraints provide @ way of ensuring th,
changes made to the database by authorized ug,
that do not result in # loss of data consistency gy
correctness.
© Database integrity concern with the correctness gq
completeness of data in the database.
‘= This objective can naver be guaranteed. one can
ensure that every entry made in database is accuraty
© Some examples of incorrect data are as below :
1. Student taking admission to branch which is a
available in college.
2. Employee assigned with non existing department
3. Sometime inconsistency introduced due to systa
failures.
2. Data security
* A DBMS system always has a separate system &
security which is responsible for protecting databe
‘against accidental or intentional loss, destruction
misuse.
© Data in database should be given to only authori=
‘users.
© Only authorized users should be allowed to mod
data.
© Authorized users are able to access data any time?
wants.
3. Data independence
Data Independence can be defined as the capacity’
change data kept at one place without changing dé
kept at other locations.
4, Transaction contro! — roliback
‘* The changes made to database can be reverted be
with help of rollback command. “~
'* The changes can be saved successful with help’
easene
commit data command.
we
EE ee eeeDEMS ARE Sem S17) Introduction To Databane Concapt
& Concurrency control
2 The data in datatase can be accessed by multiple
lasers at same point of time
© Sock operations allowed by sharing same data
between multiple users
6 Data recovery - backup and restore
‘© Database recovery is the process of restoring the
database to original (cornet) state after database
fature
© The main element of database recovery is the most
recent database backup.
© If you maintain database backup efficiently, then
database recovery is very straight forward process.
13 File tem v/s Database System
Porno rena es eRe Vener SF
[a Decuss the ecvantages of Database system over
| Rlessyeen
| @ Explain adventages of DEMS over file system.
@ List four significant differences between file
tthe cto aria
oem
a re
5, Standards can be onforoed
© Stondarsle (rites and regulations for coding and
designing) oan be enforced on the database to regulate
the acenss to the database,
© Primary Kay conatraint or forwign key constraint ean
be enforced on database which will be helpful for
ncooaning data from dlatabnne,
4 Scourity restrictions ean be applied
* Sccurity is the process of limiting access to the
database server itaelf for some users
* Iti the most important for security and needs to be
carefully planned,
7. Integrity oan be maintained
‘Through integrity, one can ensure only accurate data
is stored within the database,
& Data independence can be provided
‘+ None of the users need to know the technical aspects
of the database to access it,
© They are physically as well as logically independent to
access the database.
9. New applications may be developed using the
existing database,
1. Redundancy can be reduced
As we are using relational approach for data
organization, data is not stored in more than one
location.
© Repetition of information can be avoided which in
tum saves storege space.
2 Inconsistency can be avoided
With the usage of database, it is assured that all the
users access actual or true data present in the
database.
3, Data can be shared
* ‘Multiple users can login at a time into the database to
‘sccess information.
* They can manipulate the database in a controlled
environment.
* Example : In yahoo portal, many users are accessing
data in database in a controlled manner.
4. With a centralized control of data, the database
system may be designed for an overall optimal
Performance for entire organization.
1, Naive users
+ Naive users are users who interact with the system
using application programs that have been developed
previously.
* For example, Student wants to pay fees Ra.50 then
accountant will invokes a program called
fees_payment{). This program asks the accountant for
the amount of fees to be paid,
* The typical graphical user interface for naive users ia
‘2 kind of form interface, where the user can fill in
‘appropriate flelds of the form,
* A given end user can access the database via one of
the applications or can use an interface provided as an
integral part of the database system software (such
{interfaces are also supported by means of applications,
of course, but those applications are builtin, not user-
written, o.g., query language processor) — “
* Naive users can read reporta generated from the
database,W_ vam (au.sem. 9-7
2. Application programmers
* Application programmers responsible for writing
application programs that use the database.
Application programmers are developers or computer
professionals who write application programs
Application programmers develop user interfaces
‘using any preferred language.
Rapid Application Development (RAD) tools are
available nowadays that enable an application
Programmer to construct application without writing
code
Some programming languages combine control
structures with database language statements. Such
languages, called fourth-generation
languages.
Sophisticated users
Sophisticated users interact with application without
writing programs by using a database query language.
This query will be solved by query processor.
Online Analytical Processing (OLAP) tools is used
to view summaries of data in different ways which
helps analysts (e.g. sales of region, city etc.) with
OLAP analysts can use data mining tools, which help
them find certain kinds of patterns in data
Specialized ust
Creates the actual database and implements technical
controls needed to enforce various policy decisions.
Specialized users are sophisticated users who develop
database applications
The DBA is also responsible for ensuring that the
system operates with adequate performance and for
providing a variety of other related technical services
sometimes
1.5 Data Model
@. Explain different data models with its advantages
and disadvantages.
‘© The data model will give you the idea how your final
system or software will look like after development is
completed.
This concept is exactly like real world modeling in
which before constructing any project (Bridges,
Buildings, Towers ete.) engineers create a model for it,
this model gives you the idew about how your project
will look like after construction.
‘A data model is an overview of @ software system
which deseribes how data can be re
16 Introduction To Databs,
‘accessed from software System afte,
implementation.
Data models define data elements ang
among various data elements for a speci,
é
rel
ied
atic
=
Definition
According to Hoberman (2009)
4p data model is a way finding tool for boy,
‘and IT professionals, which uses a set ot ema
informa,
improve communication within the ole
thereby lead to a more flexible and stable g,
text to precisely explain a subset of r
%
ion
environment.” Peleg
Data model is a simple Abstraction of compe,
world data gathering environment. .
1.6 Benefits of Data Modeling
© Adata model is @ set of concepts that can be us
describe the structure of data in a database
In Fig. 1.6.1 (Simple Logical Data model) we
described structure of student data and class data,
Data models are used to support the developm
of information systems by providing the definition »
format of data to be involved in future system,
Data model is acting like a guideline for developm
also gives idea about possible alternatives to achie
targeted solution.
A data model can be sometimes referred to as adi
structure, especially in the context of programm
languages.
In Fig. 1.6.1 (Simple Logical Data model) students
class are data structure of type class.
.DBMS (MU
a. Reduced risk
‘© Data model prevents system from future risk and
failure by defining structure of data in advance,
© As we got iden of final system in the beginning of
development itself so if need to have any revision or
improvement we can do it in system, as actual aystem
is not yet developed.
b, Reduced cost
‘As we got an ides of final system at the beginning of
development itself, so we can reduce cost of project by
proper planning and cost estimations as actual system
is not yet developed.
c. Minimizes redundancy and data compatibility
Data repetition and data type compatibility can be
checked and removed with help of data model.
d. Improves effectiveness of system
We can improve Graphical User Interface (GUD of
system by making its model and get it approved by its
future user (user of that system) so it will be simple for
them to operate system and make entire system
effective.
1.7 DBMS System architecture
1. Introduction
© The basic building block for any of model is Entities,
Attributes, relationships and constraints.
This Model uses collection of tables to represent
relationships amongst the data.
2. Entity
© A fundamental component of a model. An entity is
having its own independent existence in real world.
Example, A Student, Faculty, Subject having
independent existence.
* An entity may be an object with a physical existence
or it may have logical existence.
Example, Entities like Department, Section, adult
(age>18) may have physical existence or it may have
only logical existence,
3. Attributes
© Each entity has its own properties which describes
that entity such properties are known as attributes.
In relational model, the column in relation (Table) or
field of data is also called as Attribute,
The single attribute will contains the similar type of
data of all entities in relation.
15 Introduction To Datat
pase
Mahesh
Suhas
‘Jay
‘Sachin
Example, ‘The Name attribute in above student
relation will contains the name of all student entities
in student relation,
4, Relationships
© A relationship is an association among several
entities, E.g, Employee works for Department.
# Degree: The degree of relationship type is number of
participating entity types in particular relation.
Data model uses three types of relationships as below:
, Oneistoone
1. One entity is associated with at most one
other entity.
2, Eig One department can have only one
manager.
b. Oneis to Many
1. One entity is associated with any number of
entities in other entity.
2. Eyg. One teacher may teach to many
students.
Many is to Many
1. One entity is associated with any number of
entities in other entity,
2. E.g. Books in library issued by students.
1.8 Object Based Logical Models
‘The data is stored in the form of objects, which are
structures called classes that display the data within
it,
‘The fields are instances of these classes called as
objects, This model is used in file management
systems,
‘The DBMS (Database Management System)
developed with help of such model is called as
OODEMS (Object Oriented Database Management
System).
Object oriented databases evolved to handle more
complex applications such as databases for scientific
experiments, geographic information system,
engineering design and manufacturing.lonr modular
Structure which is good for defining abstract data
‘types where internal implementation details are
hidden.
‘This model is easy to maintain and modify existing
code as we can create new model with small change in
existing.
Disadvantages
1, This model is often provided through object oriented
languages such as C+ and Java,
2. Practically very complex and inapplicable many a
times.
1.9 Record Based Logical Models
Q. _ Expiain Record based logical model.
@. Introduction
* The relational model first proposed by E, F. Codd
‘henee he is known as father of Relational Model.
* A relational database is a collection of 2-dimensional
tables which consists of rows and columns.
coLUMN —,
TABLE
Fig. 1.9.1 ; Relational model
b. Example
Most of the popular commercial DBMS products like
Oracle, Sybase, MySQL ete. are based on relational
model.
1, Relational algebras A relalional database suppor,
Felationalalgshrn and various operntions of th
thoory (like union, intersection ete.)
4 Dynamlo views In « RDINS, a view ie not party
the physical chore, it 8 alwayn dynamic. Hn
chaning the data in a table also changer the day
present in view
8. 8QL (Structured Query Language) + Por day
access in RDBMS we have English ike query nnguag,
called ax structured Query language (SQL) which cay
be used for acceesing data from RDBMS. Most of thy
Aatabase vendors support the SQL standard.
4 Excellent data security : Relational database
Support the concept of user rights (every user
‘signed with some database permission called as use
rights), thus meeting the security needs of databases,
1,10 Hlerarchical Model / Tree Model /
XML Based Data Model
Sa oct
Q. Explain Hierarchical model,
. Introduction
‘* This was developed by joined efforts of IBM and North
American Rockwell known as Information
‘management system.
* Itwas the first DBMS model,
‘* The data is sorted hierarchically, either in top down or
bottom up approach of designing.
* This model uses pointers to navigate between stored
data,
* This model represents data asa hierarchical tree.
One of the popular DBMS based on hierarchical moda
ia Information Management System (IMS) from IBM.”
—.c. Advantages
1, Conceptual simplicity
Relationship between various levels is logically very
simple, Hence database structure becomes easier to
view.
2. Database security
Security is given by DBMS system itself it doos not
depends on whether programmer has given security or
not.
3. Simple creation, updation and access
Hierarchical model is simple to construct with help of
pointers or similar concepts and very simple to
understand also adding and deleting records is easy in
tree structure using pointers, This file system is faster
and easy data retrieval through higher level records in
tree structure.
4. Database integrity
‘There is always Parent Child Association between
different levels of records in files. Hence child record is
attached with the parent record which maintains the
integrity.
4. Disadvantages
1 Complex implementation
Only data independence is not enough for designer and
programmers to build database system they need to
have knowledge of physical data storage which may be
complex.
2. Difficult to manage
‘Any change in a location of data needs change in all
application programs that accesses changed data. Data
access is restricted by Pointer path.
3. Lack of structural independence
© Change in database structure does not affects data
access is called as structural independence. Advantage
of data independence may be restricted by structural
independence.
© Complex application programming
© Programmers must know how physical data is stored
in order to access data. Even programmer knows path
of data storage.
1.11_ Network Model
@._ Explain network database modal,
Introduction To Database Cé
a. Introduction
© Like the hierarchical model, this model also uses
pointers toward data but there is no need of parent to,
child association so it does not necessarily use a
downward tree structure,
© This model usod in network databases.
ais
Fig. 1.11.1 : Network model
b, Example
IDS (Integrated Data Store) is one of the DBMS
product based on network models. This was: developed
by joined efforts of IBM and North American Rockwell
known as Information Management System.
c, Advantages
1, Simple design : The network mode! is simple and
easy to design and understand,
2, Ability to handle many types of relationship
a. The network model ean handle the one-to-many or
many-to-many or other relationships.
b. Hence network model manages multi user
‘environment.
8. Ease of data access:
a. In an model an application can access a
root (j ) record and all the member records
within a aet(child).
b. Provide very efficient and high speed retrieval.
d Disadvantages
1. yatvun ope
a ie a td edDBMS (M
1.13 Schema and Instances
Introduction To Database Conc
G. Write a note on : Database Schema and Instances
1, Database Schema
# Database schema is 4 structure denotes: the logical
view of complete database.
‘© Schema consists of entities and relationship among
these entities.
* Tis similar to programming data types and variable
to store data,
© The database schema is the information about
database or table structure.
Sid
Student Class
table
Name
Subject
Fig. 1.13.1: Student Database Schema
2. Types of Database Schemas
1. Physical Database Schema
+ This schema represents physical structure of data or
actual storage of data.
+ Itis similar to actual variable in programming.
+ It defines how the data will be stored in memory.
Example,
+ The name is stored as a character data in storage.
b, Logical Database Schema
© This schema shows the logical structure need to be
applied on the data stored.
‘© Similar to as data type of variable.
© It can be defined as tables, views, and integrity
constraints
Example,
The database consists of information about a set of
students and departments in a college and the
relationship between them
2. Database Instance
© The data content of the database at a particular point,
in time is also referred as a database instance,
Fig, 1.13.2: Student Database Instance
* It is always possible that this data will change with
time. So it is very dynamic in nature,
|. Explain three-level architecture of DBMS.
@. State and explain various levels of database
abstraction,
@, Explain physical,
abstraction of DBMS,
conceptual and view level
1, Introduction
© ‘The goal of the three-schema architecture is to
arate the front end (user applications interface)
and the back end (physical database),
‘© ‘The three-echema architecture is a tool with which the
user can visualize the schema levels in a DBMS. Many
DBMS systems do not separate the three levels
completely, but support the three schema architecture
to some extent.
«A description of data in terms of a data model is called
schema,
© The description of a database is called database
schema, which is specified during database design
and it does not expected to change frequently.
2, Database architecture
Fig. 1.141: Database acherna lvela
a. Internal level (physical level)
‘© ‘The internal level is very close to physical storage of
data,
‘© This level describes the physical storage structure of
the data in database,
© Tho internal (or physical) database ia stored on
secondary atorage devices, mainly the magnetic disk.
varat data atoragy aid
‘arvous availatle aconat methists forthe ditaliane
ACs around evel, it tara nthe form of ita with
Ae nhs dktreame ah tho secondary atte
aovicn,
At ite Righwt tere, it can he viewed in the form of
Ales and simte data structive
Internal view schema)
© The internal view defines the various stored data
See and specified what indexer exist, how that
Stored flekds are represented and a0 00,
‘The internal schema usee a physical data rate!
Example,
. ‘The conceptual model is also called as the data model
oF we can say data model is used to describe the
Conceptual schema when a database system is
implemented.
* The conceptual schema hides the internal details of
physical storage and targets on describing entities,
‘data types, relationships and constraints,
‘* The conceptual schema contains all the information to
‘build relevant external records. As the conceptual
‘model is derived from the physical model
Conceptual view / schema
© The conceptual view is a representation of the entire
content of the database.
+ The conceptual view includes definitions of each of the
various conceptual data types.
¢. External level (view level)
* The external level is the one closest to the user,
is the related with the way data is viewed by
individual end users.
The external level includes a number of user views of
external schemas.
MON of 4
Antanas tate ruled PF 4 PArTCUIRE UF gr
tnt iow the rot of the dataeon rom thar gt
uy
# Rstornal viows are the propor interface between
ver anid the databane, an an Individual agp
Illy be expected to 6 Interested tn the enn
database.
+ The oxtornal todo! is derived from the eonoyptig
model,
External view / schema
external echema consiate of definitions of each of thy
various external data typed in that external view,
t-—f
Fig. 1.14.2: Three level schema architecture
d. Mapping
* The processes of transforming requests and results
‘between various levels of architecture are called
‘mappings.
© These mappings may be time-consuming, so small
databases do not support external views,
* External / conceptual mapping : The DBMS must
‘transform a request on an external schema into 1
‘Tequest against the conceptual schema,DBMS (MU-Sem, 3-[T) Introduction To Database Concapl
Concept of data independence can be explained with
help of 3 schema architecture. The threo-«chema
architecture can make it ensior to achieve true data
independence.
1, Definition
Data Independence can be defined as the eapacity to
change one level of schema without changing the
schema at the next higher level
a. Logical data independence
* Logical data independence is a capacity to change the
conceptual schema without having any changes to
external schemas. (or application programs)
© Separating the external views from the conceptual
view enables us to change the conceptual view without
affecting the external views. This separation is
sometimes called logical data independence.
* Example : We may change the conceptual schema by
removing a data item. In this case the external
schemas that refer only to the remaining data should
not be affected.
b. Physical data independence
© Physical data independence is a capacity to change
the internal schema without having any changes to
conceptual schema.
* The separation of the conceptual view from the
internal view enables us to provide a logical
description of the database without the need to specify
physical structures, This is often called physical data
independence.
* Example : By creating additional access paths to
improve the performance of retrieval, If the same data
as before remains in the database, we should not have
to change the conceptual schema.
1.16 Database Administrator (DBA)
Q. Define following terms : OBA.
© The database administrator ie responsible for the
overall planning of the company’s data resources, for
the design of data, and for the day-to-day operational
spects of data management.
+ A database administentor i a person responsible for
the {nstallation, configuration, up gradation,
maintenance and monitoring databases in an
organization.
‘The overall planning of corporate data is the strategic
aspect of the database administration function and
involves company-wide planning of existing data and
‘assosement of organization-wise data standards
1.17 Role of Database Administrator
(DBA)
Q. Discuss the role of Database Administrator.
ERC
1.17.1 Roles of DBA
@. Explain Role of DBA?
De
© The DBA needs to performs many roles to keep the
database up and running,
‘© System Administrator / Designer
© ‘The database administrator need to manage DBMS
software and server.
‘© He is also responsible for deciding on the storage and
access methods.
© ‘The DBA performs ell data field updates or adding
new fields into database.
+ Database Developer / Programmer
© The DBA writes the programmes to design database
and to design the means of reorganizing databases
periodically.
* The DBA also determine and implement database
searching strategies.
© System Analyst *
* The DBA needs to analyses the system performance
and fine tune the DBMS activities.
* DBA needs to take care of system crashes by planning
proper recovery procedures, 7
* He will also specify techniques for monitoring
database performance
1.17.2 Responsibilities of
eS JetDAMS (MU-Sem,
Designing overall Database schema
‘The DBA is responsible for designing overall database
Schema (tables and fields), Also responsible for
‘deciding on the data storage and access methods,
Selecting and installing database software and
hardware
The DBA selects the suitable DBMS software like
Oracle, SQL Server or MySQL. The Designing the
‘Means of reorganizing databases periodically,
Designing Authorization/Access Control
The DBA will decide the user access levels and
‘security checks for access and data manipulations,
* Designing Recovery Procedures
In order to take care of system crashes DBA needs to
design the system recovery procedures and also
Specifying techniques for monitoring database
performance.
‘* Operations Management
* The operations Management of database
‘Administration deals with data problems arising on a
day-to-day basis. Specifially, the reoponsibilities
include
© Investigation of errors found in the data.
© Supervision of restart and ‘Tecovery procedures in
the event of a failure.
© Supervision of reorganization of databases,
© Initiation and control of all periodic dumps of
data,
1.17.3 Skills required for DBA
Q. List the important sii
‘Administrator (OBA),
‘The various programming and soft skills are required
to DBA are as follows,
© Good communication skills
© Excellent knowledge of d
and design and RDBMS:
© Knowledge of Structured Query Language (8QL),
* In addition, this aspect of database administration
includes maintenance of data security, which
involves maintaining security authorization tables,
‘conducting periodic security audits, investigating all
known security breaches,
ited to a Databast
bases architecture
Introduction To Ot
80 Conceny,
© ‘To carry out all these functions, it is crucial that
DBA has all the nccurate information about 4,
company’s data rendily on hand. For this parpose j,
maintains a data dictionary.
# The data dictionary contains definitions of all day
items and structures, the various schemes, iy
relevant authorization and validation checks and ty
different mapping definitions.
‘© It should also have information about the source ang
destination of a data item and the flow of a data itey
as itis used by a system. This type of information is,
great help to the DBA in maintaining centralizn,
control of data.
1.18 Detailed DBMS Architecture
1.18.1 DBMS Architecture
Q. Draw and explain database system structure.
Q. Describe overall architecture of DBMS with diagram.
. A database system can be separated into two different
modules that deal with all operations of the overal]
‘system.
* Components of a database system,
1, Query Processor Components
2. Storage Manager/ Storage Management
8. Transaction Management
* The storage manager is important because databases
‘typically require a huge amount of storage space.
1.18.2 Query Processor ComponentsW_ Dams (Mu-Sem 317) 1 Introduction To Database Concept
1b, DML compiler
© This will translates DML statements in a query language into low level Instructions that the query evaluation
engine understands,
A quory can usually be translated into any of a number of alternative evaluation plans for same query result DML,
compiler will select best plan for query optimization
©. Query evaluation engine
‘This engine will execute low-level instructions generated by the DML compiler on DBMS,
Bophislioalod
Databawsa
‘edminintrator
Use
Triioos:
1.18.3 Storage Manager / Storage
Management
@. Write a short notes on : Storage management.
¢ Actorage manager is a program module which acts
like interface between the data stored in the database
and the application programs and queries submitted
to the system.
‘© The data is stored on the disk using the file system.
© The storage manager is programme which is
responsible for the interaction with the file manager.
‘© The storage manager translates the various databases
language statements into low level file system
commands.
‘Thus, the storage manager is responsible for storing,
retrieving and updating date in the database.
‘The storage manager components include :
© Authorization and integrity manager :
Checks for integrity constraints and authority of
‘users to access data.
© Transaction manager, which ensures that the
database remaina in a consistent (correct) state
although there is system failures.
© File manager, which manages the allocation of
‘space on disk storage and the data structures
used to represent information stored on disk,
ata)
ne (Mu
Intvosucion To Database Cone
14
——————————— Er
Sm A ah ae ate tered
6 Wuafter manager, which ie reaponatble for
retrieving data (vam disk atornge Into main
memory. The buffer manager (n ati important part
of the database ayetom, anit anabios the dntabnne
to handle data wivon that are much larger than
the wine of main memory
©) Data structures implemented by storage manager,
Dante files | Stored in the databane itself
Data dictionary + Store motndata about the
etructure of the database,
Indtboon 1 Prowide that necons to dnta item,
action Management
‘shor note on | Transaction managernant
Tr
Werte
A tranaaction is n series of amall databare oporations
‘hat together form a single large operation,
© A Wanenction in started by issuing a BEGIN
THANKACTION command, Onco this command ix
exscvted the DINMH starts monitoring the tranaaction.
© All operntions executed after a BEGIN
TRANSACTION command aro treated ax a single
Inge operation,
© Application programe une transactions t execute
sequences of operations when it is important that all
the operations are successfully comploted.
* Tennanction management componont will ensure the
‘Momicity and durability properties.
1.19 Working of DBMS
8. User requenta data item from database,
b. DIMB intoroepta and interpreta the roquont
Hotrioven the data from the physical database,
Constructs the record uring phynienVeonceptual
mapping
+, Records constructed using relevant concoptual /
‘external mapping
{ Derivew the required external record from eoneoptual
soourd,
Kxnmpie
* Connider the situation in a Wbrary. Hore, we have
Guta corremponding to books, authors, suppliers,
borrowern, ote, The total volume of date stored and
handled {0 0 Hbrary may be quite large,
© The Library DIME inny require several operations,
uch ae ienue, return or purchase of books; handle
quar renting 10 ook information, rms
Information, oe
Moreover, there are different ‘p08 of teary
pore various ages or activitien. FOr ittang
horrower may merely view certain inf
vaherean an iaswer may be aliowed 10 update th mg
ofa book during iasue or return
‘thw Library staff may, on the other hand, add ny
hooks, their supplier, price and other information,
the database.
«Bach user category ht different access Fight
both, the data, as well asthe processing capabilit
Multiple users may concurrently operate the lity
DBMS performing several tasks at the same time,
‘They may even try to access the same dy
simultaneously. It is the job of a DBMS to handle
data and it's processing in an integrated, coordinay
and consistent manner.
Witte advantages of DBMS over a file system.
State five main advantages of DBMS.
‘What are ine diferent types of database system user?
st the functions of a Database Administrator (DBA).
Write shor note on : Responsibilities of databex
adminiatrator,
8, Dovcrbe the overall architecture of DBMS with diagran.
7. Explain the following term ; Data independence and ®
types.
8, Explain he features of DBMS,
Explain three-level architecture of DBMS.
10, Explain need of data model in DBMS.
11. Explain the difference between extemal, internal #
‘conceptual schemas. How these diferent layers #
‘elated to the concepts of logical and physical «
‘phyaloal data independence ?
12,Descrive advantages of database management sys”
‘over fle-processing system,
19. What are the advantages of fle processing system we
‘ware removed by OBNS ?
14, Why would you choose & database aystem insted #
—aeearararvwere=«seeaaE ees
ome
eeDBMS (MU-Sem. 3-17)
15. What is Data model ? Explain various types of data
models,
16, Explain Hierarchical and network database model
17. Compare various data models available.
18. Explain various data model with their advantages and
disadvantages.
1,20 University Questions and Answer:
May 2015
1, Describe overall architecture of DBMS with diagram.
(10 Marks)
2. Ust four significant differences between file processing
system and database management system. (5 Marks)
3. Draw and explain database system structure.
(10 Marks)
Dec. 2015
4. Ust four significant differences between file processing
system and database management system. (5 Marks)
May 2016
5. Explain the term : Data independence (2 Marks)
6. Explain different data models with its advantage:
(10 Marks)
7. Discuss different Users and Database system.
(5 Marks),
(10 Marks)
Dac. 2017
9, Explain Data Independence, (5 Marks)
10. Explain in detail different database users. (10 Marks)
114.Draw EER diagram for Library Management System
showing aggregation. (10 Marks)
May 2018
12. Explain Role of DBA? (6 Marks)
13. Explain DBMS architecture, (10 Marks)
Dec. 2018
‘14, Justify the term Data Independence. (5 Marks)
May 2019
18.Compare the traditional file system with database.
(5 Marks)
16. Write short notes on : Database Administrator,
(6 Marks)
Dec. 2019
17. Explain role of DBA. (5 Marka)
18. Compare the traditional fle system with database.
(6 Marks)
19, Write a short note on : Hashing techniques (5 Marks)
a0Conceptual Modeling of a database, The
Afributes and Keys, Relationship Typos,
2.1__ Conceptual Mod Ing of a Databa:
The database design and implementation process neod
‘© systematic approach to design the logical and physical
‘Structure of one or more databases 10 satisfy. all
information needs of the users in an organization for any
Given applications.
1. Gathering Requirements from users:
Before designing any database application one must
know about goals of system, expectations of end users
‘and uses of database application in detailed manner.
Conceptual Modeling / Logical Modeling
A conceptual schema is a high-level description of user
Tequirements, It generally includes the main concepts
‘and relationship between them. A conceptual data
‘model is a representation of the concepts and their
relationships.
‘The second phase of database design involves two
parallel activities,
% Conceptual Data Model - Check all data
requirements produced by previous phase
b, ‘Transaction Design - Design the characteristice
of known database transactions
3. Physical Database Design / Physical Modeling
Physical database design is the process of selecting
data structure and access paths for database files to
achieve good performance, Each DBMS offers many
multiple options for file organization and nceows paths,
4. Database Implementation and Tuning
‘After the logical and physical designs are comploted
the final database schema is ready for final
implementation
Entity-Rolationship (ER) Model, Entty Type, nity
Rolationship Sets, Weak entity Types, General
Specialization and Aggregation, Extended Entity-Relath
Entity Relationship Data Mode|
a
lonship (EER) Model, Sel-learning Topics De)
oncachn schema
(tote dia modalot« Spat DEMS) ') Doug,
ecarem
moral home
(Forte mare Deus)
Fig. 2.1.1 ; Database Design phases
2.2 _Entity-Relationship (ER) Model
____
* In 1076, Bclentist Chas hen developed the Entity
Relationship (ER) model which is ‘high-lew
‘conceptual data model,
ER diagram ia the first atep of database desigs ®
‘specify the desired components ofthe database sysi®
‘and the relationships among those components.
ER model define data elementa and rlationshi#
‘among various data elements for a specified system.
YSDBMS (MU-Sem. 3-IT)
© The ER data model is based on perception of real
world data that consists of set of entities (data items)
and relationship among these entities.
© ER Diagrams having components,
o Entity
© Attributes
© Relationships
Entity
23 Entity
We can convert any entity set to @ strong entity set
by simply adding appropriates attributes, Why then,
do we have weak entity sets ?
Q, Write short note on : Types of Entities
1. Introduction
‘© Entity is anything in real world which may have
physical or logical existence.
‘* An entity is anything in real world with its physical
existence. Example, Student, faculty, subject having
independent physical existence.
‘* An entity may be an object with a physical existence
or it may have logical existence. Example,
Department, Section, subject may have logical
existence.
+ Esch entity has its own properties which describes
that entity such properties are known as attributes.
2. Entity Set
© Entity set is collection of entities of same type.
© Example, Student entity set contains all students in
college database.
3. Entity Type
© Entity set is collection of entities with same
attributes,
As in Student table, each row is an entity and have
seme attributes. In other words we can say a student
table is an entity type
+ The types of entities are,
Strong entity ype
b.__ Weak entity type
a Strong entity type
Entity Relation
© Entity type which has its own key attributes by which
‘we can identify specific entity uniquely is called as
strong entity type.
Example
© In case of Employee entity any specific employee can
be identified by his Employee_id which is primary key
of employee entity.
‘© In case of student in class each student identified by
unique roll number which is his primary key.
«Strong entity type is represented by single rectangle.
Fig. 2.3.1 : Employee entity
Weak entity type
@. Whale weak entity ? Explain with example.
@. Define the term weak entity set
es
«Entity type which cannot form distinet key from their
attributes end takes help from corresponding strong
entity is called as weak entity type.
© These types of entities are dependent on strong entity
for primary key.
«For some week entities we assign virtual primary key.
Such virtual primary key of weak entity is called as
‘discriminator’.
+ Weak entity type is represented by double rectangle.
© Example ; In case of “Dependent” entity depend on
employee entity for primary key.
=} -O— eal
Fig, 2.3.2 ; Weak entity “dependent”
2.4 AttributesBach entity has ite own Propertion which describes
‘nat sutity such peopitice an umeor sea in
The attribute value that describes ench entity
ines & major part of data stored in database,
* Exilowee entity may be described by attributes name,
REP. Pome ote.
Type Notation
Attribute
tsmeisce |
valued’Stored)
° Aparticalar entity will have some Value for each of its
attributes
‘Sttribute value is ‘Jayen:
The various
iagrams,
© Composite Attributes
© Multivalued Attributes
© Derived Attributes
© Null Attributes
© Rey Attributes
‘pes of attribute are used in ER
‘The divisible attributes are com
iposite attributes,
Example: The Name attri
bute of Student table can be
divided into First_Name and Last Name.
Employee
Fig. 24.1 Composite attributes
b, Multivatued attributes
Q.__ Wilts a note on multivalued attibutes, >.
* The attribute having more then one value for g “
entity is called as multi-valued attribute
‘Type Notation
Multivatued
Attribute
* Example, A Single student can have multi
numbers,
Ple may
Fig, 2.4.2 Multi valued attributes
©. Derived Attributes
[. Define Derived atnibate,
* The value of some attribute can be
derived from 4,
Value of related stored attribute such attributes a,
known as derived attributes. Null
G._ Write @ note on Null attributes
For bank which does not offer facility of net banking
e. Key attributes
‘This attribute can take NULL value when entity doo
not have value for it.
‘This is a special attribute the value of which is
unknown, unassigned, not applicable or missing:
Example, The
gives weather particular customer having net bankig.
facility activated or not activated.
‘Net_Banking_Active Bin’ attribute
in customer table ‘Net_Banking_Active_Bin’ attribute
is always null till Net banking facility is not activated
as this attribute indicates Bank offers net banking
facility or does not offers.
These attribute can be used in future use or for
unknown, unsigned, missing values of attribute.
@. Write a note on Key attributes. Explain various type
of keys in ER Diagram
This is an attribute of an entity which must have a
unique value by which any row can be identified is
called az key attribute of entity.
Example : Emp_Id for employee.
Gems
Employee
Fig. 2.4.4 : Key attributes
‘Type Notation
- | a>
attribut :
e
‘The column value that uniquely identifies a single
record in a table called as key of table.
‘An attribute or set of attributes whose values
uniquely identify each entity in an entity set is called
a key for that entity set,
ID is a key of student table. It is possible to have only
one student with a one ID (Say only one student
‘“Mahesh’ with ID = 1) ‘
Entity Relationship Data Mode!
» Std 1D.
Stud NAME
Stud. DOB
Stud ADDRESS
Shut PASSPORT. NUM
LIGENCE_NUMBER
SSN
DEPARTMENT. NUMBER
Fig. 24.6
«Types of Keys — The various types of keys in ER
iagrams are as follows,
1. Super Key
© An attribute or set of attributes that uniquely
identifies a single tuple in entity.
‘There can be more than one super keys in single table
+ Example,
In above diagram combination of (Stud ID,
Stud_name, Stud Passport_Num,
Liconee_Number,ssn) acts like a super key.
2. Composite Key
© Any key with more than one attributes that uniquely
identifies a single tuple in entity.
* Example,
© In above diagram a super key has more than one
attribute so, it is a composite key.
3. Candidate Key
© A super key with minimum number of attributes is a
candidate's key.
‘No subset of candidate key van be key.
Example,
In above diagram combination of
(Stud_Passport_Num, Licence_Number,ssn) sets like
a Candidates key.
4. Primary Key
# Accelected key of strong entity which uniquely identify
tuple in entity is a primary key of that entity.
Example,
‘+ In above diagram combination of (Stud_ID) acts like «
Primary key,
5, AlternateKey
# A Candidate key which is not aclected as primary key.
© Example,
‘In above diagram candidate key (Stud_Passport_Num,
Lioance_Number, san) acts like alternate key& Secondary Key
© An attribute or wet of attevbutes that used to ans
singe tuple fn entity
©The secondary key mot tvoensiary tbe aiqe
+ Beample,
# Tn above ctingram attribvite (Stand, Bassport, Nui) on
be used for mcomning tustont'e na, mo it tet He
secondary key
Rey jReeree
Hee mr a ee
An attribute or set of attributes: that |
iquely taentifles a single tuple in entity. |
Any key with more than one attributes |
hat uniquely identifies a single tuple in
entity.
Candidate
Rey
A super key with minimum number of
attributes is « candidates key.
No subset of candidate key van be key.
Primary
key
A selected key of strong entity which
uniquely identity tuple in entity is a
primary key of that entity,
A Candidate key which is not selected as
primary key
‘An attribute or set of attributes that used
to access a single tuple in entity.
2.5 _ Relationship Set
Q. With reference to figure-1 list and explain the
Attributes, Keys, Remote cc
GQ. What is relationship set ? Give various constraints of
telationship.
1. Introduction
* A relationship is an association among one or more
than one entities.
‘* We use diamond shape to show relationship.
[type [Notation |
“ID
* It is recommended to arrange relationship to be read
it from left to
Fer Rayne wor
—
fig. 8.1 1 AF OlAgram for Work. for
2, Relationship Set
fat all relationship of #8me (yp
ny omployee® Are Working |
it Ue relationship gq
'
Collectio
relationship et.
different departments #0
Works For relationship:
4, Degree of Relationship
‘The degree of relationship type \# number §
participating entity types in & particular relation,
‘Types of Relationship based on degree are,
© Unary Relationship
# Binary Relationship
# Tomary Relationship
2.6 Relationship Types based on
Constraints
‘A. Mapping Constraints / Cardinalities
‘© Number of entities from each side participating ia,
relationship set.
+ Cardinality expresses specific number of ent
occurrence of related entity,
‘Types of mapping constraints
1, One is to one
‘© In this type of constraint one tuple in entity is relan
with only one tuple in other entity.
‘© That is one row in table is related with only one rows
other table,
+ A associated with at most one entity in By
associated with at most one entity in A.
* Example : one department can have only «
manager.
* Every row in Department table ean be har
relationship with only one row in Managers table.ao Entity Relationship Data Model
4. Many to many
© Th this type of constraint many tuple in entity enn be
related with multiple tuplon in other entity
(©) Representation in ER diagram
. \srovinted with any number of entities in entity B.
Fig, 2.6.1 : One to one mapping A nanocinted with any number of entities in Y
© Bnstociatod with any number of entities entity in A.
‘One to many Book Student
In this type of constraint one tuple in entity can be
related with many tuples in other entity,
Associated with any number of entities in B,
B associated with at most one entity in A,
Example : One teacher may teach to many students,
Every row in Teacher table can have relationship with A 8
y rows in Student table,
many rows in Student tab cies mareeaaeg
<> “fava
(b) Representation in ER diagram
Fig. 2.6.4
‘+ Example : Books in library issued by students.
Teacher Students,
A 8
many mapping ‘* Multiple rows in Book table can be related with many
N rows in Student table.
‘Student
B. Participation constraints
(b) Representation in ER diagram Eqplain the terms total ‘and Partial
Fig. 2.6.2 : One to many mapping participation with example, 4
Many to one oe eae
In this type of constraint inany tuplolin entity cnn be Ey >
related with only one tuple in other entity. : Total participation and Parti |
‘A associated with at most one entity in B. a |
B essociated with any number of entities entity in A. | 1, ‘Total participation
Example : Number of employee works for |. 15 cage of total participation ins
ia ‘ case ‘participation every object in an entity
‘must participate in a relationship.
M
= ne ee en can be related with | | a, estes Aye pa
eee tee double line between entity and relationship,
© Example: Every department must have a manager.
=} —]
Fig. 2.6.5 : Total participation
2. Partial participation
* In capo of partial participation more than one object in
fan entity may participate ina relationship.
© The total participation is indicated by a single line
between. ‘and:DBMS (MU-Sem,
Example: Employeos works for dopartment.
=} <>
Fig. 2.6.6 : Parti! participation
©. Degree of Relationship (Binary Vs ternary)
& The degree of the relationship type is number of
Participating entity types
b. Types
* Binary relationship type : A relationship of degree
two.
Example, Employees works for department.
[Evens] —$ _§ [osama]
Fig. 2.6.7 : Binary Relationship
* Ternary relationship type : A relationship of
degree three.
Fig, 2.6.8 : Ternary relationship
2.7 Extended Entity-Relationship (ER)
Model
en A ee
Q. Compare ER and EER models,
* EER model includes all the modeling concept of ER
model. In addition it also includes the concept of
‘aggregation, specialization and generalization.
A diagrammatic technique for displaying these
concepts when they arise in EER schema are the
resulting schema diagrams called as EER diagrams,
¢ EER Features
© Specialization
© Generalization
© Attribute Inheritance (Subclass and Superel
0 Aggregation
Entity Relationshi
5 -xplain Specialization.
a
©. Explain Specialization with the help of an exampig|
@. Write a short note on : Specialization
MU - Dec. 17, D26.19,5 Mane
# Top down approach of superclass / rubegy
relationship.
Specialization is a process of defining a set of su
of entity type, this entity type is called super clam y
specialization.
The set of subclasses that forms a specialization 4
defined on the basis of some distinguishig
characteristic of entity in super class.
Example
Set of subclass (Saving Account, Current_Account) ay
Specialization of super class Account.
Q
Current_Account
Fig. 2.7.1 : Specialization
Notation
‘* The subclass defined in a specialization is attached by
lines to a circle which is connected to super class.
© The subset symbol on each line connecting a subclass
to circle indicates the direction of super class /
subclass relationship.
Specific attribute
An attribute applied only to entities of particulsr
subclass is called as specific attribute,DBMS (MU-Sem. 9-17) 2 Frnity Molntionship Dain Model
# Arrow pointing 1 ganaralined muper
wenernlization.
Insa rapranante
hort note on : Generalization,
MU « May 12, Deo.17, Deo.19, 6 Marke
Q. Explain Generalization with the holp of an example
Q. Explain Generalization
COA
‘This is reverse process of specialization or thin is
bottom up approach of Suporclass /eubelass relationship
Definition
Generalization is a process in which we differentia
among several entity types identifying there common.
features and generalizing them to a single super class of
which original entity type are special subclass,
© Arrow pointing t generalizad nubelnes representa
apooialization,
> ea
ine} eed
GurerD> Goon
Fig, 2.7.2: BIKE entity
Example
Car and Bike all having several common attribute they
can generalize to the super class vehicle.
Notation Fig. 2.7.3 : Carentity
A diagrammatic notation to distinguish between Attribute Inheritance
generalization and specialization is used in some
programming methodologies.
= The attributes of higher and lower lavel entities ereated by specialization and generalizations are attributes
inberitance.
‘© Abstraction through which relationship (aggregation) is treated as higher level entities.
Fig. 2.7.4 : Generalized VEHICLE entity
2.7.2. Constraints and Characteristics of Specialization and Generalization
[&_ Deine Spat on GowaioaT
1. Predicate defined subclass
‘© In specialization sometimes we ean find exactly which entities will become member of specific subclass by placing «
condition (or a predicate) on the valus of some attributes of superclass, such subclasses are called as predicate
subclasses.
7Entity Ralationshi
jon job.type = ‘typi
Example : emplayee has attribute job. type. We ean put condition j
Fig, 2.7.8 : Predicate detined special
2. Attribute defined ‘specialization
* Thal subclasses in a specialization have there membershi
‘Specialization itselfis called as attribute defined specialization.
* This kind of attribute is called as defining attribute of specialization,
p condition on some attribute of superclass then
Fig. 2.7.6 : Attribute detined specialization
3. User defined subclass
. at 2 it hve «proisGned condition or determining membrahip toa eubclaashenc ser needs to eh
‘condition for euch specialization then the subclass is known as tser defined subclass,
* Membership in such a subclass is determined by database ‘user, when database user applies the operations to adi
‘an entity to subclass.
4. Other constraints specialization
& Disjointness
1. Disjointness constraints
* Digjointness constraints specify that the subclasses of specialization must be disjoint that ‘means entity can bet
member of the most one subclass of specialization,
© For Example : New employee can become member of only one aubelasa like Assistant, Technician or Engineer onl
* Attribute defined Specialization determines the dsjointness conatrainta,
* attribute is used to define the membership then predicate should be single valued,
¢ Example : In employee entity Job_Type predicate that must be single valued,
WhenceW_DaMS (MU-Sem. 3-17)
2
0
Entity Relationship Data Model
‘© Disjoint subclass indicated by encircled d a shown in Fig, 2.7.7
&» \ 2
Erpiyee
@ ¥ a
Tonoweed
Gu S
Resort J[Tecrncan | Enameer] — [Tianeanr] / Gana [Feary Eroyee]
[Seianed_ Employee
Aanages) Cotonge 3
eries Trade_Union
Fig. 2.7.7 : Disjoint constraints
2. Overlapping constraints
Fig. 2.7.8 : Overlapping constraint
© The subclass is not always required to be disjoint,
then such set of entities can be overlaped i.e. entity
may part of more the subclasses.
© Example : Person can become member of subclasses
like student, Admin or Staff. It is possible to have
person belongs to more than one subclasses.
Disjoint subclass is indicated by encireled ‘O’.
Completeness constraints
Total specialization
A total specialization constraints specifies that entity
in super class may be member of at least one of the
subclass in the specialization,
eae. °
‘A double line is used to represent total specialization
in BER diagram.
Example : An employee must belong to salaried
employees or hourly employee.
Sa] [aa
Fig. 2.7.9(a) : Total specialization
Partial specialization
An entity can either belong to @ subclass or not
belongs to any subclass,
‘A single line used to represent partial specialization
in EER diagram.
‘Example : An employee can be Engineer, Secretary or
Technic
Fig. 2.7.9(0): Partial apecleltzation
wnLAMB (MU-Bam_ 9.17
wmihibe wonatirn
Digiatnd, total on
Digion
H41n) constenine
Aggregation
Witte short note an | Auureganon |
"plain aggregation wih the poplar
Aderogstion {® Meant to represent a relationship
between ® whole ohject and ita component part,
1 te umed when we have to
involving
wodlol_@ relationship
MiLY ete And Aw relationship net.
Amitregntion allows us to trent a
Sntity wet for
relationships
Example 1 A Project is sponsored by a department,
relationship
An Enplayee monitors this sponsorship (and not
Praject or department), This is aggregation. Monitors
mre mapped to the table like any other relationship
ot.
relationship set as an
PUrpowe of participation in (other)
Fig. 2.8.1 : Aggregation
2.9 Solved ER Designing Examples (Self
Learning Topic)
Je 2.9.1 : A publication may be a book or an article,
pent ‘© published In Journals, Publication has title and
Jooatlon, Book having thelr title and category. Article includes
title, Topic and date, Publication le written by Authors stores
Name, address and moblie number. Publication also belongs
Enity Ralntionship Datn vy,
olution +
Alop 1) Identify entities
1, Publiention 2, Book
B. Article 4, Journal
5, Bubjoot. 6 Author
Biop 21 Identify attributes
1, Publicntion (Title, Loention)
Locawon)
Publication|
2, Book (Publisher id, Title, Category)
Geese)
8, Article (Publisher id, Title, Date, Topic)
4, Journal (JID)
5. Subject (SID, Name)
6. Author (Auth id, Name, Address, Mobile)
to partioular subject which hae thelr namerDBMS (MU-Sem.
Step 3: Identify relationships
1, Articles are published 2, Publication is written
in Journal by Author,
= eal
8, Publication belongs to a particular subject.
Fe] —
Step 4: Identify inheritance relations
Publication can be
BOOK or ARTICLE.
ee {
©
‘Author
[=] Ea je
Step: Merging all above relations we will get
final ER model
2 e
tionship Data Model
Example 2.9.2 : Construct on E-R diagram for a car-
Insurance company that has a set of customers each of
whom owns one or more cars. Each car has associated with
It z6r0 to any number of recorded socidents.
Solution :
1, Identify all entities
‘a, Insurance company —b. Customer
c. Car 4. Accidents
2. Identity all attributes
a, Company entity
ED D>
b. Customer entity
3. Identify all relationship
12) Car inaurance company has a ee of eulorners
1b) Customer ouna one oF more car
(0) Each ont associated wih zero oF any number of sckdenteSF _05MS (Huse ay 2.19,
* Construct ER diagram by merging all above relationships
ind the set of medical doctors a
'SSociaig:
‘ Fecord of various text and examination conducted. 7
‘Solution ;
1. Identity Entities
1. Hospital 2. Patient
8. Doctors 4. Medical-record (Record of various test and examination conducted)
2 Identity Attributes
1. Hospital (Hosp_id, HName, HAddress, Heity)
2. Patient (Pat_id, Pname, Pdiagnosis, Padress)
3.
Doctor (Doc_id, DName, Qualification, salary)
= [rater] [posona]
4. Medical_Record (Record_id, Date_of examination, Problem)
3. Identify relationships
a. Hospital has a set of patients
1 a) N
b. Hospital has a set of doctors
=214 Entity Relationship Data Model
©. Doctors are associated with each patient
4. Each patient has record of various test and examination conducted
' N
Patient has ‘Medical record
4, Construct ER Model from merging all above relationship
Soin. =Entity Roinlonahip Dai
Example 2.8.5: Draw ER Diagram for University databa Fr
Student has a unique i itpte clases and hat bel
, t can enroll for multiple k
apa a ney hich oo seach cls 16 taught BY Ont culty Every student wil got ar
lass he/she has enrolled.
Solution :
‘Example 2.9.6 : Draw an ER diagram for the education database that ‘contains the information about an in house con,
‘education training scheme. The relevant relations are :
‘Course (course-no, ttle)
‘Offering (course-no, off-no, of-date, location)
Teacher (course-no, off-no, emp-no)
Enrolment (course-no, of, stud-no, grade)
Employee (emp-no, emp-name, job)
‘Student (stud-no, stud-name, ph-no)
Solution.ont
(MU-Som, 3:17)
4, Explain ER Diagrams and its componente.
2, Explain the term aggregation,
3. A database is to be designed tor a medium sized
company dealing with industrial application of computor,
The company delivers various products to its customers,
ranging from @ single application program through to
complete Installation of hardware with customized
software, The company employs various expert,
consultants and supporting staff, All personal are
‘employed on long term basic 0, there are no shortsterm
‘or temporary staffs. Although the company is somehow
structured for administrative purposes (that is, it is
divided into department headed by Department
Managers) all projects are carried out in an inter-
disciplinary way. For each project a project team is
selected, grouping employees from different department,
‘and a Project Manager (also an employee of the
Company) is appointed who is entirely and exclusively
responsible for the control of the project, quite
independently of the Company hierarchy. Draw an ER,
Diagram. It required some more information can be
assumed.
4. You have to design and implement a database that
manages information about publishers, authors, and
‘books. Some information includes : A publisher has a
name and an address for the headquaiters. Each
publisher also has a set of branches, each branch having
fan address and two phone numbers. An author has a
name and an address. A book is published by a publisher
‘and has a list of authors associated with it. An author can
publish several books and a book can be published by
‘only one publisher.
@. Draw an extended E-R diagram for the system.
b. Take two typical queries and write them in SQL and
relational algebra.
5. Write a short note on
1. Subclass and superclass
2. Specialization and generalization
‘3. Type Inheritance
Describe various constraints of specialization and
‘generalization
7. Explain concept of specialization and generalization
lattices and hierarchy.
Write shot note on ; Weak entity set, specialization,
Generalization.
9. Write short note on :
Participation.
Total participation, partial
246 Enily Flolatianship Data Model
10, Define dagroa,
11. Draw an E:R diagram which models an ontina bookstore
List entity sate and primary key.
12, Wilte short note on ; Extended @-r featur
19, Write short note on : Generalization and aggregation.
14, What Is strong entity and weak entity ? Explain with
example
2.10 University Questions and Answer
May 2015
1, Explain the terms total participation and. Partial
participation with example (5 Marks)
2, Construct on E-A diagram for a car-insurance company
that has a set of customers each of whom owns one or
‘more cars. Each car has associated with it zero to any
number of recorded accidents.
(10 Marks)
We can convert any entity set fo @ strong entity set by
simply adding appropriates attributes. Why then, do we
have weak entity sets ? (12 Marks)
Dec. 2015
4, Compare ER and EER models. (5 Marks)
5, Draw an ER diagram for the educetion database that
Contains the information about an in house company
education training scheme. The relevant relations
are:
Course (course-no, tte)
Offering (course-no, off-no, off-date, location)
‘Teacher (course-no, off-no, emp-no)
Enrolment (course-no, off-no, stud-no, grade)
Employee (emp-no, emp-name, job)
‘Student (stud-no, stud-name, ph-no) {10 Marke)
May 201
‘6. Explain the term ; Total participation. @ Marks)
7. Explain generalization and specialization,
Dec. 2016
8, Explain generalization and specialization.
®. Explain Total participation and Partial participation.