0% found this document useful (0 votes)
4 views21 pages

Week 4 Database Environment

The document provides an overview of database systems, focusing on database architecture, data independence, and the components of a database. It explains the concepts of schema, subschema, and instances, as well as the differences between two-tier and three-tier architectures, highlighting their advantages. Examples such as a Library Management System and an E-commerce Store illustrate the practical applications of these architectures.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views21 pages

Week 4 Database Environment

The document provides an overview of database systems, focusing on database architecture, data independence, and the components of a database. It explains the concepts of schema, subschema, and instances, as well as the differences between two-tier and three-tier architectures, highlighting their advantages. Examples such as a Library Management System and an E-commerce Store illustrate the practical applications of these architectures.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 21

DATABASE SYSTEMS

(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

Database Systems provide users with an abstract


view of data, hiding certain details of how data
are stored and maintained

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

■ Plan of the database is known as schema


■ Logical representation of DB
■ Gives the name of the entities and attributes and also specify the
relationship among them
■ It includes the definition of database name, the record type and the
components that make up those records
■ Values fitted into the format changes from instance to instance

■ RDBMS (Tables, Relations)


■ ER (Entities, Relationship)
– Entity representation
7
8
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

Subschem Subschem Subschem


a a a
A B C

User User User User User


1 2 3 4 5

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

■ Database application usually partitioned into:


– Two Tier Architecture
– Three Tier 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

For Example: A Library Management System used in schools or small


organizations is a classic example of two-tier architecture.
■ Client Layer (Tier 1): This is the user interface that library staff or users
interact with. For example they might use a desktop application to search for
books, issue them, or check due dates.
■ Database Layer (Tier 2): The database server stores all the library records
such as book details, user information, and transaction logs.

■ 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

■ Easy to Access: 2-Tier Architecture makes easy access to the database,


which makes fast retrieval.
■ Scalable: We can scale the database easily, by adding clients or upgrading
hardware.

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

For Example: E-commerce Store


User: You visit an online store, search for a product and add it to your cart.
Processing: The system checks if the product is in stock, calculates the total
price and applies any discounts.
Database: The product details, your cart and order history are stored in the
database for future reference.

20
Advantages of 3-Tier Architecture

■ Enhanced scalability: Scalability is enhanced due to the distributed


deployment of application servers. Now, individual connections need not be
made between the client and server.
■ Data Integrity: 3-Tier Architecture maintains Data Integrity. Since there is a
middle layer between the client and the server, data corruption can be
avoided/removed.
■ Security: 3-Tier Architecture Improves Security. This type of model prevents
direct interaction of the client with the server thereby reducing access to
unauthorized data.

21

You might also like