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

Lecture 3 - BCSE302L - DBMS Architecture

The document discusses database environment and architecture. It defines key concepts like database schema, database instance, and data independence. It also describes different database architectures including 1-tier, 2-tier, and 3-tier architectures. The 3-tier architecture divides the database into three logical levels: the external view, conceptual view, and internal view. Finally, the document provides an overview of the overall structure of a database management system.

Uploaded by

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

Lecture 3 - BCSE302L - DBMS Architecture

The document discusses database environment and architecture. It defines key concepts like database schema, database instance, and data independence. It also describes different database architectures including 1-tier, 2-tier, and 3-tier architectures. The 3-tier architecture divides the database into three logical levels: the external view, conceptual view, and internal view. Finally, the document provides an overview of the overall structure of a database management system.

Uploaded by

bojon27556
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

Lecture 3 : CSE2004 – DBMS

DATABASE ENVIRONMENT AND ARCHITECTURE


Database Environment
Data Independence

Database Schema
A database schema is the skeleton structure that represents the logical view of the entire database.
It defines how the data is organized and how the relations among them are associated

A database schema can be divided broadly into two categories −


Physical Database Schema − This schema pertains to the actual storage of data and its form of
storage like files, indices, etc. It defines how the data will be stored in a secondary storage.
Logical Database Schema − This schema defines all the logical constraints that need to be
applied on the data stored. It defines tables, views, and integrity constraints.

Database Instance

A database instance is a state of operational database with data at any given time. It contains a
snapshot of the database. Database instances tend to change with time. A DBMS ensures that its every
instance (state) is in a valid state, by diligently following all the validations, constraints, and conditions
that the database designers have imposed.
Data Independence

Logical data is data about database, that is, it stores information about
how data is managed inside. For example, a table (relation) stored in
the database and all its constraints, applied on that relation.

If we do some changes on table format, it should not change the data


residing on the disk.

All the schemas are logical, and the actual data is stored in bit format
on the disk. Physical data independence is the power to change the
physical data without impacting the schema or logical data.

For example, in case we want to change or upgrade the storage


system itself − suppose we want to replace hard-disks with SSD − it
should not have any impact on the logical data or schemas.
Database Architecture in DBMS

 1-tier architecture

 2-tier architecture

 3-tier architecture
1 - Tier
1 – Tier / Centralized architecture
2 - Tier
3 - Tier / 3 Schema Architecture
Three-level architecture
External Views
The level where user organized data is
called an external view.

Conceptual View
The conceptual level lies between the
internal and external level. It provides the
way between them.

Internal View
The level where the operating system and
DBMS differentiate the data is called internal
view. Here all the data is stored used
different data structure and files.
Overall Database System Structure
Overall Architecture of Database Management Systems
Applications: – It can be considered as a user-friendly web page where the user enters the requests. Here he simply enters the details that he needs and presses
buttons to get the data.
End User: – They are the real users of the database. They can be developers, designers, administrators, or the actual users of the database.
DDL: – Data Definition Language (DDL) is a query fired to create database, schema, tables, mappings, etc in the database. These are the commands used
to create objects like tables, indexes in the database for the first time. In other words, they create the structure of the database.
DDL Compiler: – This part of the database is responsible for processing the DDL commands. That means this compiler actually breaks down the command into
machine-understandable codes. It is also responsible for storing the metadata information like table name, space used by it, num ber of columns in it, mapping
information, etc.
DML Compiler: – When the user inserts, deletes, updates or retrieves the record from the database, he will be sending requests which he understands by pressing
some buttons. But for the database to work/understand the request, it should be broken down to object code. This is done by this compiler. One can imagine this as
when a person is asked some question, how this is broken down into waves to reach the brain!
Query Optimizer: – When a user fires some requests, he is least bothered how it will be fired on the database. He is not all aware of the database or its way of
performance. But whatever be the request, it should be efficient enough to fetch, insert, update, or delete the data from the database. The query optimizer decides
the best way to execute the user request which is received from the DML compiler. It is similar to selecting the best nerve to carry the waves to the brain!
Stored Data Manager: –
• It converts the requests received from query optimizer to machine-understandable form. It makes actual requests inside the database.
• It helps to maintain consistency and integrity by applying the constraints. That means it does not allow inserting/updating / deleting any data if it has child
entry. Similarly, it does not allow entering any duplicate value into database tables.
• It controls concurrent access. If there are multiple users accessing the database at the same time, it makes sure, all of them see correct data. It guarantees
that there is no data loss or data mismatch happens between the transactions of multiple users.
• It helps to back up the database and recovers data whenever required. Since it is a huge database and when there is any unexpected exploit of
the transaction, and reverting the changes is not easy. It maintains the backup of all data so that it can be recovered.
Data Files: – It has the real data stored in it. It can be stored as magnetic tapes, magnetic disks, or optical disks.
Compiled DML: – Some of the processed DML statements (insert, update, delete) are stored in it so that if there are similar requests, it will be re-used.
Data Dictionary: – It contains all the information about the database. As the name suggests, it is the dictionary of all the data items. It contains a description of all
the tables, view, materialized views, constraints, indexes, triggers, etc.
Classification of Database
Based on the data model
Network database
Hierarchical database
Relational database
Object oriented database

Based on the number of users


Single user
Multiple users

Based on the sites over which network is distributed


Centralized database system
Distributed database system
Homogeneous DBMS
Heterogeneous DBMS

Based on the usage


OLTP, OLAP, Multimedia, GIS, Sensor data, Mobile database
Centralized Database
Advantages of Centralized Database
• It has decreased the risk of data management, i.e., manipulation of data will not affect
the core data.
• Data consistency is maintained as it manages data in a central repository.
• It provides better data quality, which enables organizations to establish data standards.
• It is less costly because fewer vendors are required to handle the data sets.
Disadvantages of Centralized Database
• The size of the centralized database is large, which increases the response time for
fetching the data.
• It is not easy to update such an extensive database system.
• If any server failure occurs, entire data will be lost, which could be a huge loss.
Distributed Database
Homogeneous DDB: Those database systems which execute on the same operating system

and use the same application process and carry the same hardware devices.

Heterogeneous DDB: Those database systems which execute on different operating

systems under different application procedures, and carries different hardware devices.

Advantages of Distributed Database

Modular development is possible in a distributed database, i.e., the system can be

expanded by including new computers and connecting them to the distributed system.

One server failure will not affect the entire data set.
Thank you

You might also like