0% found this document useful (0 votes)
50 views

Chapter 2 Three Level Architecture

The document describes the components of a database system including hardware, software, data, users, and procedures. It discusses each component in more detail: - Hardware refers to the physical computer system that stores and accesses the database. - Software is the database management system (DBMS) that acts as the interface between the physical database and users. - Data acts as the bridge between the machine and user components. - Users include various types that can access or retrieve data like application programmers, end users, administrators and more. - Procedures are the set of steps defining how the database is structured and maintained.

Uploaded by

Ankit Rajput
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
50 views

Chapter 2 Three Level Architecture

The document describes the components of a database system including hardware, software, data, users, and procedures. It discusses each component in more detail: - Hardware refers to the physical computer system that stores and accesses the database. - Software is the database management system (DBMS) that acts as the interface between the physical database and users. - Data acts as the bridge between the machine and user components. - Users include various types that can access or retrieve data like application programmers, end users, administrators and more. - Procedures are the set of steps defining how the database is structured and maintained.

Uploaded by

Ankit Rajput
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 50

Components of Database

Five major components in database system environment:


Hardware
Software
Data
Users
Procedures
Components of Database System
Hardware: It is the actual computer system used for keeping and accessing the database.

DBMS hardware consists of secondary storage devices like hard disks.

Software: It is the actual DBMS. Between the physical database itself and the users of

system is a layer of software, called DBMS.

Data: Data acts as the bridge between the machine components and user components.
Components of Database System
Users: There are number of users who can access or retrieve
data on demand using the applications and the interfaces
provided by DBMS. The users can be:
• Naive users
• Online users
• Application Programmers
• Sophisticated Users
• Data base Administrator ( DBA)
Different Types of Database Users in DBMS

1. Application Programmers
• As its name shows, application programmers are the one who writes application
programs that uses the database.

• These programs meet the user requirement and made according to user requirements.

• Retrieving information, creating new information and changing existing information


is done by these application programs.
Different Types of Database Users in DBMS
1. Application Programmers

They interact with DBMS through DML (Data manipulation language) calls. And all
these functions are performed by generating a request to the DBMS.
End Users
End users are those who access the database from the terminal end.
They use the developed applications and they don’t have any
knowledge about the design and working of the database.
Their main motto is just to get their task done.

There are basically two types of end users:


• Casual User
• Naive
Casual User
• These users have great knowledge of query language.
• Casual users access data by entering different queries from the terminal end.
• They do not write programs but they can interact with the system by writing
queries.
Naive
• Any user who does not have any knowledge about database can be in this category.
• Their task is to just use the developed application and get the desired results.
• For example: Clerical staff in any bank is a naive user.
• They don’t have any dbms knowledge but they still use the database and perform
their given task.
Sophisticated Users - They are database developers, who write SQL
queries to select/insert/delete/update data. They do not use any application
or programs to request the database. They directly interact with the
database by means of query language like SQL.

DBA (Database Administrator)


DBA can be a single person or it can be a group of person. Database
Administrator is responsible for everything that is related to database.
Makes the policies, strategies and provides technical support.
System Analyst
System analyst is responsible for the design, structure and
properties of database. All the requirements of the end users are
handled by system analyst. Feasibility, economic and technical
aspects of DBMS is the main concern of system analyst.
Architecture of Database Management System
1-tier or Single-tier Architecture
The simplest of database architecture is 1 tier where the Client,
Server, and Database all reside on the same machine.
But such architecture is rarely used in production.
2-tier Architecture
Two-tier is based on Client-Server architecture. 

In this type of architecture we have:


• Presentation layer which runs on client (PC, mobile, tablet etc.)

• Data is stored on server

An application interface which is called ODBC (Open Database Connectivity)

an API which allows the client-side program to call the DBMS. 


2-Tier Architecture
3-Tier Architecture
3-tier schema is an extension of the 2-tier architecture. 3-tier architecture has the

following layers:
• Presentation layer (your PC, Tablet, Mobile, etc.)

• Application layer (server)

• Database Server

It can be used in web applications and distributed applications.

It is the most widely used architecture to design a DBMS.


Two-tier and three-tier architecture
3-Tier Architecture
When you install a DB in your
system and access it to practice
SQL queries is which type of
architecture?
A Contact Management System
created using MS- Access
Any large website on the internet
Homework:

When you book a train ticket


online follow which type of
architecture?
Schemas, Instances, and Database State

 Database Schema
 The description of the database
 Specified during database design
 Expected to change when requirements change
 Schema Diagram
 Most data models have certain conventions for displaying schemas as
diagrams
 Displays only some aspects of a schema, such as names of record types
and data items
 Some constraints are difficult to represent
 Schema Construct
 Each object in the schema (e.g., student, course)
Example
Database State or Snapshot
 Actual data in the database may change frequently
 The data in the database at a particular moment in time is called a
database state or snapshot
 Also called the current set of occurrences or instances in the database
Database Schema vs. Database State

 The distinction is very important

 When we define a database, we specify its database schema only to the


DBMS
 Database state is the empty state (w/ no data)
 Initial state: when the database is first populated or loaded with
initial data
 Current State: State at any point in time. Every time an update operation
is applied to the database, database state changes
Database Schema vs. Database State

 Valid State: A state that satisfies the structure and the constraints
specified in the schema

 The schema is sometimes called the intension and a database


state is called an extension of the schema
Three-Schema Architecture
The goal is to separate user applications and physical database
Defines DBMS schema at three levels:

Internal schema at the internal level to describe data storage structures and
access paths. Typically uses physical data model.
Conceptual schema at the conceptual level to describe the structure and
constraints for the whole data se. 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.

Mapping: Process of transforming requests and results between levels


Example: University Management System
Levels of Abstraction

 A major purpose of database system is to provide users with an abstract view of


the data
 Physical level: describes how a record (e.g., customer) is stored.
 Logical level: describes data stored in database, and the relationships among
the data.
 View level: application programs hide details of data types. Views can also
hide information (such as an employee’s salary) for security purposes.
Three Level Architecture of DBMS
Three Level Architecture of DBMS

 External Level
 Conceptual Level
 Internal Level
External Level or View level
 It is the users’ view of the
database.
 It describes that part of the
database that is relevant to each
user.
 It is closest to the end users.
 External level is also known as
the view level.
External Level or View level
 It deals with the way in which
individual users view data.
 Individual users are given
views according to their requirements.
different
 Example: one user may view dates
theinform (day, month, while
year),
another may view dates as
month, day).
(year,
 One may be interested in First
Name other may be in
Name. Name and Last
First
Conceptual Level or Logical
Level
 This level must not contain any storage
dependent details.
 For example it contains
only information about data type and
its size
but not any storage considerations,
such as the number of bytes occupied.
 Conceptual level is also known as
the logical level.
Conceptual Level or Logical
Level
This level deals with
 All entities, their attributes,
and their relationships
 The constraints on the data
 Security and integrity information
Internal Level or Storage
level
 It is the physical representation of
the database on the computer.
 This level describes how the data
is stored in the database.
 It concerns the way the data are
physically stored on the
hardware.
Internal Level or Storage
level
The internal level is concerned with
 Storage space allocation for
data and indexes;
 Record descriptions for
storage (with stored sizes for data
items);
 Record placement;
 Data compression and
data encryption techniques.
Three Level Architecture
Mapping between the Views
Mapping between Views
External/Conceptual Mapping:
 Each external schema is related to the
conceptual schema by
external/conceptual mapping.
the
 It maps logical record in the
view to one (or more)
external
conceptual record(s) in the conceptual
view.
Mapping between Views
Conceptual/Internal Mapping:
 Conceptual schema is related to
internal
the schema by
conceptual/internal mapping.
the
 This enables the DBMS to find the
actual record or combination of records
in physical storage that constitute a
logical record in conceptual schema.
Schema

 The overall description of the database is called


the
Database Schema.
 There are three different types of schema in the database
corresponding to each data view of database. In other
words, the data views at each of three levels are described by
schema.
Schema

 The External view is described by means of a schema called external schema that
correspond to different views of the data.
 Similarly the Conceptual view is defined by conceptual schema, which describes all
the entities, attributes, and relationship together with integrity constraints.
 Internal View is defined by internal schema, which is a complete description of the
internal model, containing definition of stored records, the methods of representation,
the data fields, and the indexes used.
Data Independence
Achievement of Three Level Architecture
Data Independence

 Application Programs should be independent from the way the


data is stored and accessed.
Data Independence-Achievement of Layered
Architecture of DBMS
There are two kinds of data
independence:
 Logical data independence
 Physical data independence
Logical data independence

Logical data independence indicates that the conceptual schema can be


changed without affecting the existing external schemas. The change
would be absorbed by the mapping between the external and conceptual
levels.
Physical data independence

Physical data independence indicates that the physical storage


structures or devices could be changed without affecting
conceptual schema. The change would be absorbed by the
mapping between the conceptual and internal levels.
Procedure for Data Access by
DBMS
Procedure for Data Access by
DBMS
Thanks

You might also like