Elements of DBMS
Elements of DBMS
DML Precompiler
A DML precomplier or processor deals with the data manipulation language
(DML). This allows DBMS to retrieve, update or modify existing data in the
68 database or to add new data to the database.
DDL Compiler Database Management
Systems
The DDL compiler converts the data definition statements into a set of tables.
These tables contain information concerning the database and are in a form
that can be used by other components of the DBMS. Thus, it helps to deal with
various data definition languages.
File Manager
File manager is that component of the underlying operating system that manages
stored files. File manager manages the allocation of space on disk storage and
the data structure used to represent information stored on disk.
Database Manager
Databases typically require a large amount of storage space. Corporate databases
are usually measured in terms of gigabytes of data. Since the main memory of
computers cannot store this information, it is stored on disks. Data is moved
between disk storage and main memory as needed. Since the movement of
data to and from disk is slow relative to the speed of control processing unit of
computers, it is imperative that database system structure data so as to minimise
the need to move data between disk and main memory. A database manager is
a program module which provides the interface between the low level data
stored in the database and the application programs and queries submitted to
the system. It is responsible for interfacing with file system.
One of the functions of database manager is to convert user’s queries coming
directly via the query processor or indirectly via an application program from
the user’s logical view to the physical file system. In addition, the tasks of
enforcing constraints to maintain the consistency and integrity of the data as
well as its security are also performed by database manager. Synchronising
the simultaneous operations performed by concurrent users is under the control
of the database manager. It also performs backup and recovery operations.
Some of the important responsibilities of Database Manager are:
Interaction with file manager: The raw data is stored on the disk using the
file system which is usually provided by a conventional operating system. The
database manager translates the various DML statements into low-level file
system commands. Thus the database manager is responsible for the actual
storing, retrieving and updating of data in the database.
Integrity enforcement: The data values stored in the database must satisfy
certain types of consistency constraints. For example, the balance of a bank
account may never fall below a prescribed amount (for example Rs. 500).
Similarly the number of holidays per year an employee may be having should
not exceed 25 days. These constraints must be specified explicitly by the DBA.
If such constraints are specified, then the database manager can check whether
updates to the database result in the violation of any of these constraints and if
so appropriate action may be imposed.
Security enforcement: As discussed above, not every user of the database
needs to have access to the entire content of the database. It is the job of the
database manager to enforce these security requirements.
Backup and recovery: A computer system like any other mechanical or
electrical device, is subject to failure. There are a variety of causes of such 69
Database Concepts failure, including disk crash, power failure and software errors. In each of
these cases, information concerning the database is lost. It is the responsibility
of database manager to detect such failures and restore the database to a state
that existed prior to the occurrence of the failure. This is usually accomplished
through the backup and recovery procedures.
Concurrency control: When several users update the database concurrently,
the consistency of data may no longer be preserved. It is necessary for the
system to control the interaction among the concurrent users, and achieving
such a control is one of the responsibilities of database manager.
Query Processor
The database user retrieves data by formulating a query in the data manipulation
language provided with the database. The query processor is used to interpret
the online user’s query and convert it into an efficient series of operations in a
form capable of being sent to the data manager for execution. The query
processor uses the data dictionary to find the structure of the relevant portion
of the database and uses this information in modifying the query and preparing
an optimal plan to access the database.
Data Dictionary
It is seen that when a program become somewhat large in size, keeping a track
of all the available names that are used and the purpose for which they were
used becomes more and more difficult. Of course, it is possible for a
programmer who has coined the available names to bear them in mind, but
should the same author come back to his/her program after a significant time
or should another programmer have to modify the program, it would be found
that it is extremely difficult to make a reliable account of what purpose the
data files were used for.
The problem becomes even more difficult when the number of data types that
an organisation has in its database increases. It is also now perceived that the
data of an organisation is a valuable corporate resource and therefore some
kind of an inventory and catalogue of it must be maintained so as to assist in
for both the utilisation and management of the resource.
It is for this purpose that a data dictionary or dictionary/directory is emerging
as a major tool. An inventory provides definitions of things. A directory tells
you where to find them. A data dictionary/directory contains information (or
data) about the data.
A comprehensive data dictionary would provide the definition of data item,
how they fit into the data structure and how they relate to other entities in the
database. With the comprehensive base of information the data dictionary can
serve several useful purposes connecting across the whole spectrum of planning,
determining information requirement, designing and implementation operation
and revision. There is now a greater emphasis on having an integrated system
in which the data dictionary is part of the DBMS. In such a case the data
dictionary would store the information concerning the external, conceptual
and internal levels of the databases. It would combine the source of each data
field value that is from where the authenticate value is obtained, the frequency
70
of its use and audit trail regarding the updates including user identification Database Management
Systems
with the time of each update.
The greater acceptance and proliferation of relational databases have encouraged
the evolution of data dictionary to “information resource dictionary system”
(IRDS) for such facilities, as is the suggestion from ANSI (American National
Standards Institute).
The DBA uses the data dictionary in every phase of a database life cycle,
starting from the embryonic data gathering phase to the design, implementation
and maintenance phases. Documentation provided by a data dictionary is as
valuable to the end users and managers as it is essential for the programmers.
Users can plan their applications with the database only if they know exactly
what is stored in it. You could consider a data dictionary to be a road map
which guides users to access information within a large database.
An ideal data dictionary should include everything a DBA wants to know
about the database.
a) external, conceptual and internal database descriptions
b) descriptions of entities (record types), attributes (fields), as well as cross-
references, origin and meaning of data elements
c) synonyms, authorisation and security codes
d) which external schemas are used by which programs, who the users are,
and what their authorisations are.
The data dictionary is one of the most important tools for the database
administrator. It is used to maintain information relating to the various resources
used in information systems (hence sometimes called an information resource
dictionary)—data, input transactions, output reports, programs, application
systems, and users. It can:
a) assist the process of system analysis and design.
b) provide a more complete definition of the data stored in the database (than
is maintained by the DBMS).
c) enable an organisation to assess the impact of a suggested change within
the information system or the database.
d) help in establishing and maintaining standards for example, of data names.
e) facilitate human communication through more complete and accurate
documentation.
Several data dictionary software packages are commercially available.
The DBA should also have tools to monitor the performance of the database
system to indicate the need for reorganisation or revision of the database.
Mappings between the internal and the conceptual levels, as well as between
the conceptual and external levels, are also defined by the DBA. Ensuring that
appropriate measures are in place to maintain the integrity of the database and
that the database is not accessible to unauthorised users is another responsibility.
The DBA is responsible for granting permission to the users of the database
and stores the profile of each user in the database. The DBA is also responsible
for defining procedures to recover the database from failures due to human,
natural, or hardware causes with minimal loss of data. Thus, the DBA is
responsible for the overall control of the system.
a) Schema Definition: Once the content of the database has been decided,
the DBA then creates the corresponding conceptual schema. He/she also
decides how the data is to be represented in the stored database. Thus, he/
she is concerned with the creation of the original database schema and the
process of database design.
4.9 SUMMARY
A database system is an integrated collection of related files along with the
details about their definition, interpretation, manipulation and maintenance. A
DBMS is a major software component of database system. It consists of
collection of interrelated data and programs to access that data. The primary
goal of a DBMS is to provide an environment which is both convenient and
efficient to use in retrieving information from a database and storing information
into the database.
The DBMS not only makes the integrated collection of reliable and accurate
data available to multiple applications and users but also controls unauthorised
access to data.
A DBMS is a major software system consisting of a number of elements. It
provides users DDL for defining the external and conceptual view of the data
and DML for manipulating the data stored in the database. The database
manager is the component of DBMS that provides the interface between the
user and the file system. The database administration defines and maintains
the three level of the database as well as the mapping between the levels to
insulate higher levels from changes that take place in the lower levels. The
DBA is responsible for implementing measures for ensuring the security,
integrity and recovery of the database.
3) A DBMS enables:
data security
conflict resolution
data Independence.
4.11 KEYWORDS
Data Administrator (DA) : A person or organisation responsible for
logical database design. Also called
information resource administrator.
Compare with database administrator.
79