Instance & Schema
| Instance
A collection of data stored in a database at a given time is called an instance. That is, the collection of information from the database at a specific time is called an instance. For example, a record variable (Variable) of a person, whose fields are Name, Address, Date of birth, etc. The Value of that person variable at a particular moment is the instance.
| Schema
The basic structure of a database is called a schema. The database administrator creates the core database schema and defines the various databases used by the database. These are later converted into data definition language by the compiler to be usable. These are stored permanently in the data dictionary; Eg- A house will be built. According to the schema definition, the database administrator's job is to determine what will be in the house and determine how many bedrooms the house will have, whether it will have a kitchen, dining space, etc.
| Schema according to labels
There are different types of schemas in database systems. According to the label it can be divided into three parts, viz
(i) Physical Scheme at the lowest level
(ii) Logical Scheme at Intermediate level
(iii) Subscheme at Highest level.
Physical, Logical & Sub Schema
Physical Data Model: Physical data model is the lowest level to describe database data. Very few physical data models are currently in use. There are two of them
(i) Unifying Model
(ii) Frame Memory Model.
Logical Schema : A logical schema is an intermediate database describing data. User can perform required operations by specifying specific data types with the help of statements in any programming language. At this level, the logical schema of various types of data operations is designed.
Sub Schema: A sub-schema is the highest level of data description. A portion of the database is described here according to the user's needs. The sub-schema is designed according to the user's wishes.
Difference between instance and schema
| instance
(i) The set of data stored in a database on a particular switch is called an instance.
(ii) Databases are always subject to change.
(iii) Values of variables such as name, address etc. are instances.
| schema
(i) The basic structure of database is called schema.
(ii) Database schema cannot always be changed.
(iii) Different structures of database.
Comments
Post a Comment