8. Difference Between Schema and Instance

Schema:-

·  Aschema is the design or blueprint of a database.

  • It tells how the data is organized — like table names, column names, data types, and relationships.

🟢 Example:
In a school database, a table called
Students might have:

  • Roll_No (number)
  • Name (text)
  • Class (text)
  • Marks (number)

This structure is the schema — it’s like a plan or layout.

 

Instance:-

·  Aninstance is the actual data stored in the database at a particular moment.

  • It keeps changing as we add, delete, or update data.

🟢 Example:
In the
Students table, these are instances:

Roll_no

Name

Class

Marks

101

Riya

10A

89

102

Aarav

10A

92

🆚 Difference Between Schema and Instance

Feature

Schema (Design)

Instance (Actual Data)

Meaning

Structure or layout of the database

Real data stored in the database

Changes Often?

No — stays mostly the same

Yes — changes when data is updated

Example

Table name, columns, data types

Rows of data inside the table

Like a...

Blueprint of a building

People living in the building