Jump to content

[SOLVED] Supertype/Subtype relationship - disjointness constraint?


dbo

Recommended Posts

I've got a weird situation and I'm drawing a blank on the exact term. I think that it's called disjointness constraint (an entity can be a member of at most one of the subclasses of the specialization). I'll explain the situation and you can tell me what it's called if that's not correct :P

 

I think the easiest way to explain this is using an example. Assume that you have a generic EQUIPMENT table (parent). This just holds high level data on the equipment. A piece of equipment can be a BOAT (child), a CAR (child), or a TANK (child), but can never be more than one of these. This makes perfect sense in relational database theory... I'm unsure how to implement it in practice.

 

Question 1 - What the heck is this constraint called?

Question 2 - Is there a way to enforce this kind of relationship at the data model level or only via an application?

Link to comment
Share on other sites

I guess technically you could add a trigger to enforce it. It's one of those things in relational database theory that sounds good and makes sense... I've just never tried to put it into practice until now. I hate to have to rely on the application to maintain the data's integrity. I think it should be done at each level just like security.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.