Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Generalization/Specialization design

Status
Not open for further replies.

p27br

Programmer
Aug 13, 2001
516
GB
Hi,

I am stuck in my db design : I am designing an application for managing our deliverables production.
a client can receive several types of deliverables but these deliverables types can have different attributes, some of these are mandatory attributes for one type but not for another. So all in the same table is a problem.
I was thinking of subclassing the deliverables types into different tables maybe.
how should i best do this ?

thanks
 
One way would be to have your main Deliverable table, including any fields that are common to all types of deliverable.

Then have a DeliverableAttribute table something like this:

DeliverableAttribute
AttributeID (PK)
DeliverableID (FK to Deliverable)
Name
Value

Might not be the best method, depending on your specific requirements, but it's one option!

--James
 
i want to be able to pull out all deliverables for one client regardless of their type
i want to be able to input a new deliverable on a single form. Maybe a combobox 'Deliverable type' which selects which attributes will be editable on the form.
 
Depending on the number of attributes that will differ between deliverable types it may be easier just to have all the possible attributes as columns in one table and only fill in the ones that relate to the current row. I know this goes against correct normalisation rules but it would probably make querying/updating the tables much easier.

--James
 
yes that's what i have done for the moment , but i was thinking maybe there was a better way

thanks anyway
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top