Beruflich Dokumente
Kultur Dokumente
• Data
– Known facts that can be recorded and have implicit
meaning.
APPLICATION
#2
DBMS DATABASE
CONTAINING
CENTRALIZED
SHARED DATA
APPLICATION
#3 DBMS MANAGES DATA
RESOURCES LIKE AN
OPERATING SYSTEM
MANAGES HARDWARE
RESOURCES
Database vs Spreadsheets
ACID Model
More Characteristics of Database
• Real-world entity
• Relation-based tables
• Isolation of data and application
• Less redundancy
• Consistency
• Query Language
• Multiuser and Concurrent Access
• Multiple views
• Security
users
• A typical DBMS has users with different rights and
permissions who use it for different purposes. Some
users retrieve data and some back it up. The users of
a DBMS can be broadly categorized as follows
DBMS Architecture and Data
Independence
• DBMS Architecture describes how data in the
database is viewed by the users.
– it is not concerned with how the data is handled
and processed by the DBMS
– The databse users are provided with an abstract
view of the data by hiding certain details of how
data physically stored.
contd……
Three-level DBMS architecture
OR
Three Schema Architecture
• Database Schema - Logical design of database
• Database Instance – Snapshot of the data in
the database at a given instant in time.
Three Levels of the architecture
External View / Level / Schema / User
View / Global View
Highest or Top level of data abstraction ( No knowledge of
DBMS S/W and H/W or physical storage).
This level is concerned with the user.
Each external schema describes the part of the database
that a particular user is interested in and hides the rest of
the database from user.
There can be n number of external views for database
where n is the number of users.
For example, a accounts department may only be
interested in the student fee details. It would not be
expected to have any interest in the personal information
about students.
Conceptual View
This level is in between the user level and
physical storage view.
There is only one conceptual view for single
database.
It hides the details of physical storage
structures and concentrates on describing
entities, data types, relationships, user
operations, and constraints.
Internal View / Physical View
It is the lowest level of data abstraction. (it has the knowledge about s/w
and h/w)
The internal view is the view that tells us what data is stored in the
database and how. At least the following aspects are considered at this
level: Storage allocation, Access paths etc.
The internal view does not deal with the physical devices directly. Instead it
views a physical device as a collection of physical pages and allocates space
in terms of logical pages.
TYPES OF DATA INDEPENDENCE
• Entity-Relationship Model
• Entity-Relationship (ER) Model is based on the notion
of real-world entities and relationships among them.
While formulating real-world scenario into the
database model, the ER Model creates entity set,
relationship set, general attributes and constraints.
• ER Model is best used for the conceptual design of a
database.
• ER Model is based on −
• Entities and their attributes.
• Relationships among entities.
• Entity − An entity in an ER Model is a real-world
entity having properties called attributes.
Every attribute is defined by its set of values
called domain. For example, in a school database,
a student is considered as an entity. Student has
various attributes like name, age, class, etc.
• Relationship − The logical association among
entities is calledrelationship. Relationships are
mapped with entities in various ways. Mapping
cardinalities define the number of association
between two entities.
E-R Model
Mapping cardinalities
• Mapping cardinalities −
• one to one
• one to many
• many to one
• many to many
34
NOTATIONS OF E-R DIAGRAM
► ENTITY TYPE
► ATTRIBUTE
► KEY ATTRIBUTE
► MULTIVALUED ATTRIBUTE
► COMPOSITE ATTRIBUTE
► DERIVED ATTRIBUTE
35
DEGREE OF A RELATIONSHIP: BINARY,
TERNARY, UNARY
QUANTITY
UNARY
SNAME
RELATIONSHIP
SUPPLIER PROJECT
SUPPLY
PROJNAME
TERNARY
RELATIONSHIP MANAGES
PART
EMPLOYEE
PARTNO
SSN
36