0

Hi

I have Client, Owner, and Staff entity, they all are persones!! with additional criteria...

Client
ID, FName, MName, LName

Owner
ID, FName, MName, LName

Staff
ID, FName, MName, LName

so Is there a concept of inheritance in RDBMS like SQL-Server-2005
if so how can I implement it.

At lease I will create a new Table called Person which include those attributes and create a 1-1 relationship between Person and those tables...what do you think.. Is that better or just complexing the design and why??

Thanks

2
Contributors
2
Replies
3
Views
9 Years
Discussion Span
Last Post by motofoto
0

Hi motofoto

There is kind of inheritance - in EERM - where we have Generalization / Specialization, such called isa-relationships. Maybe you should first design an EERM. Your implementation idea of isa-relationships is correct, generic data might be collected in a person entity (table), specialized data in additional entities (tables, if you map EERM into relational model). Also there are one-to-one relationships between generic entity and specialized entities.

There is no other way to map isa-relationships from EERM into relational model (RM) then yours till this day. Though the latest SQL standard from 2003 has got a little OOP ideas added but it is far from classical OOP inheritance.

One cannot say that your approach would put more complexity into your design. Sure, because of one-to-one relationship you can merge generic and specialized entities into one one, where you would get three independent entities (tables) Client, Owner, Staff. But if the sketched problem is your assignment, probably your prof expects an isa-relationship solution of the problem.

krs,
tesu

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.