database-unit-two-Architcture-of-Database-and-model
database-unit-two-Architcture-of-Database-and-model
1. Physical level . The lowest level of abstraction describes how the data are
actually stored. The physical level describes complex low -level data
structures in detail.
2. Logical level. The next-higher level of abstraction describes what data are
stored in the database, and what relationships exist among those data.
Database administrators, who must decide what information to keep in the
database, use the logical level of abstraction.
3. View level.
The highest level of abstraction describes only part of the
entire database. Even though the logical level uses simpler
structures, complexity remains because of the variety of
information stored in a large database. Many users of the
database system do not need all this information ; instead,
they need to access only a part of the database. The view level
of abstraction exists to simplify their interaction with the
system. The system may provide many views for the same
database
2.2 Structure of Database Management
System
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 important
because databases typically require a
large amount of storage space.
The query processor is important
because it helps the database system
simplify and facilitate access to data.
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.
A query can usually be translated into any of a number of alternative evaluation plans
that all give the same result.
The DML compiler also performs query optimization, that is, it picks the lowest cost
evaluation plan from among the alternatives.
Storage Manager
A storage manager is a program module that provides the interface between the low
level data stored in the database and the application programs and queries submitted
to the system. The storage manager is responsible for the interaction with the file
manager.
It is responsible for storing, retrieving, and updating data in the database.
Storage Manager
The storage manager components include:
Authorization and integrity manager, which tests for the satisfaction of
integrity constraints and checks the authority of users to access data.
Transaction manager, which ensures that the database remains in a
consistent (correct) state despite system failures, and that concurrent
transaction executions proceed without conflicting.
File manager, which manages the allocation of space on disk storage
and the data structures used to represent information stored on disk.
Buffer manager, which is responsible for fetching data from disk
storage into main memory, and deciding what data to cache in main
memory. The buffer manager is a critical part of the database system,
since it enables the database to handle data sizes that are much larger
than the size of main memory.
Transaction Manager
A transaction is a collection of operations that performs a single
logical function in a database application.
Each transaction is a unit of both atomicity and consistency. Thus, we
require that transactions do not violate any database-consistency
constraints.
That is, if the database was consistent when a transaction started, the
database must be consistent when the transaction successfully
terminates.
Transaction - manager ensures that the database remains in a
consistent (correct) state despite system failures (e.g., power failures
and operating system crashes) and transaction failures.
2.3 Level Database Architecture and
data Independence
DBMS architecture helps in design, development, implementation, and
maintenance of a database. A database stores critical information for a
business. Selecting the correct Database Architecture helps in quick and
secure access to this data.
2 Tier Architecture
A two-tier architecture is a database
architecture where: 1. Presentation layer
runs on a client (PC, Mobile, Tablet, etc.)
2. Data is stored on a Server.
An application interface which is called
ODBC (Open Database Connectivity) an
API which allows the client-side program
to call the DBMS.
Today most of the DBMS offers ODBC
drivers for their DBMS. 2 tier architecture
provides added security to the DBMS as
it is not exposed to the end user directly.
Three tier
3-tier schema is an extension of the 2-tier architecture.
3-tier architecture has following layers:
1.Presentation layer (your PC, Tablet, Mobile, etc.)
2.Application layer (server) 3.Database Server
3 Tier Architecture
This DBMS architecture contains an Application layer between the user
and the DBMS, which is responsible for communicating the user's request
to the DBMS system and send the response from the DBMS to the user.
The application layer(business logic layer) also processes functional logic,
constraint, and rules before passing data to the user or down to the DBMS
Three tier architecture is the most popular DBMS architecture.
The goal of Three-tier architecture is:
• To separate the user applications and physical database
• Proposed to support DBMS characteristics
• Program-data independence
• Support of multiple views of the data
Example of Three-tier Architecture is any large website on the internet.
Data Independence
The main purpose of data abstraction is achieving data
independence in order to save time and cost required when the
database is modified or altered.
Data independence is the ability of to make changes to data
characteristics without have to make changes to the programs that
access the data. It's important because of the savings in time and
potential errors caused by reducing modifications to data access
software.
Physical level data independence :
It refers to the characteristic of being able to modify the physical
schema without any alterations to the conceptual or logical schema.
These alterations or modifications to the physical structure may include:
• Utilizing new storage devices.
• Modifying data structures used for storage.
• Altering indexes or using alternative file organization techniques etc.