12 Apr Admin
Schema
A schema is the complete design of database it is also known as intension. It is the collection of named objects.
Design of a database is called the schema. Schema is of three types: Physical schema, logical schema and view schema.
The database system has various schemata separated according to the levels of abstraction :-
- The physical schema is the lowest level of a schema which describes how the data stored on the disk or the physical storage.
- The logical schema is the intermediate level of a schema which describes the structure of the database to the database designers. It also specifies what relationship exists between the data.
- The external schema or subschema is the highest level of a schema which defines the views for the end users.
Instance
An instance is the information collected in a database at some specific moment, and it is also known as state or extension. It is a snapshot where the current state or occurrence of a database is framed at that moment.
The data stored in database at a particular moment of time is called instance of database. Database schema defines the variable declarations in tables that belong to a particular database; the value of these variables at a moment of time is called the instance of that database.
Schema and instance are somehow related, a schema is the initial state of the database where the database is designed at first. On the other hand, an instance is a state when data is loaded into the database or when any change is acquired by the corresponding database. Schema is the detailed description of the structure of database whereas the information stored at a specific moment in a database is known as an instance.