Week 4 Database Environment
Week 4 Database Environment
(CS-151)
Topic: Database Environment
Course Instructor: Munazza
1
Lecture Overview
Database Architecture
Data Independence
Different aspects of DBMS
2
Components of Database
3
Data Abstraction
4
Data Abstraction
■ Physical Level
– Describes how data is actually stored
■ Logical Level
– Describes what data are stored in the database and
what relationships exist among those data
■ View Level
– Describes only part of the entire database by hiding
details of data types.
– Views can also hide information (e.g., salary) for
security purposes
5
DATABASE SYSTEM
ARCHITECTURE
6
Schema
9
Sub Schema
■ Subset of schema
■ Inherits the same property as schema has
■ Plan for a view is called sub schema
■ Refers to the application programmer view of the data item
types and record types, which he or she uses
■ Gives the users a window through which he or she can view
only that part of the database, which is of interest to him
■ Different application programmer can have different view of
data
■ Database administrator ensures that the subschema
requested by application programs is derivable from schema
10
Subschema
DBMS
Schema
11
12
Instance
■ When the schema framework is filled in the data item values or the
contents of the database at any point of time is referred to as
instance of the database
■ At any point of time, the current state of the database is called
instance
■ The instance of the database is the values of these variables at any
given time.
■ The database schema is the design that defines the variables in
tables that belong to a particular database.
13
Instance
14
Database Architecture
15
Two Tier Architecture
■ Application is partitioned into component that resides at the client machine
■ The 2-tier architecture is similar to a basic client-server model . The application
at the client end directly communicates with the database on the server side.
■ Evokes database functionality at server machine through query language
statements
■ Application program interface standards
are used for interaction between client
and the server
16
Two Tier Architecture
■ The client layer sends a request (like searching for a book) to the database
layer which processes it and sends back the result. This separation allows the
client to focus on the user interface, while the server handles data storage
and retrieval.
17
Advantages of 2-Tier Architecture
18
Three Tier Architecture
■ There is another layer between the client and the server.
■ The client does not directly communicate with the server. Instead, it interacts with
an application server which further communicates with the database system and
then the query processing and transaction management takes place.
■ This intermediate layer acts as a medium for the exchange of partially processed
data between the server and the client.
■ This type of architecture is used in the case
of large web applications.
19
Three Tier Architecture
20
Advantages of 3-Tier Architecture
21