Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

disjoint and overlapping design constraints

Tags:

database

I'm really confused on the difference between disjoint and overlapping design constraints in relational databases. I've looked around, but have had a hard time finding an understandable example. Could someone please explain this to me via an example?

Thanks!

like image 993
FinalJon Avatar asked Nov 12 '13 04:11

FinalJon


People also ask

What is difference between disjoint and overlapping?

Disjoint events, or mutually exclusive events, are events that have no outcomes in common. Overlapping events are events that have one or more outcomes in common.

What is overlapping constraints in DBMS?

Two or more instances of the super class are participating in two or more sub classes then it is called overlapping constraints.

What are the two constraints on specialization generalization?

There are three constraints that may apply to a specialization/generalization: membership constraints, disjoint constraints and completeness constraints.

What is a disjoint database?

In a disjoint specialization, also called an exclusive specialization, an individual of the parent class may be a member of only one specialized subclass. In an overlapping specialization, an individual of of the parent class may be a member of more than one of the specialized subclasses.


2 Answers

Say you have a super class 'musician' then two sub classes 'singer' and 'guitar player'.

In a disjoint constraint you would have to put the musician in either one or the other sub classes. In an overlapping constraint the musician can be put in both.

like image 172
Justin R Roberts Avatar answered Sep 22 '22 15:09

Justin R Roberts


Let's say you have a super class 'account' with sub classes 'Savings Account' and 'Current Account'. This is a disjoint constraint situation because a bank account can either be Savings or Current. It cant be both at the same time.

For an overlapping constraint situation, let's say we have a super class 'Person' and subclasses 'Customer' and 'Employee'. In this case, a person can be Customer and Employee both. Therefore, overlapping.

like image 25
pblead26 Avatar answered Sep 21 '22 15:09

pblead26