You are on page 1of 7
DATA-BASE MANAGEMENT SYSTEMS 7 ‘The schema and the subschemas are both used by the data-base management system, the primary function of which is to serve the application programs by executing their data operations. ‘The main events that occur when an application program reads a record ‘by means of a data-base management system are shown in Fig. 7.1. A number of other events also occur, depending on the details of the software, and we will discuss these later. The 11 events below are the essential ones and are numbered in Fig. 7.1 1. Application program A issues a call to the data-base management system to read 2 fecord. The program states the programmer’ name forthe data type and gives the talue ofthe Key f the segment ot recordin question. 2. The data-base management system obtains the subschema (or program data descrip- tion) that is used by appiaton program A and looks up the description ofthe data in question. 3, The database management system obtains the schema (or global log data desrip- tion) and determines which logical datatype or types are needed. 4, The data-base management system examines the physical data-base description and “determines which physical record or records to read 5. The date-bate management system issues a command 10 the computer operating system, instructing it to read the roqusite record(s), 6. The operating system interacts with the physical storage where the data are kept, 7. The required data are transferred between the storage and the system buffers. 8. Comparing the subschema and schema, the dats-base management system derives from the data the logical record needed by the application program. Any data (sta Bese Management Systems 8 declared inthe schema are made by the data-base management system. 9. The data-base management system transfers the data from the system bu ‘work area of application program A. 10, The database management system provides program on the outcome of its call, including 11. The application program can then operate with the If the application program updates a record, the sequence of events is similar. It will normally read it frst, modify it in th york area, and then issue an instruction to the data-base managemen the modified data. The data-base management sy necessary conversions in the system buffers—the converse made when the data were read. The data-base managem issues the appropriate WRITE command to the operating system. { en Tealeaon ‘VIEWS OF A data-base management system will usually be ‘THE SYSTEM, handling multiple data calls concurrently, It must organize its system buffers so that different data ‘operations can be in process together. Multiple application programs may be in operation, and these may use many different subschemas (Fig. 7.2) ‘The system should be organized so that the view of the application programmer is restricted to the application program, its work area, and subschema—the top third of Fig. 7.2. Anything in the bottom two-thirds of Fig. 7.2 should be changeable without changing the application programs or their subschemas, Many systems analysts may be familiar with the schema, but their view should be restricted so that they do not concern themselves with the physical structures, Anything in the bottom third of Fig. 7.2 should ‘crao.7 Date Sate Management Systems 85 be changeable without changing the schema or application-oriented analyst's view. On the other hand, a systems programmer or other s t may be concerned with the physical organization of data. His view may be restricted so that he is unaffected by those changes in the top third of Fig. 7.2-the application programs and subschemas—which do not require a new schema. Figures 7.1 and 7.2 are generic diagrams which could apply to a variety of data-base management systems using widely different techniques for accomplishing the steps described. Some of the systems in use do not distinguish in a clear-cut fashion among the subschema, the schema, and the physical data-base descriptions. Such systems do not achieve full data independence but are often useful for simple or special-purpose data f limited growth potential. ‘Some systems handle data transmissions 2s These are referred to as data-base data communis (See Fig. 73.) ta-base operations. ions (DBDC) systems. 36 Lovet Orgnization Part ADDRESSING The events we have described are complicated by AND SEARCHING the fact that the required record usually cannot be located directly from the key that is provided by program. The record address must be obtained before the tines of the operating system can read or write the record. in which the record might be found are discussed in Part I. In one type of method a calculation is performed to convert the key into the requisite record address. This calculation may be performed by a pro- grammed routine which can be called into use by the data-base management system. In another type of method an index is used. One or more index records must be read or inspected to find the address of the record required by the application program. The program which reads the index records and finds the address may be a part of the operating system. It may be a programmed routine which can be called into use by the data-base management system. (Or it may be a routine written by an application programmer which is called and used by the application programs. Whatever the technique for addressing or locating a record, the program for accomplishing it can be one of three categories, as shown in Fig. 7.4 1, Itmay be a routine called into we by application programs. 2. Kt may be a routine called into use by the database management system. 3. It may be a facility of the operating system commonly called an operating system access method. lication programmer's view be if an operating system access the range of options possible to cases the options offered by the access methods are quite adequate. They may be inadequate, however, where secondary keys are used, inverted lists or inverted files are needed, or some elaborate searching operation is required. In such cases it is desirable that the addressing or searching routines be available to the data-base management system. Jn some cases the data-base management system may have to examine many records before it obtains the one which the application program requested. It will read such records into its system buffers (8 in Fig. 7.1). ‘cmap. 7 ‘at Base Management Systems ‘System balers application program (10 in Fig. 7.1). Physica cove tie descristion

You might also like