DBMS Mod 1
DBMS Mod 1
Management Systems
University Question Pattern
◦ Eg 2 :
Roll No Grocery Price Car Model
Roll no – String
Name – String Roll no Name Marks
Marks - Float
E
2. Insulation between programs and data,
and data abstraction
Student database
Name
Akhil
Sajan
View 1: Name of the students
Vivek
Module 1
Module 1
Module 1
Lect 6 : THREE-SCHEMA
ARCHITECTURE
Schema, Instances and Database
State
The description of a database is called the
Database schema, which is specified
during database design and is not
expected to change frequently
A Schema is represented in a Schema
Diagram
The data in the database at a particular
moment in time is called a database
state or snapshot
Instance is the snapshot of a database at a
particular moment.
THREE SCHEMA ARCHITECTURE
This architecture is proposed to achieve the
characteristics of database approach
The goal of the three-schema architecture is
to separate the user applications and
the physical database
In this architecture, schemas can be defined
at the following three levels
◦ External Level
◦ Conceptual Level
◦ Internal Level
INTERNAL LEVEL
It uses low level /physical data model
It has an internal schema, which describes the physical
storage structure of the database
Module 1
Lect 7 :
->Data Independence
->Database Architectures
DATA INDEPENDENCE
Data independence is the capacity to change the
schema at one level of a database system without
having to change the schema at the next higher
level.
There are two types of data independence.
◦ Logical data independence
◦ Physical data independence
1. Logical Data Independence
The capacity to change the conceptual
schema without having to change external
schemas or application programs
Refers to the immunity of external schemas
to changes made in the conceptual schema.
Eg: We may change the conceptual schema to
expand the database (by adding a record type or
data item), or to reduce the database (by
removing a record type or data item).
After the conceptual schema undergoes a logical
reorganization, application programs that
reference the external schema constructs must
work as before
2. Physical Data Independence
It is the capacity to change the internal
schema without having to change the
conceptual schema or
it refers to the immunity of conceptual
schemas to the changes of internal schema
Eg : for example, by creating additional
access structures—to improve the
performance of retrieval or update.
If the same data as before remains in the
database, we should not have to change
the conceptual schema
Database Architectures
DBMS architecture are of different types
◦ Centralized DBMSs Architecture
◦ Basic Client/Server Architectures
◦ Two-Tier Client/Server Architectures
◦ Three-Tier and n-Tier Architectures
1. Centralized DBMSs
Architecture
All the DBMS functionality, application program
execution, and user interface processing were carried
out on one machine
Module 1
Lect 8 :
->Classifications of DBMS
->Database Languages
Classification of DBMS
CLASSIFICATION OF DBMS
Module 1
Lect 9 :
ENTITY-RELATIONSHIP
DIAGRAM
ENTITY-RELATIONSHIP
MODEL
Entity-Relationship (ER) model is a
popular high-level conceptual data model
Diagrammatic notation associated with an
E-R model is known as E-R Diagram
The E-R model describes data as Entities,
Attributes and Relationships.
Entity Relationship Diagram (E-R
Diagram)
It is not a technical method
It is used for designing a database
Diagrammatic representation and easy to
understand for non technical users
Collection of entities and their
properties called attributes and
relationship between them
Diagrammatic representation and easy to
understand for non technical users
Entity
Entity is a thing in the real world with an
independent existence.
for example, a particular person, car, house,
or employee
For example, if we say that a customer buys
goods, it means customers and goods are
entities.
In E-R diagrams, entities are represented
using rectangles
CUSTOMER GOODS
Attributes
Each entity has attributes—the particular
properties that describe it.
For example, an EMPLOYEE entity may be
described by the employee’s name, age, address,
salary, and job.
In E-R diagrams attributes are drawn in elliptical
shapes along with the entity rectangles
Derived attributes are represented by
dotted attributes
Complex Attributes
It is a combination of composite and
multi-valued attribute.
Group components of a composite
attribute between parentheses () and
separating the components with commas,
and by displaying multivalued attributes
between braces { }.
Eg :
Address_phone({phone_no},{Address(Fla
t no,city,state)})
Entity Types and Entity Sets
Module 1
Lect 10 :
Eg2
Relationship Type
The relationship which is associating with
different entities
Relationship Set
A relationship set is a set of relationships
of the same type.
Degree of a Relationship Type
Module 1
Lect 11 :
Module 1
Lect 12 :
(a) Name
(b) Salary
(c) Ssn
5. In the following E R Diagram identify the
multivalued attributes
(a) Ssn
(b) Salary
(c) Works_on
Lect 10 Quiz Answers
1 . Identify the cardinality Ratio of the
following Relationship
(a) One-one
(b) One-Many
(c) Many-Many
2. Identify the cardinality Ratio of the
following Relationship
(a) One-one
(b) One-Many
(c) Many-Many
3. Identify the cardinality Ratio of the
following Relationship
(a) One-one
(b) One-Many
(c) Many-Many
4. Identify the degree of the relationship
(a) Unary
(b) Binary
(c) Ternary
5. Identify the degree of the relationship
(a) Unary
(b) Binary
(c) Ternary
Lect 11 Quiz Answers
1. In the E R Diagram, Which Entity can
have Total Participation?
(a) Customer
(b) Products
(c) both
2. In E-R Diagram Partial participation is
represented in -------------
Module 1
Lect 13 :
PREV UNIVERSITY
QUESTION
Module 1 University Question
1. List any three categories of database users,
highlighting any one important characteristic of each
category (3 Marks)
Hint :
Database Administrators
Database Designers
End Users
◦ Casual end users
◦ Naive or parametric end users
◦ Sophisticated end users
◦ Standalone users
System Analysts and Application Programmers
2. Give suitable examples for multivalued,
composite & multivalued composite
attributes (3 Marks)
Hint : Multivalued –
Composite-
Composite multivalued -
3. Distinguish between total participation &
partial participation with example (4 Marks)
Hint :
Total Participation :
◦ If every entity in the entity type participates in at
least one relationship in the relationship type
◦ Represented by double lines in ER Diagram
Partial Participation :
◦ Some entities may not participate in any
relationship in the relationship type
◦ Represented by single line in ER Diagram
4. Describe the real-world situation described
by the following E-R diagram (3 Marks)
Refer
9. What are the responsibilities of DBA (4 Marks)
Hint
◦ Schema definition.
◦ Storage structure and access-method definition.
◦ Schema and physical-organization modification
◦ Granting of authorization for data access.
◦ Routine Maintenance:
11. With the help of neat diagram explain 3
schema architecture (9 Marks)
Hint : Explain about Internal
Level,Conceptual level & View Level
12. Explain the term participation
Constraint in detail (3 Marks)
Hint : Explain about Total Participation &
Partial Participation
13. List out any three responsibilities of
database administrators (3 Marks)
◦ Hint :
◦ Schema definition.
◦ Storage structure and access-method definition
◦ Schema and physical-organization modification
◦ Granting of authorization for data access
Soln :
18. With suitable example, define integrity
constraint?
Hint : Explain about
◦ referential integrity constraint
◦ key or uniqueness constraint
19. Design an ER diagram for the given scenario; Suppose that you are designing a
schema to record information about reality shows on TV.Your database needs to
record the following information: _ For each reality show, its name, genre,
basic_info and participants name. Any reality show has at least two or more
participants. - For each producer, the company name, company country. A show is
produced by exactly one producer. And one producer produces exactly one show.
- For each television, its name, start year, head office. A television may broadcasts
multiple shows. Each show is broadcasted by exactly one television. -For each user,
his/her username, password, and age. A user may rate multiple shows, and a show
may be rated by multiple users. Each rating has a score of 0 to 10. (9 Marks)