Chapt 02-Lect 06-07
Chapt 02-Lect 06-07
DA is the person who makes strategies and policies regarding the data of the enterprise. It is
basically a person at senior management level.
DA job is to decide what data (strategic decision) is to be stored in the database or in which
order and DA make strategic decisions regarding data for example “to decide who can do
what operations on what data under what circumstances we also called it as Data
security policy”
DATABASE ADMINISTRATOR
A person who technically controls database in organization. Technical functions can be:
1)Defining Conceptual schema: Its conceptual database design using DDL and ER diagram
as we have studied in previous lectures as well
2)Defining internal schema: Means definition of storage structures and access
techniques with definition of conceptual internal mapping.
3)Liaising with users (interacting with users): ensure that the data user need is available and help them for updating
their provided data (as discussed in topic of external level i.e. views). In short define necessary External conceptual
mapping, consulting Application design and providing technical education & also assist user to determine their data
problems & resolves them.
4)Defining security and integrity constraints:
Ensuring data integrity is maintained Grant and revoke rights statement are usually run by DBA for security
enforcement.
5)Defining dump and reload policies: Dump means backup of a database and reload means restoring it from drive
to database
6)Monitoring performance and help user to chase those requirements.
DBMS FUNCTIONS
1) DATA DEFINITION(DDL PROCESSOR):
Accepts data definition in the form of source schema in DDL and converts them to objects form. Object form is stored in data
dictionary.
2) DATA MANIPULATION:
o DBMS must accept request to retrieve ,insert ,update and delete data in database.
o DBMS must include DML processor for compilation of two types of following requests: Planned DML
Request & Un-planed DML Request.
Planned DML Request Un planned DML Request
For which need was foreseen before the request has been For which need is decided at a runtime we may call this as
generated dynamic query
Example: area wise monthly sales. Example: User selected area wise monthly sales.
Physical database design may be fine-tuned for efficiency Physical database design may or may not built the query
Generated from pre written application program Generated from query language processor
3) OPTIMIZER: A DBMS module that accepts a query and make it more efficient in terms of time and cost. It
does it all by choosing indexing and method that involves least no of operations.
The optimized request are executed under the control of run time manager which invokes file manager (meta
data) to access the required data.
(note : see block diagram of next page)
4)DATA SECURITY AND INTEGRITY: DBMS monitors users requests to avoid any violation of
security and integrity constraints and apply checks at compile time.
5)DATA RECOVERY AND CONCURRENCY:
DBMS includes transaction Manager that enforce commit and rollbacks properly wherever
required. (You will see its practical implementation in detail in lab)
Let see a block diagram to understand the concept of DBMS components and their
interactions
DBMS components and their interactions
Planned DML Unplanned
Source schema Requests DML
and mapping Request
3
6 7
1 DML Processor
Query Language
DDL Processor processor
4
2
Compiled
Requests
Source and object
schema 4
6
And mapping Optimizer
5 Meta Data
Optimized
Requests 7
5
Runtime 6
Manager
5
Database
DATA
META DATA
1.Transformation of the source schema 5.After optimization, the requests are
into DDL statements through mapping handed over to the runtime manager,
rules or transformations, and the which coordinates their execution within
subsequent processing of these DDL the database environment. The runtime
statements by the DDL Processor to manager ensures efficient allocation of
create or modify the database structure system resources and oversees the
accordingly. execution of optimized queries and
2.This ensures that any modifications transactions. Finally, the requests are
made at the database level are reflected in executed against the database.
the source schema and mapping rules,
maintaining consistency and
6.Metadata, which contains essential
synchronization between the two.
information about the database structure,
3. it represents the intention to perform statistics, and indexes, assists the
actions like inserting, updating, or deleting optimizer in making informed decisions
data in the database, which are then when generating optimized execution
handed over to the DML Processor for plans. This iterative process ensures that
execution. the optimizer has up-to-date information
4.DML requests are compiled into about the database environment to
executable code and then passed to the produce efficient query execution
optimizer to generate an optimized strategies. The DML processor utilizes this
execution plan. This optimized plan will be metadata to optimize data manipulation
used to efficiently execute the DML operations
request against the database. 7.It highlights the role of the Query
Language Processor in parsing,
validating, and optimizing DML
statements
Data Dictionary: set of information describing the contents, format, and structure of a database and the
relationship between its elements, used to control access to and manipulation of the database.
We may call data dictionary a system database rather than User database. INFORMATION STORED
IN DATA DICTIONARY:
1.External and conceptual schemas and their mapping
2.Names, types and size of data items.
3.Constraints(Primary key foreign key and all integrity constraints)
4.Names of authorized users who have access to View & Update to the data.
5.Various statistical information like rows in table, histograms, averages and frequency distribution.
6.Usage statistics like Frequency of transaction, Count of the number of access to a particular object in a
database.
7.More than that following information is present in data dictionary : User Tables, user indexes,
user constraints and DBA users.
We can access the data dictionary in the same way as we access the normal database tables like:
Select * from user tables;
(user must have right to access the user table like DBA has right we will cover this topic In lab)
Do you remember in the start of the lecture 02 we discussed following two points?
We have covered the topic of three level architecture now it’s time to cover N- Tier
Architecture.
The overall purpose of database system is to support the development and execution of
applications. Here we have two tier and three tier client/server Architecture.
Two Tier Client Server Architecture:
End
User
User Interface
Application logic
Cleint – 1st Tier
DBMS
Server-2nd Tier
Database
1st Tier is a client whose main task is to provide interface to the user and Apply
Business logic of application and how data could be process by using that business
logic.
2nd Tier is a Database server whose main task is database access and server side
validation (Constraints).
Advantages of 2 TIER ARCHITECTURE
1) Provide multiple ways to access existing database
2) Increased in performance. it is possible to stand client and server on different
machines and efficient storage with parallel processing can be applied in this situation
3) Database server can enhance performance via large Main memory, secondary
storage and cache size.
4) Due to separate Client a customize hardware for a client can be managed.
Distributed processing means that distinct machines can be connected together in a same
network such that a single data processing task can be spread among multiple machines.
:::Distributed Processing VS Parallel Processing:::
These two terms can be taken as simultaneous in databases terminologies with a slight
difference that: “in Distributed Processing distinct machines are graphically dispersed
whereas in parallel processing distinct machines are in close proximity (like under one
roof)”
::: Distributed Database :::
A collection of distinct databases stored on distinct machines and for an application it appears
like single logical database. Here we might have multiple servers.
For example: Student record can be placed in one database while student attendance record can
be placed in another database. Externally seems a single logical Database.
1)Online Transaction Processing System (OLTP):
Online transaction processing (OLTP) is a class of systems that facilitate and manage
transaction-oriented applications, typically for data entry and retrieval transaction
processing on a database management system.
Example:
Banking Application where deposit / withdrawal of amount from bank account.
Databases supporting such applications are known as operational databases and they are designed
to handle high transaction with a proper commit and rollback mechanism.