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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

table relationship advice...

Status
Not open for further replies.

adsfx

Programmer
Jun 4, 2003
237
GB
hi,
main table is equipment which lists every piece of inventory
from this there are linked tables to user/location/type etc...
I need to store detailed info about each piece of equipment.
For example if the type is a PC a subform would show fields for processor/HDD/memory...
if type is printer the subform would show copycount/lastservice etc...

this info is surely related to the equip_type table
and not the main table?
How do I link equip_type to table that shows fields for individual equip_types?
Making tables for each equip_type is surely not the best option?

any comments would be great for this simple prob?
need more info let me know

Regards Mark
 
Try two new tables:

Table 1:
Equip-Type (FK)
Info-Type

The Info-Type field would contain a value such as "Processor", "HDD", "Memory", etc. This table would identify the detailed information allowed/required for each equipment type.

Table 2:
Equipment-Id (FK to the main equipment table)
Info-Type
Info-Value

The Info-Type field would contain a value such as "Processor", "HDD", "Memory", etc. The Info-Value field would contain the actual value for the specified Info-Type For example, if Info-Type contains the value "Memory" then Info-Value might contain the value "512MB".

You will have to programmatically ensure that the appropriate Info-Type values are used in Table 2 for each piece of equipment.

HTH

Gunny


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top