User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Database Design section within the Web Development category of DaniWeb, a massive community of 391,564 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,613 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Database Design advertiser:
Views: 387 | Replies: 0
Reply
Join Date: Jun 2008
Posts: 8
Reputation: motofoto is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
motofoto motofoto is offline Offline
Newbie Poster

Inheritance Implementation (This does not ensure integrity )

  #1  
Jul 9th, 2008
Hi

I have a problem with inheritance (Generalization / Specialization). As far as I understand, you can implement inheritance in Relational Data-Base by (zero or one) to one relation, so how to make sure that Lecturer and Student are not the same Person, giving that Lecturer and Student are generalized by Person.

Student
PersonID ..PK,FK
Grade

Lecturer
PersonID ..PK,FK
Salary

Now mistakenly you can give Lecturer and Student the same PersonID.

if this is a common case, and there is no (design way) to prevent this in RDB. How do I prevent this case by triggers, how to use triggers to avoid insertion in one table if it is exist in another, I think it will be efficient only if PersonID is indexed.

Thanks
Last edited by motofoto : Jul 9th, 2008 at 3:54 am.
AddThis Social Bookmark Button
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb Database Design Marketplace
Thread Tools Display Modes

Other Threads in the Database Design Forum

All times are GMT -4. The time now is 10:06 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC