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

DBA Structure

The document discusses database system concepts and architecture. It describes three approaches to organizing data - file-based, shared file, and database approaches. The database approach uses a database management system (DBMS) that allows for shared access to logically related data. The DBMS provides program-data independence through its system catalog. It also supports roles like database administrators and designers. The DBMS has components like a DDL compiler, data dictionary, data files, and query processor. It follows a three-schema architecture with external, conceptual, and internal levels that provide data independence.
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views

DBA Structure

The document discusses database system concepts and architecture. It describes three approaches to organizing data - file-based, shared file, and database approaches. The database approach uses a database management system (DBMS) that allows for shared access to logically related data. The DBMS provides program-data independence through its system catalog. It also supports roles like database administrators and designers. The DBMS has components like a DDL compiler, data dictionary, data files, and query processor. It follows a three-schema architecture with external, conceptual, and internal levels that provide data independence.
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 23

Database System Concepts and

Architecture
File-based approach
Files

Customer
Files
Applications File
Applications Customer
Customer
Orders
Stock
File
File

Order
Customer
File Orders
Stock
Customer
File
File
Customer
Customer Stock Invoicing
Invoicing File

Order
Order
File
File

Purchase
Stock
File Orders
Purchase Supplier
Orders
Supplier File
File

2
Stock
File
Stock
Stock Control
Control
Order
File
Shared file approach
File-based Approach
 Shared File Approach
 Data (files) is shared between different applications
 Data redundancy problem is alleviated
 Data inconsistency problem across different versions of the same file is
solved
 Other problems:
 Rigid data structure: If applications have to share files, the file
structure that suits one application might not suit another
 Physical data dependency: If the structure of the data file needs to
be changed in some way, this alteration will need to be reflected in
all application programs that use that data file

3
 No support of concurrency control: While a data file is being
processed by one application, the file will not be available for other
applications or for ad hoc queries
Database Approach

4
Database Approach

 Data
 Known facts that can be recorded and that have implicit
meaning
 Information? Knowledge?
 Database: Shared collection of logically related data and a
description of this data, designed to meet the information
needs of an organization

5
Database Approach
 System catalog (metadata) provides description of data to enable
program–data independence

 Logically related data comprises entities, attributes, and relationships


of an organization’s information

 DataBase Management System (DBMS): a general-purpose software


system that facilitates the processes of defining, constructing,
manipulating, and sharing databases among various users and
applications (or a software system that enables users to define, create,
maintain, and control access to the database)

6
Database Approach

 Roles in the Database Environment


 Database Administrator (DBA): responsible for authorizing access to
DB, coordinating & monitoring its use, and for acquiring software and
hardware resources as needed
 Database Designers: responsible for identifying the data to be stored in
DB, choosing appropriate structures to represent and store this data
 Application Programmers
 End Users
Structure Components, and Functions
of DBMS
 Structure of DBMS:
 DBMS (Database Management System) acts as an interface
between the user and the database. The user requests the DBMS
to perform various operations such as insert, delete, update and
retrieval on the database.
 The components of DBMS perform these requested operations on
the database and provide necessary data to the users.
Structure of a Database

 DBMS components:

9
 DDL Compiler:
 Data Description Language compiler processes schema
definitions specified in the DDL.
 It includes metadata information such as the name of the
files, data items, storage details of each file, mapping
information and constraints etc.
 DML Compiler and Query optimizer:
 The DML commands such as insert, update, delete,
retrieve from the application program are sent to the DML
compiler for compilation into object code for database
access.
 The object code is then optimized in the best way to
execute a query by the query optimizer and then send to
the data manager.
 Data Manager:The Data Manager is the central software
component of the DBMS also knows as Database Control
System.
 The Main Functions Of Data Manager Are:
 Convert operations in user's Queries coming from the
application programs or combination of DML Compiler
and Query optimizer which is known as Query Processor
from user's logical view to physical file system.
 Controls DBMS information access that is stored on disk.
 It also controls handling buffers in main memory.
 Italso enforces constraints to maintain consistency and
integrity of the data.
 Italso synchronizes the simultaneous operations
performed by the concurrent users.
 It also controls the backup and recovery operations.
 Data Dictionary:
 Data Dictionary, which stores metadata about the
database, in particular the schema of the database.
 names of the tables, names of attributes of each table,
length of attributes, and number of rows in each table.
 Detailed information on physical database design such as
storage structure, access paths, files and record sizes.
 Usage statistics such as frequency of query and
transactions.
 Data dictionary is used to actually control the data
integrity, database operation and accuracy. It may be
used as a important part of the DBMS
 Data Files:
 Which store the database itself.
 Compiled DML:
 The DML complier converts the high level Queries into low level
file access commands known as compiled DML.
 End Users:
 The second class of users then is end user, who interacts with
system from online workstation or terminals.
 Use the interface provided as an integral part of the database
system software.
 User can request, in form of query, to access database either
directly by using particular language, such as SQL, or by using
some pre-developed application interface.
 Such request are sent to query evaluation engine via DML pre-
compiler and DML compiler
 The query evaluation engine accepts the query and analyses it.
 It finds the suitable way to execute the compiled SQL
statements of the query.
 Finally, the compiled SQL statements are executed to perform
the specified operation
 Query Processor Unit: Interprets DDL statements into a set of tables
containing metadata.
Translates DML statements into low level instructions that the query
evaluation engine understands.
Converts DML statements embedded in an application program into
procedure calls in the host language.
Executes low level instructions generated by DML compiler.
 DDL Interpreter
 DML Compiler
 Embedded DML Pre-compiler
 Query Evalution Engine
 Storage Manager Unit checks the authority of users to access data.
 Checks for the satisfaction of the integrity constraints.
 Preserves atomicity and controls concurrency.
 Manages allocation of space on disk.
Three-Schema Architecture and
Data Independence

 Objectives of Three-Schema Architecture


 All users should be able to access same data
 Users should not need to know physical database storage details
 DBA should be able to change database storage structures without
affecting the users’ views
 Internal structure of database should be unaffected by changes to physical
aspects of storage

15
 DBA should be able to change conceptual structure of database without
affecting all users
 Three-level architecture and data independence

16
 External Level
 Users’ view of the database
 Describes that part of database that is
relevant to a particular user
 Conceptual Level
 Community view of the database
 Describes what data is stored in database
and relationships among the data

17
 Internal Level
 Physicalrepresentation of the database on the
computer.
 Describes how the data is stored in the database

18
Three-Schema Architecture and
Data Independence

19
 Data Independence is the capacity to change the schema at
one level of a database system without having to change the
schema at the next higher level
 Logical Data Independence
 Refersto immunity of external schemas to changes in
conceptual schema
 Conceptual schema changes (e.g. addition/removal of
entities) should not require changes to external schema or
rewrites of application programs

20
 Physical Data Independence
 Refers to immunity of conceptual schema to changes
in the internal schema
 Internal schema changes (e.g. using different file
organizations, storage structures/devices) should not
require changes to conceptual or external schemas

21
Three-Schema Architecture and
Data Independence

22
Database Languages
 Data Definition Language (DDL) allows the DBA or user to
describe and name entities, attributes, and relationships
required for the application plus any associated integrity and
security constraints

 Data Manipulation Language (DML) provides basic data


manipulation operations on data held in the database

 Data Control Language (DCL) defines activities that are not in


the categories of those for the DDL and DML, such as

23
granting privileges to users, and defining when proposed
changes to a databases should be irrevocably made

You might also like