Home »
DBMS
Instances and Schemas in DBMS
In this tutorial, we will learn about the instances and schemas of database management systems (DBMS).
By Anushree Goswami Last updated : May 26, 2023
What is an instance?
Instance as an occurrence of something at a particular moment of time. In Database Management system, there are a lot of changes occurring over time to the information rapidly within the moments as the data get inserted, manipulated and deleted in parallel. The collection of information stored in the database at a particular moment is called an instance of the database.
What is Schema?
In the database management system, the overall design of the database is called the database schema. Schema gets changed rarely, and if so, changes altogether. A database schema corresponds to the variable declarations together with associated type definitions in a program.
At any given instant, each variable has a particular value and the values of the variables in a program at a point in time correspond to an instance of a database schema.
To understand the concept of database schemas and instances, we can do it through the analogy to a program written in a programming language.
Types of database schemas
There are several schemas in a Database system that is partitioned depending on the levels of abstraction:
- Physical Schema: The physical schema describes the database design at the physical level.
- Logical Schema: The logical schema describes the database design at the logical level.
Image source: https://sites.google.com/site/pnusicte11/lesson-2
The physical schema is hidden beneath the logical schema, and it can be changed easily without affecting the application programs.
If the application programs are not dependent on the physical schema then they are said to display physical data independence, and so if the physical schema got to change in any case then, the application programs are needed to be rewritten.
Including these, in a database, there are several schemas present at the view level and called subschemas that describe different views of the database.
By far, the logical schema is the most important among all schemas due to its tremendous effect on application programs, as the programmers construct applications by using the logical schema.