The different types which we need to consider while designing generalization and specialization in the Database Management System (DBMS) are as follows −
Let us now understand them one by one.
Create one database, and keep conditions on one attribute for example attendance. This type of constraint is defined on a single attribute which is further dividing an entity into two sub entity sets which will give information for the given attribute.
Given below is an example of the conditional definition database −
This refers to specifying conditions on more than one attribute.
Consider a database for the marks and attendance.
This type of constraint is defined on two or more attributes for the given entity which is further divided into subclass entities.
Here the condition can be specified on more than two attributes.
For example, Account types------ savings and current.
For savings and current accounts, we can perform balance, withdrawal, deposit same but type is different.
In this constraint the decision is left to the super class that how many instances of the super class will be participating in the sub class.
In the above example Team leader decides which team will join according to skills.
Disjoint is nothing but intersection, the number of instances specified for the given superclass can participate in only one of the sub classes.
Account users can participate in saving account and current account but both are different so, it can be participated one at a time.
It is just like a minus, as shown below −
Two or more instances of the super class are participating in two or more sub classes then it is called overlapping constraints.
A person who knows Java and PHP can participate in both teams.
Every instance participates in a relationship. All the instances of the superclass must participate in a relationship or into the sub class.