Lesson02 Database System Architecture-Update

You might also like

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 36

Lesson 02

Database System
Architecture

June 2, 2024 S M Irteza / Dr Rafi Ullah 1


3 Levels of Architecture
 Levels of abstraction of a
database
 physical level (internal – how)
 logical level (conceptual – what)
 view level (external – what part)

lower abstraction

higher abstraction

June 2, 2024 2
3 Levels of Architecture
The ANSISPARC architecture is divided into 3
levels

 The Internal Level

 The External Level

 The Conceptual Level

June 2, 2024 S M Irteza / Dr Rafi Ullah 3


3 Levels of Architecture
External External External
Schema 1 Schema 1 Schema 1

Conceptual
Schema

Internal
Schema

June 2, 2024 S M Irteza / Dr Rafi Ullah 4


External Level

 This is on the individual user level


 Application programmer
 End user

 The External Schema is written using the external


DDL portion of the user’s data sub-language.

June 2, 2024 S M Irteza / Dr Rafi Ullah 5


External Level cont.

Sales

H.R
Management

June 2, 2024 S M Irteza / Dr Rafi Ullah 6


Conceptual Schema
 A representation of the entire information content of
the database.
 e.g. DBA has this view

 All Structural details are known at this level.


 Tables, table contents.
 Table’s connections.
 Views and users.
 Constraints etc

June 2, 2024 S M Irteza / Dr Rafi Ullah 7


Conceptual Schema cont.

 The conceptual schema is written using conceptual


DDL.

 Conceptual view is the total view of the database.

June 2, 2024 S M Irteza / Dr Rafi Ullah 8


Internal Schema
 Also called storage view
 A description of how information is stored on physical
devices, for example:
 Hard drives
 Tape devices
 Compact disks, DVD etc. etc.
 The DBA has to know where all the information is stored
physically,i.e. addresses, IP addresses, etc.

June 2, 2024 S M Irteza / Dr Rafi Ullah 9


Mapping
 Mapping defines the correspondence between the

 External mapping and conceptual mapping

 Conceptual mapping and the internal mapping

 Mapping is a Process of converting one level to another


level. For example building a house, 1st step to make
map of a house

June 2, 2024 S M Irteza / Dr Rafi Ullah 10


Mapping cont.
User A1 User A2 User B1 User B2 User B3

External External External External


Schema A view A view B Schema B

Schemas External\Conceptual External\Conceptual


and Mapping A Mapping B
mappings
built and
Conceptual Conceptual view DBMS
maintained
by the Schema
Database
Admin. Conceptual\internal
(DBA) Mapping

Stored Database( Internal View)


June 2, 2024 S M Irteza / Dr Rafi Ullah 11
Mapping cont.
 Conceptual/Internal Mapping

 Defines correspondence between conceptual and internal


schemas.
 Specifies how conceptual records are represented on the
internal level.
 If structure of the DB is changed
 Conceptual/internal mapping is changed accordingly
 DBA makes these changes
 Effects of such changes are isolated between the two
schemas.

June 2, 2024 S M Irteza / Dr Rafi Ullah 12


Mapping cont.
 External/Conceptual Mapping

 Defines correspondence b/w external and conceptual


schemas.

 Many conceptual fields can form one external view


etc.

June 2, 2024 S M Irteza / Dr Rafi Ullah 13


Instances and Schemas

 Each level is defined by a schema, which defines the


data at the corresponding level
 A logical schema defines the logical structure of the
database (set of customers and accounts and the
relationship between them)
 A physical schema defines the file formats and
locations
 A database instance refers to the actual content of
the database at a particular point in time. A
database instance must conform to the
corresponding schema

June 2, 2024 S M Irteza / Dr Rafi Ullah 14


Instances and Schemas

June 2, 2024 S M Irteza / Dr Rafi Ullah 15


DBA
 Data Administrator DA, is the person who makes the
strategic and policy decisions regarding the DATA for
the enterprise.
 This is known as LOGICAL , or sometimes called
conceptual database design.

 DBA is the person who is responsible for the overall


control, implementation on the technical level.

June 2, 2024 S M Irteza / Dr Rafi Ullah 16


DBA’s Responsibilities
 Defining the Conceptual Schema.
 Decides exactly what info is to be kept in the DB.
 Defines conceptual schema by using DDL

 Defining internal schema


 Defines physical database design.
 Creates the internal schema using internal DDL.
 Define mapping b/w the other schemas.

June 2, 2024 S M Irteza / Dr Rafi Ullah 17


DBA’s Responsibilities cont.

 Liaising with Users


 Ensure users get the data they require.
 Help the users to write external schemas using
external DDL.
 Mapping for external and conceptual schemas.
 Provide consultation for certain application designs.
 Providing technical support and education.

June 2, 2024 S M Irteza / Dr Rafi Ullah 18


DBA’s Responsibilities cont.

 Defining Integrity and Security Constraints

 Defining Dump And Reload Policies


 Unloading or dumping a backup of database or
database portion on backup devices.
 In case of error or damage to the database ,
reloading the database when necessary from most
recent dumps.

 Monitoring Performances and responding to change


requirements.

June 2, 2024 S M Irteza / Dr Rafi Ullah 19


DBMS
 It is a software that handles all access to the
database.following things happen :

 A user issues an access request, using some


language (SQL)
 The DBMS intercepts that request and analyze it.
 The DBMS inspects external schema for that user,
the conceptual schema and the mappings etc. and
the internal schema .
 DBMS executes the necessary operations on the
stored database.

June 2, 2024 S M Irteza / Dr Rafi Ullah 20


Core DBMS Functions

Data Definition

 Must be able to accept data definitions

 Must include DDL processor or DDL compiler.

 Understand the DDL definitions.


 So it can handle the data manipulation requests etc.

June 2, 2024 S M Irteza / Dr Rafi Ullah 21


Core DBMS Functions cont.
 Data Manipulation
 DBMS must have DML compile or DML processor so it
can handle requests for data
 Retrieval
 Updates
 Delete
 Add new data etc.

 DML REQUESTS have 2 categories in general


 Planned requests.
 Unplanned requests.

June 2, 2024 S M Irteza / Dr Rafi Ullah 22


Core DBMS Functions cont.
 Planned Requests
 Their need is already predicted.
 DBA will probably have tuned the Physical DB design to
guarantee good performance.
 Characteristic of “applications”, i.e., issued by pre-written
applications usually

 Unplanned Requests
 An Ad Hoc query
 Its need was not predictable.
 The physical DB might not be tuned for optimum performance.
 Characteristic of “decision support”, I.e. issued by query
language processor.

June 2, 2024 S M Irteza / Dr Rafi Ullah 23


Core DBMS Functions cont.
 Optimization and Execution

 DML requests both planned and unplanned are


processed by optimizer component.
 Its purpose is to find an efficient way of
implementing the request.
 Optimized requests are then executed under the
control of run time manager.
 Run-time manager might invoke some file managers
to access the physically stored data.

June 2, 2024 S M Irteza / Dr Rafi Ullah 24


Core DBMS Functions cont.
 Data Security and Integrity

 Allows to define constraints.


 Monitors user requests.
 Rejects any attempt that violates the security and
integrity constraints.Defined by the DBA.
 They can be run on compile time or run time or some
where in the middle.

June 2, 2024 S M Irteza / Dr Rafi Ullah 25


Core DBMS Functions cont.
 Data Recovery And Concurrency

 The Transaction manager, or Transaction


processing monitor(TP monitor) deals with these.
 Must enforce some recovery and concurrency control.
.

June 2, 2024 S M Irteza / Dr Rafi Ullah 26


Core DBMS Functions cont.
 Data Dictionary

 DBMS provides a data dictionary function.


 It is a database in its own right.
 Contains data about data.
 Sometimes called “metadata” or descriptors.
 For example, definitions of other objects in the
database, like schemas, mappings, raw data, various
integrity constraints, security constraints. It might
also know what program uses what part of the
database, etc.

June 2, 2024 S M Irteza / Dr Rafi Ullah 27


Core DBMS Functions cont.
 Performance

 DBMS should perform all of the above mentioned


tasks with the highest efficiency.

June 2, 2024 S M Irteza / Dr Rafi Ullah 28


Data Communication Manager
 Requests from remote user’s workstations might
come to the DBMS in form of communication
messages.
 Similarly, responses from the DBMS to the user
through an online application etc.
 All these are handled by the data communication
manager, which is not actually a part of DBMS itself.

June 2, 2024 S M Irteza / Dr Rafi Ullah 29


Client/Server Architecture
 Database systems are considered to have two parts
 Server side (back end)
 Client side (front end)
 Server
 Server is the DBMS itself.
 Provides all the basic DBMS functions
 DDL, DML, security, integrity, etc.

June 2, 2024 S M Irteza / Dr Rafi Ullah 30


Client/Server Architecture cont.

 Client
 Applications that run on top of the DBMS.

End users

Applications Clients

DBMS Server

Database

June 2, 2024 S M Irteza / Dr Rafi Ullah 31


Distributed Processing
 Distributed Processing
 Meaning that Distinct machines can be connected
together into a communication network, e.g internet,
in such a way that single processing task can span
over several machines in the N/W.
 If machines are physically close together than such
an activity is called “Parallel Processing”.
 Communication is handled by some n/w management
software, probably some enhanced DC manager.

June 2, 2024 S M Irteza / Dr Rafi Ullah 32


Distributed Processing cont.

End users

 Example
 Client and server Applications Clients machine
running on
different
machines Remote access

DBMS Server machine

Database

June 2, 2024 S M Irteza / Dr Rafi Ullah 33


Distributed Processing cont

Network

Server Machine

One Server machine, Many Client


machines DB
June 2, 2024 S M Irteza / Dr Rafi Ullah 34
Distributed Processing cont

Clients
Clients
Server Clients
Server
Clients Server
Server

Network Clients
Server
Each machine runs both client and server.

June 2, 2024 S M Irteza / Dr Rafi Ullah 35


End

END OF LESSON 02

June 2, 2024 S M Irteza / Dr Rafi Ullah 36

You might also like