A schema is a formulation of the scheme in the language interface offered by a DBMS. As a result of this formulation not only the scheme, and therefore the conceptual schema can be represented in the computer but guidelines for creating and maintaining a conceptual data base are also laid down. In order to be able to do both the things, the schema is being defined in two parts. They are
- A Logical schema
- A Physical Schema
The logical schema is concerned with exploiting the data structures offered by a DBMS in order to make the scheme understandable to a computer. The physical schema, on the other hand, deals with the manner in which the conceptual database shall get represented in the computer as a stored database.
In order to make the specification of both the logical and the physical schema easy for the DBA, data base management system provide two languages, called Data Definition Language (DDL) and the Data Storage Description Language (DSDL). It gives facilities for controlling the manner in which the data structure gets represented in the computer. This involves, among others, allocation of storage space, selection of access methods and a specification of the manner in which different objects which enter into a relationship with each other are linked together. The efficiency has to be considered both from the point of view of space as well as of time.
After the logical and physical schema have been processed by the respective language translators, a null database is created in the computer. This means that a data base with no data in it is created. Therefore, the database corresponding to the conceptual database loaded in the computer. This database can then be operated up on to reflect any changes that may occur in the conceptual database.
A conceptual schema is normally split up into a number of external schemas and it is through these that users view the real world. Consequently, a means must be provided to capture the notion of an external in the DBMS. In DBMS terms, this is achieved by the notion of a subschema. The subschema is subset of the schema.
The subschema inherits the same property that an external schema has. It gives to a user a window through which he can view only that part of the database which is of interest to him. This property which it inherits from the external schema, a subschema has a number of other good qualities. It can act as a unit for enforcing controlled access to a database. Further, the subschema can made the basis for controlling concurrent operation on the data base. A language called the Subschema Definition Language (SDL) is used to specify a subschema. The nature of this language depends up on the data structure on which a DBMS is based and also up on the host language, if any, within which DBMS facilities are used.