This is a slides lecture for databse system about the data models and database schema architecture.
Size: 604.94 KB
Language: en
Added: Oct 13, 2024
Slides: 18 pages
Slide Content
Database Systems (CS –
2204)
Chapter 02
Database System Concepts and
Architecture
Agenda
▪ Data Models
▪ Categories of Data Models
▪ Three Schema Architecture
▪ Mapping in Database Architecture
▪ Data Independence
Data Models
❑Data Model:
▪A collection of concepts that can be used to describe the structure of
a database.
▪It provides the necessary means to achieve data abstraction.
▪Most data models also include set of basic operations for specifying
retrievals and updates on the database.
▪Operations on a data model may include basic model operations (e.g.
generic insert, delete, modify, or retrieve) or user-defined operations
(e.g. compute_gpa, update_inventory).
Categories of
Data Models
Few Other Features
Conceptual (high-level) data models
Implementation (representational) data models
Physical (low-level) data models
Conceptual Data Models
▪ High-level data models
▪Provideconceptsthatareclosetothewaymanyusersperceive
data
▪ Use concepts such as entities, attributes, and relationships
▪Entity-relationshipmodel–apopularhigh-levelconceptualdata
model
Implementation Data Models
▪Usedtorepresentonlythelogicalpartofthedatabaseanddoes
not represent the physical structure of the database
▪ A popular representation model – relational model
▪ Provide a foundation to form the base for physical data model
Physical Data Models
▪ Low-level data models
▪Provideconceptsthatdescribethedetailsofhowdataisstoredonthe
computer storage media
▪ Used to practically implement relational data model
▪Useinformationsuchasrecordformats,recordordering,andaccess
paths
▪Primaryandforeignkeys,views,indexes,accessprofiles,and
authorization are defined
Database Schema
▪ The description of a database.
▪ Specified during the database design.
▪ Not expected to change frequently.
▪ A displayed schema is called a schema diagram.
▪Aschemadiagramdisplaysthestructureofeachrecordtypebut
not the actual instances of records.
▪ Each object in the schema is called a schema construct.
Database State
▪ Refers to the content of a database at a moment in time.
▪Initialdatabasestatereferstothedatabasestatewhenitis
initially loaded into the system.
▪Validstateisastatethatsatisfiesthestructureandthe
constraints of the database.
Summary
▪Thedatabaseschemachangesveryinfrequently,schemaisalso
called intension.
▪Thedatabasestatechangeseverytimetableisupdated,stateis
also called extension.
▪ Schema – Structural description of relations in database
▪Schemaisarepositoryorstructuretoexpresstheformatand
other different information about data and database.
▪ Instance – Actual contents at given point in time
Example of a Database State
Three Schema Architecture
▪The goal of three schema architecture is to separate the user
applications from the physical database.
▪In this architecture, the schema can be divided at the following
three levels:
I.The internal level
II.The conceptual level
III.The external level
Three Schema Architecture
Three Schema Architecture
❑ Internal Level:
▪Has an internal schema, which describes the physical storage structure of the database.
▪Uses a physical data model and describes the complete details of data storage and access paths
for the database.
❑ Conceptual Level:
▪Has a conceptual schema, which describes the structure of the whole database for a community of
users.
▪Hides the details of physical storage structures and concentrates on describing entities, data types,
relationships, user operations, and constraints.
▪Uses a representational data model to describe the conceptual schema when a database system is
implemented.
❑ External Level:
▪Includes a number of external schemas or user views.
▪Each external schema describes the part of the database that a particular user group is interested in
and hides the rest of the database from that user group.
▪Each external schema is typically implemented using a representational data model.
Mapping in the Database Architecture
❑ Mapping:
▪The three levels of DBMS architecture do not exist independently. There must be correspondence
between the three levels and this correspondence is called mapping.
▪The process of transforming requests and results between levels is called mapping.
❑ Conceptual/Internal Mapping:
▪Lies between the conceptual level and the internal level.
▪Role is to define the correspondence between the records and fields of the conceptual level and
files and data structures of the internal level.
❑ External/Conceptual Mapping:
▪Lies between the external level and the conceptual level.
▪Role is to define the correspondence between a particular external and the conceptual view.
Data Independence
❑ Data Independence:
▪Capacity to change the schema at one level of a database system without having to change the
schema at the next higher level.
▪The mapping between the two levels is changed.
1.Logical Data Independence:
▪The capacity to change the conceptual schema without having to change external schemas or
application programs.
▪If we do any changes in the conceptual view of the data, then the user view of the data would not be
affected.
▪Logical data independence occurs at the user interface level.
2. Physical Data Independence:
▪The capacity to change the internal schema without having to change the conceptual schema.
▪If we do any changes in the storage size of the database system server, then the conceptual
structure of the database will not be affected
▪Physical data independence occurs at the logical interface level.
Home Assignment
▪Classification of Database Management Systems
▪DBMS Interfaces