More Database

1. The database administrator is a person having central control over data and programs accessing that data. Duties of the database administrator include: Scheme de nition: the creation of the original database scheme. This involves writing a set of de nitions in a DDL (data storage and de nition language), compiled by the DDL compiler into a set of tables stored in the data dictionary. Storage structure and access method de nition: writing a set of de nitions translated by the data storage and de nition language compiler Scheme and physical organization modi cation: writing a set of de nitions used by the DDL compiler to generate modi cations to appropriate internal system tables (e.g. data dictionary). This is done rarely, but sometimes the database scheme or physical organization must be modi ed. Granting of authorization for data access: granting di erent types of authorization for data access to various users Integrity constraint speci cation: generating integrity constraints. These are consulted by the database manager module whenever updates occur. 1.10 Database Users 1. The database users fall into several categories: Application programmers are computer professionals interacting with the system through DML calls embedded in a program written in a host language (e.g. C, PL/1, Pascal). { These programs are called application programs. { The DML precompiler converts DML calls (prefaced by a special character like $, #, etc.) to normal procedure calls in a host language. { The host language compiler then generates the object code. { Some special types of programming languages combine Pascal-like control structures with control structures for the manipulation of a database. { These are sometimes called fourth-generation languages. { They often include features to help generate forms and display data. Sophisticated users interact with the system without writing programs. { They form requests by writing queries in a database query language. { These are submitted to a query processor that breaks a DML statement down into instructions for the database manager module. Specialized users are sophisticated users writing special database application programs. These may be CADD systems, knowledge-based and expert systems, complex data systems (audio/video), etc. Naive users are unsophisticated users who interact with the system by using permanent application programs (e.g. automated teller machine). 1.11 Overall System Structure 1. Database systems are partitioned into modules for di erent functions. Some functions (e.g. le systems) may be provided by the operating system. 2. Components include: File manager manages allocation of disk space and data structures used to represent information on disk. 10 CHAPTER 1. INTRODUCTION application interfaces application program query database scheme DDL compiler query processor DML precompiler application program object code database manager file manager data files data dictionary disk storage programmers naive application users sophisticated users database administrator Figure 1.6: Database system structure. Database manager: The interface between low-level data and application programs and queries. Query processor translates statements in a query language into low-level instructions the database manager understands. (May also attempt to nd an equivalent but more e cient form.) DML precompiler converts DML statements embedded in an application program to normal procedure calls in a host language. The precompiler interacts with the query processor. DDL compiler converts DDL statements to a set of tables containing metadata stored in a data dictionary. In addition, several data structures are required for physical system implementation: Data les: store the database itself. Data dictionary: stores information about the structure of the database. It is used heavily. Great emphasis should be placed on developing a good design and e cient implementation of the dictionary. Indices: provide fast access to data items holding particular values. 3. Figure ?? shows these components