Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

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. Each time when the data is inserted or deleted from the database changes the state of the database
that is the reason why an instance of the database changes very often.
Example:Imagine a database with EMPLOYEE and DEPARTMENT tables. Each of the table will have their
own set of records. As there is addition of new employee, new employee record will be inserted into the table.
When an employee moves out from the department his records will be updated or deleted.

Similarly, if there are any changes to the department, the respective details will be modified or deleted. Any
new department details will be added to the DEPARTMENT table.

Any point in time, there is a continuous change to the records in the database objects. There will be either
increase or decrease in the number of records or there will be changes in the existing data. Any particular point
in time, there would be one particular set of records exists in each of the objects, satisfying all the conditions
of a database.

This is called an instance of a database. i.e.; at any particular point in time, what is the state of database with
data values in its object is called database instance. It changes from time to time.

Look at below snapshot of the database objects. It has EMPLOYEE and DEPARTMENT tables with their
own set of data. It shows different values of object at different time. Each set of EMPLOYEE-DEPARTMENT
data set represents instances of the database. Below are 3 instances of the database.

Key Differences Between Schema and Instance

1. schema is the design representation of a database whereas instance is the snapshot of a database at a
particular moment.
2. Instance changes very frequently, whenever data is removed or added in the database. As against, the
changes in schema occurs rarely.
3. For example, schema and instance can be easily perceived by analogy to a program. At the time of
writing a program in a programming language, the variables of that program is declared at first, this is
analogous to the schema definition. Additionally, each variable in a program must have some values
associated at a particular time; this is similar to an instance.

You might also like