Describe the structure of the ANSI/SPARC three-schema architecture. Compare this structure with that of the two-schema architecture inherent in a file-processing system?
The ANSI/SPARC three-schema architecture consists of three perspectives of metadata in a database: the external schema, the conceptual schema, and the internal schema. The external schema consists of a number of user views or subschemas – each describing portions of the database of interest to a particular user or group of users. The conceptual schema is located between the external schema and the internal schema and represents the global conceptual view of the structure of the entire database for the community of users. In other words, the conceptual schema is the consolidation of user views. The internal schema describes the physical structure of the stored data and the mechanism used to access the data. On the other hand, a two-schema architecture consists of just the internal schema and the external schema. In the absence of a conceptual schema, the internal schema structures must be mapped directly to the external schema. As a result, changes in the internal schema requiring appropriate changes in the external schema result in the loss of data independence.