Difference between Schema and Instance in DBMS (original) (raw)

Last Updated : 17 Jul, 2025

In a Database Management System (DBMS), two main terms that define the structure and content of a database are Schema and Instance. The schema refers to the overall design or blueprint of the database, describing its structure (like tables, columns and relationships). It remains relatively stable over time. On the other hand, an instance represents the actual data within the database at any particular moment, which can change frequently as the database is updated.

What is Schema?

A schema in DBMS refers to the overall design or blueprint of a database. It describes how the data will be organized, how the relationships between different entities will be maintained and how constraints will be applied. Schemas are important to defining the structure of the database and once defined, they remain relatively stable over time.

schema_2

Database Schema

Key Characteristics

Types of Schema:

  1. **Logical Schema: Describes the logical structure, such as tables, columns, data types and relationships.
  2. **Physical Schema: Details how the data is stored physically on hardware (e.g., file paths, indexing).
  3. **View Schema: Defines how data is presented to end-users, possibly as a subset or a formatted view.

Example: Let's say a table teacher in our database named school, the teacher table requires the name, dob and doj in their table so we design a structure as:

Teacher (
name VARCHAR,
dob DATE,
doj DATE)

Advantages of Schema

Disadvantages of Schema

What is Instance?

An instance of DBMS refers to real data present in a database at some particular point in time. It refers to the content in the database in as much as it refers to the structure defined under a particular schema at a given point.

Instance_example

Database Instance

Key Characteristics

Example: Let say a table teacher in our database whose name is School, suppose the table has 50 records so the instance of the database has 50 records for now and tomorrow we are going to add another fifty records so tomorrow the instance has a total of 100 records. This is called an instance.

Advantages of Instance

Disadvantages of Instance

Difference Between Schema and Instance

Schema Instance
It is the overall description of the database. It is the collection of information stored in a database at a particular moment.
The schema is same for the whole database. Data in instances can be changed using addition, deletion and updation.
Does not change Frequently. Changes Frequently.
Defines the basic structure of the database i.e. how the data will be stored in the database. It is the set of Information stored at a particular time.
Affects the entire database structure. Affects only the current state of data.
Requires significant effort and planning to change. Easily altered by performing CRUD (Create, Read, Update, Delete) operations.
Table structures, relationships, constraints. Data entries, records in tables.