5.2 Architecture of a Relational Database Management System (RDBMS)

Relational database management systems (RDBMSs) support the standard three-level architecture for databases. As shown in FIGURE 5.1, relational databases provide both logical and physical data independence because they separate the external, logical, and internal levels. The logical level for relational databases consists of base tables that are physically stored. These tables are created by the database administrator (DBA) using a CREATE TABLE command, as described in Section 5.3. A base table can have any number of indexes, either created by the system itself or created by the DBA using the CREATE INDEX command. An index is used to speed up retrieval of records based on the values in one or more columns.

A diagram illustrating 3 level architecture for relational databases. Two horizontal lines divide the diagram into 3 parts. The first horizontal line corresponds to Logical data independence. The second horizontal line corresponds to Physical data independence. The blocks above the first horizontal line correspond to external level. The blocks between the 2 horizontal levels corresponds to Logical level. The blocks below the second horizontal line corresponds to Internal level. The blocks in the External level are Users and Views. The users range from User 1, User 2, User 3, and so on till User n. The views range from View A, View B, View C and so on till View K. 2 arrows run from User 1 to View A and View B. An arrow runs from User 2 to View B. 3 arrows run from User 3 to View B, View C, and V K. 2 arrows run from User n to View C and View K. The blocks in the logical level are base tables and their corresponding indexes. The blocks range from Base table 1 plus indexes, Base table 2 plus indexes, Base table 3 plus indexes, and so on till Base table m plus indexes. An arrow runs from View A to Base table 1 plus indexes. 2 arrows run from View B to Base table 1 plus indexes and Base table 2 plus indexes. 2 arrows runs from View C to Base table 2 plus indexes and Base table 3 plus indexes. An arrow runs from View K to Base table m plus indexes. An arrow runs from User 1 to Base table 1 plus indexes. An arrow runs from User 3 to Base table 2 plus indexes. The blocks in the internal level are files and they range from File 1, File 2, and so on till File p. An arrow runs from Base table 1 plus indexes to File 1. An arrow runs from Base table 2 plus indexes to File 1. An arrow runs from Base table 3 plus indexes to File 2. An arrow runs from Base table m plus indexes to File p.

FIGURE 5.1 Three-Level Architecture for Relational Databases

On the internal level, the base tables and their indexes are represented in files. The physical representation of the tables may not correspond exactly to our notion of a base table as a two-dimensional object consisting of rows and columns like a spreadsheet. However, the rows of the table do correspond to physically stored records, although their order and other details of storage may be different from our concept of a table. The DBMS, not the operating system, controls the internal structure of both the data files and the indexes.

Once the base tables have been created, the DBA can create views for users, using the CREATE VIEW command, described in Section 5.5. Relational views are virtual tables, not permanently stored but created when the user needs to access them. Users are unaware of the fact that their views are not physically stored in table form. In a relational system, the word view means a single virtual table, as seen by a user. This is not the same as the term external view, which means the database as it appears to a particular user. In our terminology, an external view may consist of several base tables and/or views.

One of the most useful features of a relational database is that it permits dynamic database definition. The DBA, and users he or she authorizes to do so, can create new tables, add columns to old ones, create new indexes, define views, and drop any of these objects at any time. The flexibility of relational databases encourages users to experiment with various structures and allows the system to be modified to meet their changing needs. This enables the DBA to ensure that the database is a useful model of the enterprise throughout its life cycle.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.129.211.165