disjoint and overlapping design constraints
Asked Answered
M

6

21

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!

Methodius answered 12/11, 2013 at 4:40 Comment(0)
C
23

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.

Coalition answered 2/11, 2014 at 0:46 Comment(0)
J
15

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.

Jigsaw answered 22/4, 2017 at 10:56 Comment(0)
F
10

The disjoint rule states an entity instance of a supertype can only be a member of one subtype. The overlap rule states an entity instance of a supertype can be a member of multiple subtypes.

Example of disjoint rule: Instance of Super-type Animal can only be member of exactly one of these Sub-types being Panda, Cheetah and Dog Disjoint Union , (An animal can either be Panda or be Dog or be Cheetah but can't be any two or more at the same time)

Example of overlap rule: Instance of Super-type Person can be member of multiple Sub-types being Woman, Driver and Engineer Overlapping Union , (A person can be a Woman and that same Woman can be Driver and that same Woman can be Engineer at the same time)

Forwardness answered 11/11, 2016 at 3:33 Comment(2)
An example would help the OP, are you able to update your answer?Sexagesima
Should give an example. Otherwise this is the same language as any bookJigsaw
A
1

Let's simplify this confusing concept. First of all, understand that there is a discriminator between subtype and supertype. If the value of a discriminator is not null and appears in supertype entity instance then that must be linked with the only one subtype. This is called disjoint constraint.

For example, you say in school a person can be teacher and student but a teacher can't be a student and vice versa. Then in person supertype and (student, teacher) subtype exists a discriminator called person_type. If person_type in person entity is 't' then it is linked with teacher subtype only not with a student. Similarly, we can write it for the student.

Now, in overlapping constraint, the supertype entity instance can appear in many subtype instance.

In overlapping example consider a teacher can be a student also. Then 't' can be linked with student and teacher subtype entity.

Atomicity answered 12/10, 2017 at 21:40 Comment(0)
C
0

suppose Member is super class and its two sub-classes one is student and 2nd one is faculty,if(Member) of subclass(student or faculty)not both then it is disjoint. if member both of its subclass then it non-disjoint or overlapping.

.

Cockscomb answered 26/11, 2017 at 11:30 Comment(0)
E
0

Lets imagine students class(that means Super class) and imagine they have Undergraduate and Postgraduate students.This is exactly disjoint.Because the student became as a post graduate after an undergraduate.(the fields of the table undergraduate and post graduate must have seperated values )

Like wise the overallping means that the the sub class constaraints in both sub classes.

Etra answered 31/7 at 9:43 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.