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

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

What is EERM

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.