2.1.2 Schemas, Instances, and Database StateIn any data model, it is important to distinguish between the description of the data-base and the database itself. The description of a database is called the databaseschema, which is specified during database design and is not expected to changefrequently.6 Most data models have certain conventions for displaying schemas asdiagrams. 7 A displayed schema is called a schema diagram. Figure 2.1 shows aschema diagram for the database shown in Figure 1.2; the diagram displays thestructure of each record type but not the actual instances of records. We call eachobject in the schema—such as STUDENT or COURSE—a schema construct.A schema diagram displays only some aspects of a schema, such as the names ofrecord types and data items, and some types of constraints. Other aspects are notspecified in the schema diagram; for example, Figure 2.1 shows neither the data typeof each data item, nor the relationships among the various files. Many types of con-straints are not represented in schema diagrams. A constraint such as studentsmajoring in computer science must take CS1310 before the end of their sophomore yearis quite difficult to represent diagrammatically.The actual data in a database may change quite frequently. For example, the data-base shown in Figure 1.2 changes every time we add a new student or enter a newgrade. The data in the database at a particular moment in time is called a databasestate or snapshot. It is also called the current set of occurrences or instances in theSection_identifier SemesterCourse_number InstructorYearSECTIONCourse_name Course_number Credit_hours DepartmentCOURSEName Student_number Class MajorSTUDENTCourse_number Prerequisite_numberPREREQUISITEStudent_number GradeSection_identifierGRADE_REPORTFigure 2.1Schema diagram for thedatabase in Figure 1.2.6Schema changes are usually needed as the requirements of the database applications change. Newerdatabase systems include operations for allowing schema changes, although the schema changeprocess is more involved than simple database updates.7It is customary in database parlance to useschemas as the plural forschema, even thoughschemata isthe proper plural form. The wordscheme is also sometimes used to refer to a schema.2.2 Three-Schema Architecture and Data Independence 33database. In a given database state, each schema construct has its own current set ofinstances; for example, the STUDENT construct will contain the set of individualstudent entities (records) as its instances. Many database states can be constructedto correspond to a particular database schema. Every time we insert or delete arecord or change the value of a data item in a record, we change one state of thedatabase into another state.The distinction between database schema and database state is very important.When we define a new database, we specify its database schema only to the DBMS.At this point, the corresponding database state is the empty state with no data. Weget the initial state of the database when the database is first populated or loadedwith the initial data. From then on, every time an update operation is applied to thedatabase, we get another database state. At any point in time, the database has acurrent state. 8 The DBMS is partly responsible for ensuring that every state of thedatabase is a valid state—that is, a state that satisfies the structure and constraintsspecified in the schema. Hence, specifying a correct schema to the DBMS isextremely important and the schema must be designed with utmost care. TheDBMS stores the descriptions of the schema constructs and constraints—also calledthe meta-data—in the DBMS catalog so that DBMS software can refer to theschema whenever it needs to. The schema is sometimes called the intension, and adatabase state is called an extension of the schema.Although, as mentioned earlier, the schema is not supposed to change frequently, itis not uncommon that changes occasionally need to be applied to the schema as theapplication requirements change. For example, we may decide that another dataitem needs to be stored for each record in a file, such as adding the Date_of_birth tothe STUDENT schema in Figure 2.1. This is known as schema evolution. Most mod-ern DBMSs include some operations for schema evolution that can be applied whilethe database is operational.2.2 Three-Schema Architectureand Data IndependenceThree of the four important characteristics of the database approach, listed inSection 1.3, are (1) use of a catalog to store the database description (schema) so asto make it self-describing, (2) insulation of programs and data (program-data andprogram-operation independence), and (3) support of multiple user views. In thissection we specify an architecture for database systems, called the three-schemaarchitecture,9 that was proposed to help achieve and visualize these characteristics.Then we discuss the concept of data independence further.8The current state is also called thecurrent snapshot of the database. It has also been called adatabaseinstance, but we prefer to use the terminstance to refer to individual records.9This is also known as the ANSI/SPARC architecture, after the committee that proposed it (Tsichritzis
Question
2.1.2 Schemas, Instances, and Database StateIn any data model, it is important to distinguish between the description of the data-base and the database itself. The description of a database is called the databaseschema, which is specified during database design and is not expected to changefrequently.6 Most data models have certain conventions for displaying schemas asdiagrams. 7 A displayed schema is called a schema diagram. Figure 2.1 shows aschema diagram for the database shown in Figure 1.2; the diagram displays thestructure of each record type but not the actual instances of records. We call eachobject in the schema—such as STUDENT or COURSE—a schema construct.A schema diagram displays only some aspects of a schema, such as the names ofrecord types and data items, and some types of constraints. Other aspects are notspecified in the schema diagram; for example, Figure 2.1 shows neither the data typeof each data item, nor the relationships among the various files. Many types of con-straints are not represented in schema diagrams. A constraint such as studentsmajoring in computer science must take CS1310 before the end of their sophomore yearis quite difficult to represent diagrammatically.The actual data in a database may change quite frequently. For example, the data-base shown in Figure 1.2 changes every time we add a new student or enter a newgrade. The data in the database at a particular moment in time is called a databasestate or snapshot. It is also called the current set of occurrences or instances in theSection_identifier SemesterCourse_number InstructorYearSECTIONCourse_name Course_number Credit_hours DepartmentCOURSEName Student_number Class MajorSTUDENTCourse_number Prerequisite_numberPREREQUISITEStudent_number GradeSection_identifierGRADE_REPORTFigure 2.1Schema diagram for thedatabase in Figure 1.2.6Schema changes are usually needed as the requirements of the database applications change. Newerdatabase systems include operations for allowing schema changes, although the schema changeprocess is more involved than simple database updates.7It is customary in database parlance to useschemas as the plural forschema, even thoughschemata isthe proper plural form. The wordscheme is also sometimes used to refer to a schema.2.2 Three-Schema Architecture and Data Independence 33database. In a given database state, each schema construct has its own current set ofinstances; for example, the STUDENT construct will contain the set of individualstudent entities (records) as its instances. Many database states can be constructedto correspond to a particular database schema. Every time we insert or delete arecord or change the value of a data item in a record, we change one state of thedatabase into another state.The distinction between database schema and database state is very important.When we define a new database, we specify its database schema only to the DBMS.At this point, the corresponding database state is the empty state with no data. Weget the initial state of the database when the database is first populated or loadedwith the initial data. From then on, every time an update operation is applied to thedatabase, we get another database state. At any point in time, the database has acurrent state. 8 The DBMS is partly responsible for ensuring that every state of thedatabase is a valid state—that is, a state that satisfies the structure and constraintsspecified in the schema. Hence, specifying a correct schema to the DBMS isextremely important and the schema must be designed with utmost care. TheDBMS stores the descriptions of the schema constructs and constraints—also calledthe meta-data—in the DBMS catalog so that DBMS software can refer to theschema whenever it needs to. The schema is sometimes called the intension, and adatabase state is called an extension of the schema.Although, as mentioned earlier, the schema is not supposed to change frequently, itis not uncommon that changes occasionally need to be applied to the schema as theapplication requirements change. For example, we may decide that another dataitem needs to be stored for each record in a file, such as adding the Date_of_birth tothe STUDENT schema in Figure 2.1. This is known as schema evolution. Most mod-ern DBMSs include some operations for schema evolution that can be applied whilethe database is operational.2.2 Three-Schema Architectureand Data IndependenceThree of the four important characteristics of the database approach, listed inSection 1.3, are (1) use of a catalog to store the database description (schema) so asto make it self-describing, (2) insulation of programs and data (program-data andprogram-operation independence), and (3) support of multiple user views. In thissection we specify an architecture for database systems, called the three-schemaarchitecture,9 that was proposed to help achieve and visualize these characteristics.Then we discuss the concept of data independence further.8The current state is also called thecurrent snapshot of the database. It has also been called adatabaseinstance, but we prefer to use the terminstance to refer to individual records.9This is also known as the ANSI/SPARC architecture, after the committee that proposed it (Tsichritzis
Solution
The text discusses the concepts of schemas, instances, and database state in a data model. It explains that the description of a database is called the database schema, which is specified during database design and is not expected to change frequently. A schema diagram displays the structure of each record type in the database but not the actual instances of records. The actual data in a database, which can change frequently, is called a database state or snapshot.
Schema changes may be needed as the requirements of the database applications change. Newer database systems include operations for allowing schema changes, although the process is more involved than simple database updates.
The distinction between database schema and database state is important. When a new database is defined, only the database schema is specified to the DBMS. The initial state of the database is empty, and it gets populated with data to create the initial state. Every time an update operation is applied to the database, a new database state is created. The DBMS ensures that every state of the database is valid according to the schema.
The schema is stored in the DBMS catalog as metadata, and the database state is called an extension of the schema. Although the schema is not supposed to change frequently, occasional changes may be needed as application requirements change. This is known as schema evolution, and modern DBMSs include operations for schema evolution.
The text also introduces the concept of the three-schema architecture, which is an architecture for database systems that helps achieve characteristics such as self-describing databases, program-data independence, and support for multiple user views. Finally, the concept of data independence is discussed further.
Similar Questions
Data schemas represent the skeleton structure of a database. They represent the ___ of the database as a whole.a.Physical Viewb.Semantic Viewc.Logical Viewd.Analytical View
Database Schema is the ________ design of the database.OptionsRelationLogicalPhysicalInstance
Which database uses a predefined schema to determine the structure of data?Review LaterSQL databaseNoSQL databaseRelational databaseDocument-oriented database
When designing a relational database, database administrators are using instructions or rather commands to modify the relational database. These instructions are referred to as the _______? A. database schema B. data modeling system C. database dictionary D. Data Definition Language
Database __________ , which is the logical design of the database, and the database _______,which is a snapshot of the data in the database at a given instant in time.OptionsInstance, SchemaRelation, SchemaRelation, DomainSchema, Instance
Upgrade your grade with Knowee
Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.