Professional Documents
Culture Documents
Chapter 2
DATABASE SYSTEM ARCHITECTURE
2.1. Data Models, Schemas and Instances
Data model
It is a set of concepts to describe the structure of a database, and certain constraints that the
database should obey. It is a description of the way that data is stored in a database. Data model
helps to understand the relationship between entities and to create the most effective structure to
hold data.
Data model is an integrated collection of concepts for describing data, relationships between
data, and constraints on the data in an organization.
Relations with some information at some point in time is the Instance or the flesh of the
database.
Schemas
� Schema describes how data is to be structured, defined at setup/Design time (also called
"metadata")
� Since it is used during the database development phase, there is rare tendency of changing the
schema unless there is a need for system maintenance which demands change to the
definition of a relation.
� Database Schema: specifies name of relation and the collection of the attributes (specifically
the Name of attributes).
refer to a description of database/intension of the database
specified during database design
should not be changed unless during maintenance
There are three different kinds of schema in the database defined according to the 3 level ANSI-
SPARC architecture:
Internal/physical schema: at the internal level to describe physical storage structures and access
paths. Typically uses a physical data model.
Conceptual/logical schema: at the conceptual level to describe the structure and constraints for the
whole database for a community of users. It uses a conceptual or an implementation data model.
External schema: at the external level to describe the various user views. Usually uses the same
data model as the conceptual level.
Instances
� Instance: is the collection of data in the database at a particular point of time (snap-shot).
Also called State or Snap Shot or Extension of the database
Refers to the actual data in the database at a specific point in time
State of database is changed any time we add, delete or update an item.
� Since Instance is actual data of database at some point in time, it changes rapidly.
� Users should not need to know physical database storage details. As there are naïve users
of the system, hardware level or physical details should be a black-box for such users.
� DBA should be able to change database storage structures without affecting the users'
views. A change in file organization, access method should not affect the structure of the
data which in turn will have no effect on the users.
� Internal structure of database should be unaffected by changes to physical aspects of
storage
� DBA should be able to change conceptual structure of database without affecting all users.
In any database system, the DBA will have the privilege to change the structure of the
database, like adding tables, adding and deleting an attribute, changing the specification
of the objects in the database.
Three-level ANSI-SPARC Architecture of a Database
External Level:
Users' view of the database.
It describes part of database that is relevant to a particular user.
Different users have their own customized view of the database independent of other
users.
Conceptual Level:
Community view of the database.
Describes what data is stored in database and relationships among the data.
It is the logical structure of the entire database as seen by the database administrator.
Represents
All entities, attributes and their relationships
The constraints on the data
Semantic information about the data
Security and integrity information
Internal Level:
Physical representation of the database on the computer.
Describes how the data is stored in the database.
It is about the data structure and file organization used to store the data on storage
devices.
It is concerned with such things as:
Storage space allocation
Record description for storage
Record placement
Data compression, data encryption …
Data Independence
The major objective of ANSI-SPARC architecture is to provide data independence, i.e. upper
levels are unaffected by changes to lower levels.
Data independence is the ability to modify a schema definition in one level without affecting
schema definition in the next higher level. It is the strength of higher levels to changes to lower
levels.
Network
DBMS Compiler
Software
System bus
CPU
I/O device (printer
Hardware Memory Disk tape derivers…)
Operating System
The concept of client/server architecture assumes an underlying framework that consists of many
PCs and workstations as well as a smaller number of mainframe machines, connected via local
area networks and other types of computer networks. A client in this framework is typically a
user machine that provides user interface capabilities and local processing. When a client
requires access to additional functionality-such as database access-that does not exist at that
machine, it connects to a server that provides the needed functionality. A server is a machine that
can provide services to the client machines, such as file access, printing, archiving, or database
access. In the general case, some machines install only client software, others only server
software, and still others may include both client and server software. However, it is more
common that client and server software usually run on separate machines. Two main types of
basic DBMS architectures were created on this underlying client/server framework: two-tier and
three-tier.
business tiers of the application on the client side, and the data tier on the server side are
known as fat client applications. On the other hand, applications that are designed to run the
user tier on the client side and the business and data tiers on the server side are known as thin
client applications. Though fat and thin client/server architectures have three tiers, such
applications are intended to run on two computers as two physical tiers. If the three tiers are
separated so that the application can be run on three separate computers, the implementation
is known as a three-tier application.