0% found this document useful (0 votes)
62 views22 pages

Chapter Two DB

The document discusses database system architecture and the three-schema architecture. It explains that the three-schema architecture includes an internal schema that describes the physical storage structure, a conceptual schema that describes the overall database structure independently of physical storage, and multiple external schemas or views that different user groups see of the database. This architecture supports data independence, where the schemas at each level can be changed independently through mappings between the levels.

Uploaded by

Moti King Moti
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
62 views22 pages

Chapter Two DB

The document discusses database system architecture and the three-schema architecture. It explains that the three-schema architecture includes an internal schema that describes the physical storage structure, a conceptual schema that describes the overall database structure independently of physical storage, and multiple external schemas or views that different user groups see of the database. This architecture supports data independence, where the schemas at each level can be changed independently through mappings between the levels.

Uploaded by

Moti King Moti
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 22

Database System Architecture

1
2.1 Data Models, Schema and Instances
 

Data abstraction:
 It refers to the suppression of details of data
organization and storage, and the highlighting
of the essential features for an improved
understanding of data.
 One of the main characteristics of the database
approach is to support data abstraction so that
different users can perceive data at their
preferred level of detail

2
2.1.1 Data Models:
Data Models:
 It is a collection of concepts that can be used to
describe the structure of a database.
 structure of a database - mean the data
types, relationships, and constraints that apply
to the data. Most data models also include a set
of basic operations for specifying retrievals
and updates on the database (eg. Select,
insert, modify etc).

3
Categories of Data Models:
we can categorize according to the types of concepts
they use to describe the database structure.
A. High-level or conceptual data models:
 It provides concepts that are close to the way many users

perceive data.
 Conceptual data models use concepts such as entities,

attributes, and relationships.


 An entity represents a real-world object or concept, such

as an employee or a project from the miniworld that is


described in the database

4
 An attribute represents some property of interest
that further describes an entity, such as the
employee’s name or salary.
 A relationship among two or more entities
represents an association among the entities, for
example, a works-on relationship between an
employee and a project.
 Entity-Relationship model and object data
model are popular high-level conceptual data
model
5
B. Low-level or physical data models
 It provides concepts that describe the details of how data
is stored on the computer storage media, typically
magnetic disks.
 Physical data models describe how data is stored as files
in the computer by representing information such as
record formats, record orderings, and access paths.
 An access path is a structure that makes the search for
particular database records efficient. An index is an
example of an access path that allows direct access to
data using an index term or a keyword.

6
C. Representational (or implementation) data
models:
 It hide many details of data storage on disk but can be
implemented on a computer system directly.
 It is a models used most frequently in traditional commercial
DBMSs. These include the widely used relational data
model, as well as the so-called legacy data models—the
network and hierarchical models—that have been widely
used in the past. Representational data models represent
data by using record structures and hence are sometimes
called record-based data models
  
7
Schemas, Instances, and
Database State
Schema :
 the description of a database is called the
database schema, which is specified during
database design and is not expected to change
frequently.
Database Schema:
 The description of a database.
 Includes descriptions of the database structure,
data types, and the constraints on the
database.
Schema Diagram:
 An illustrative display of (most aspects of) a
database schema
8
STUDENT
StudID Name Sex Department

COURSE
Code Title Credit Department

GradeReport
StudID Code Grade

9
Database State:
 The actual data stored in a database at a particular
moment in time.
 Refers to the content of a database at a moment in time
 This includes the collection of all the data in the database.
 Also called database instance (or occurrence or snapshot).
Instance:
The term instance is also applied to individual database
components, e.g. record instance, table instance, entity
instance
 The schema is sometimes called the intension, and a
database state is called an extension of the schema.
 The database schema changes very infrequently.

10
 The database state changes every time the
database is updated.
STUDENT Table
StudID Name Sex Department
S001 Tigist F IT
S202 Jemal M Maths
S203 Sisay M Maths

Code Title Credit Departement



C001
COURSE Table
Introduction to IT 3 IT
C002 Calculus 4 Mathematics

11
2.2 Three-Schema Architecture

 It is useful in explaining database system


organization
 The goals of the three-schema architecture
are:-
 support DBMS characteristics
Program-data independence
Support of multiple views of the data
To separate the user applications from the physical
database.
.

12
13
In this architecture, schemas can be
defined at the following three levels:
1. The internal level has an internal
schema,:
 It describes the physical storage
structure of the database. The internal
schema uses a physical data model and
describes the complete details of data
storage and access paths for the
database

14
2. The conceptual level has a conceptual
schema:
 It describes the structure of the whole database
for a community of users.
 It hides the details of physical storage
structures and concentrates on describing
entities, data types, relationships, user
operations, and constraints.
 Usually, a representational data model is used
to describe the conceptual schema when a
database system is implemented. This
implementation conceptual schema is often
based on a conceptual schema design in a
high-level data model.
15
3. The external or view level :
 It 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.
 As in the previous level, each external
schema is typically implemented using a
representational data model, possibly based
on an external schema design in a high-level
data model.
16
17
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.
Logical Data Independence:
 The capacity to change the conceptual schema without
having to change the external schemas and their
associated application programs.
 We may change the conceptual schema to expand the
database, change constraint, reduce the database.
Physical Data Independence:
 The capacity to change the internal schema without having
to change the conceptual schema.
E.g. the internal schema may be changed when certain file
structures are reorganized or new indexes are created to
improve DB performance

18
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.

19
20
21
22

You might also like