Uploaded by VIGNESHWARAN B

1.2 Database Architecture

advertisement
DBMS Architecture
➢ Uses programming languages
to design a particular type of
software for businesses or
organizations.
➢ Focuses
on
the
design,
development,
implementation and maintenance
of
computer
programs
that
store and organize information
for businesses, agencies and
institutions.
➢ A database architect develops
and implements software to
meet the needs of users
DBMS Architecture
DBMS Architecture
➢ The architecture of a DBMS can be seen as
either single tier or multi-tier. The tiers
are classified as follows :
✓ 1-tier architecture
✓ 2-tier architecture
✓ 3-tier architecture
✓ n-tier architecture
1-Tier Architecture
➢ One-tier architecture involves putting all of
the required components for a software
application or technology on a single server
or platform.
1-Tier Architecture
➢ Any changes done here will directly be done on
the database itself. It doesn't provide
a handy tool for end users.
➢ The
1-Tier
architecture
is
used
for
development
of
the
local
application,
where programmers can directly communicate
with the database for the quick response.
➢ These are centralized systems
Centralized Systems
2-tier architecture
➢ The two-tier is based on
Client Server architecture.
➢ The
direct
communication
takes place between client
and server. There is no
intermediate between client
and server.
➢ The
user
interfaces
and
application programs are run
on the client-side.
➢ The
server
side
is
responsible
to
provide
the
functionalities
like:
query
processing
and transaction management.
2-tier architecture
2-tier architecture
➢ Applications on the client
end
can
directly
communicate
with
the
database at the server side.
For this interaction, API's
like: ODBC, JDBC are used
➢ To
communicate
with
the
DBMS,
client-side
application
establishes
a
connection with the server
side
➢ ODBC
–translation
layer,
used to access the database
and
the
user
interface
application
3-tier architecture
3-tier architecture
➢ 3-Tier architecture contains another layer
between the client and server. In this
architecture,
client
can't
directly
communicate with the server.
➢ application on the client-end interacts with
an
application
server
which
further
communicates with the database system.
➢ End user has no idea about the existence of
the database beyond the application server.
The database also has no idea about any other
user beyond the application.
➢ The 3-Tier architecture is used in case of
large web application.
3-tier architecture
 Database (Data) Tier
 database resides along with its query
processing languages
 Application (Middle) Tier
 the application server and the programs that
access the database resides in this layer
 presents an abstracted view of the database
to the user
 User (Presentation) Tier
 End-users operate on this tier
 multiple views of the database can be
provided by the application
3-tier architecture
n-tier architecture
n-tier architecture
User 1
View
1
External Level
User n
User 2 User 3
View View
View
…….
2
3
n
Conceptual
Level
Internal Level
Database
System Structure
Database Users
 Users are differentiated by the way they expect
to interact with the system
 Application programmers – interact with system
through DML calls
 Sophisticated users –
database query language
form
requests
in
a
 Specialized users – write specialized database
applications
that
do
not
fit
into
the
traditional data processing framework
 Naïve users – invoke one of the permanent
application programs that have been written
previously
 E.g. people accessing database over
bank tellers, clerical staff
the web,
Data Storage and Querying
 A database system is partitioned into modules
that deal with each of the responsibilities of
the overall system.
 The functional components of a database system
can be broadly divided into the storage manager
and the query processor components.
 The storage manager is the component of a
database system that provides the interface
between the low-level data stored in the
database and the application programs and
queries submitted to the system.
Storage Manager
 The storage manager components include:
✓ Authorization and integrity manager
✓ Transaction manager
✓ File manager
✓ Buffer manager
 The storage
structures:
manager
implements
several
data
✓ Data files, which store the database itself.
✓ Data dictionary, which stores metadata about the
structure of the database,
✓ Indices, which can provide fast access to data
items
Data Dictionary and Indices
Query Processor
 The query processor components include:
 DDL interpreter, which interprets DDL statements
and records the definitions in the data
dictionary.
 DML compiler, which translates DML statements in
a query language into an evaluation plan
consisting of low-level instructions that the
query evaluation engine understands.
 Query evaluation engine, which
level
instructions
generated
compiler.
executes
by
the
lowDML
Transaction Management
 A transaction is a collection of operations that
performs a single logical function in a database
application
 Transaction-management component ensures that
the database remains in a consistent (correct)
state despite system failures (e.g., power
failures and operating system crashes) and
transaction failures.
 Concurrency-control
manager
controls
the
interaction among the concurrent transactions,
to ensure the consistency of the database.
Data Independence
➢ Data Independence is defined as a property of
DBMS that helps you to change the Database
schema at one level of a database system without
requiring to change the schema at the next
higher level.
➢ Also helps you to keep data separated from all
programs that make use of it.
Data Independence - Types
➢ 2 types
➢ Physical Data Independence
➢ Logical Data Independence
Data Independence
Physical Data
Independence
➢ capacity to change the internal schema
without having to change the conceptual
schema.
➢ separate conceptual levels from the
internal levels
➢ For Example
✓ If we do any changes in the storage size
of the database system server, then the
Conceptual structure of the database
will not be affected
Physical Data
Independence
Examples of Physical Data
Independence
➢ Using a new storage device like Hard
Drive or Magnetic Tapes
➢ Modifying the file organization
technique in the Database
➢ Switching to different data structures.
➢ Changing the access method.
➢ Modifying indexes.
➢ Changes to compression techniques or
hashing algorithms.
➢ Change of Location of Database from say
C drive to D Drive
Logical Data Independence
➢ able to change the conceptual schema
without having to change the external
schema.
➢ used to separate the external
from the conceptual view
level
➢ If we do any changes in the conceptual
view of the data, then the user view of
the data would not be affected.
➢ Logical data independence occurs at the
user interface level.
➢ For example
Logical Data Independence
Examples of Logical Data
Independence
Due to Logical independence, any of the
below change will not affect the external
layer.
➢ Add/Modify/Delete
a
new
attribute,
entity or relationship is possible
without
a
rewrite
of
existing
application programs
➢ Merging two records into one
➢ Breaking an existing record into two or
more records
Download