Sr No. | Intension Database | Extension Database |
1. | .The intension corresponds to what is specified in the relational schema. The intension thus defines all permissible extensions. | The extension of a given relation is the set of tuples appearing in that relationship at any given instance |
2. | The intension of a given relation is independent of time. It is the permanent part of the relationship. | The intension of a given relation is independent of time. It is the permanent part of the relationship. |
3. | The intension is a combination of two things: a structure and a set of integrity constraints. | It changes as tuples are created, destroyed, and updated. |
Example of Intension Database
Employee (Reg No.(5) Not NULL, Name Char(20), Age Number (2), Company Char(20))
This is the intension of employee relation.
Example of Extension Database
Relation: Extension of employees at time t1 when 2 tuples are added-
Reg No. | Name | Age | Company |
22501 | Sonakshi Sahni | 27 | Yagesh Export Ltd. |
22502 | Sneha Sarin | 30 | Smile Crafters Dental Cooperates |
Relation: Extension of employees at time t2 when 2 more tuples are added and one is updated-
Reg No. | Name | Age | Company |
22501 | Sonakshi Sahni | 27 | Yagesh Export Ltd. |
22502 | Sneha Arora | 30 | Smile Crafters Dental Cooperates |
22504 | Rajat Mishra | 29 | RTF Bank |
22509 | Varun Kakkar | 24 | HSM Management |