This document discusses data models and the three schema architecture of database management systems (DBMS). It describes the three levels of schemas in a DBMS - physical schema, conceptual/logical schema, and external schemas. The three schema architecture supports program-data independence and multiple user views of data by providing different levels of abstraction and independence between the schemas.
2. Data Models
• Data Model: A set of concepts to describe the
structure of a database, and certain constraints that
the database should obey.
• Data Model Operations: Operations for specifying
database retrievals and updates by referring to the
concepts of the data model. Operations on the data
model may include basic operations and user-defined
operations.
Slide 2-2
3. Categories of data models
• Conceptual (high-level, semantic) data models:
Provide concepts that are close to the way many
users perceive data. (Also called entity-based or
object-based data models.)
• Physical (low-level, internal) data models: Provide
concepts that describe details of how data is stored
in the computer.
• Implementation (representational) data models:
Provide concepts that fall between the above two,
balancing user views with some computer storage
details.
(Schema – a description of data in terms of a data
model )
Slide 2-3
5. Three-Schema Architecture
• Proposed to support DBMS characteristics of:
• Program-data independence.
• Support of multiple views of the data.
– Schema – a description of data in terms of a data
model
Slide 2-5
6. Three-Schema Architecture
• Defines DBMS schemas at three levels:
• Internal schema at the internal level to describe physical
storage structures and access paths. Typically uses a
physical data model.
• Conceptual schema at the conceptual level to describe the
structure and constraints for the whole database for a
community of users. Uses a conceptual or an
implementation data model.
• External schemas at the external level to describe the
various user views. Usually uses the same data model as
the conceptual level.
Slide 2-6
7. Levels of Abstraction in a DBMS
External Schema 1 External Schema 2 External Schema 3
Conceptual
(logical)
Schema
Physical
Schema
Secondary
Storage 7
8. Physical Schema
• Storage space allocation for data and indexes
• Record description for storage (sizes for data
items)
• Record placement
• Data compression and data encryption
techniques
M.G. Erechtchoukova 8
10. External Schema
• Multiple external schemas
• In relational DBMS, External Schema
contains views and relations from
conceptual schema
• Reduce complexity of DBMS for users
• Support data security
• Support data independence
M.G. Erechtchoukova 10
11. Data Independence
When a schema at a lower level is changed, only
the mappings between this schema and
higher-level schemas need to be changed in a
DBMS that fully supports data independence.
The higher-level schemas themselves are
unchanged. Hence, the application programs
need not be changed since they refer to the
external schemas.
Slide 2-11
12. Data Independence
External Schema 1 External Schema 2 External Schema 3
Logical data independence
Conceptual
Schema
Physical data independence
Physical
Schema
Secondary
Storage 12
13. Data Independence (cont…)
• Logical data independence – the immunity of
the external schemas to changes in the
conceptual schema
• Physical data independence – the immunity
of the conceptual schema to changes in the
physical schema
M.G. Erechtchoukova 13