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.
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.
3.129.211.165