Database Schema and Database Instance – Relational Model (Part2)
Database Schema –
- Database Schema is the overall Design of the Database. It is the skeleton structure that represents the logical view of the entire database. It tells how the data is organized and how the relations among them are associated.
- It is sometimes also referred to as an overall model of the data, a conceptual model or a conceptual schema. These terms mean essentially the same thing. The Database Schema also formulates all the constraints that are to be applied on the data.
- A schema is a chart of the types of data that are used. It gives the names of the entities and attributes, and specifies the relation between them. It is just like a framework into which the values of data items can be fitted/stored. All the constraints that are to be applied on the data is also formulated on the schema.
The Database Schema will look like this :
Before describing the Instance of Schema, let us define some terms –
- Database State: Refers to the content of a database at a moment in time.
- Initial Database State: Refers to the database when it is loaded
- Valid State: A state that satisfies the structure and constraints of the database.
Database Instance of Schema –
- The actual content of the database or say the data at a particular instant is called the Instance of Schema.
- Database instances tend to change with time.
- The Database Management software will ensure that the data or instance filled into the database scheme is in a valid state, by checking all the constraints, validations and conditions that the database designers have imposed.
The instance of above Schema will look like this :
A database Schema can be divided into two categories –
- Physical Database Schema :
The Schema which is related to actual storage of data or the Schema that describes database design at physical level is called Physical Database Schema. It defines how the data will be stored in the secondary storage.
- Logical Database Schema :
The schema that defines all the logical constraints that need to be applied on the data stored or the schema that describes the database design at the logical level is called Logical Database Schema. It defines tables, views, and integrity constraints.
A database may also have several schemas at the view level called subschemas, that describe different views of the database.
- A subschema inherits the same property that a schema has and is referred to as a subset of the schema.
- It is the application programmer’s (user’s) view of the data which he or she uses and gives the users a window through which he or she can view only that part of the database which is of interest to him. Therefore, different application programs can have different view of data.
Schema Construct –
A component of the schema or an object within the schema, e.g. PNAME, PRODUCT, PRICE etc.
|Relational Schema||Relational Instance|
|Table Abstraction||Set of tuples|
|Schema is the overall Design of the Database.||The actual content of the database or say the data at a particular instant is called the Instance of Schema.|
|Database Schemas will remain the same.||Database instances tend to change with time.|
|Relational Schema is just like a framework.||When the schema framework is filled in with data item values, it is referred as an instance of the schema.|
Incoming search terms:
- (b) differentiate between schema and instances with the help of an example
- Difference between schema and instance
- difference between schema and instance in tabular form
- difference between database schema and database state
- difference between instance and schema
- difference between database schema and database instance
- difference between instance and schema in dbms
- database instance vs schema
- why database schema called intension
- difference between schema and instance in dbms