Overview of Databases Languages and Architectures
Overview of Databases Languages and Architectures
Schema Constructs
A DB State/Instance/Extension
9
Schema versus DB state
Important to distinguish between DB schema and state:
– When we define a new database, specify its database schema
only to the DBMs
The corresponding database state is the empty state
– Initial state of database when database is first Populated or
loaded with initial data
Every time when a basic operation is applied we get another
database state
At any point in time database has a current state
– DBMS ensures that every state of database is Valid State
i.e. satisfies structure and constraints specified in schema
Schema only change when requirement change called schema
evolution, E.g. we may decide another data item needed to be
stored for each record
Types of Data Models
Therefore, there are following four data models used for
understanding the structure of the database:
Types of Data Models
Relational Data Model:
This type of model designs the data in the form of rows and columns
within a table. Thus, a relational model uses tables for
representing data and in-between relationships. Tables are also
called relations.
Entity Relationship Data Model:
An ER model is the logical representation of data as objects and
relationships among them. These objects are known as entities,
and relationship is an association among these entities. It was
widely used in database designing.
A set of attributes describe the entities. For example, student_name,
student_id describes the 'student' entity. A set of the same type of
entities is known as an 'Entity set', and the set of the same type of
relationships is known as 'relationship set'.
Types of Data Models
Object Oriented Data Model:
An extension of the ER model with notions of functions,
encapsulation, and object identity, as well. This model supports a
rich type system that includes structured and collection types
Semistructed Data Model:
Semi-structured data is a form of structured data that does not
obey the tabular structure of data models associated with
relational databases or other forms of data tables, but nonetheless
contains tags or other markers to separate semantic elements and
enforce hierarchies of records and fields within the data.
Three-Schema Architecture
Three of four important characteristics of the
database approach, listed are:
1. Self-describing of a DB (Schema)
2. Insulation between programs and data
3. Support of multiple views of the data
USER 1
... USER 2
EXTERNAL
EXTERNAL VIEW 1 EXTERNAL VIEW 2
LEVEL
External/conceptual mapping
CONCEPTUAL CONCEPTUAL
LEVEL SCHEMA
Conceptual/internal mapping
STORED DATABASE
16
Three Schema: Example
Employee Data Conceptual Model Workers
External First Name: Fatima Name: F. Abdullah
Level/View Last Name: Abdullah Age: 34 Y, 10 d
DOB: 12th Sept. 1980 Department: Sales
Ext/conceptual mapping External Layer
Representational Model
Name DOB Dependent Dep. Id
Conceptual
Fatima Abdullah 12-08-1980 5 D019
Level/View
Ahmad Ali 10-03-1990 0 D012
Conceptual/int mapping Internal Layer
Internal/Physical Model
Internal RH Fatima Abdullah 12081980 5 D019 RH Ahmad Ali…
Level/View
OS Layer
100011001111000011100001110000111000011100101010…
Database Languages
Users of the
database
system
Internals
of the
DBMS
Centralized and Client/Server
Architectures for DBMSs
Centralized DBMSs Architecture
– All DBMS functionality, application program execution, and
user interface processing carried out on one machine
Basic Client/Server Architectures
The client/server architecture was developed
to deal with computer environment in which
a large number of PCs, workstation, file
server…