| | |
need help with table design
Please support our Database Design advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Jun 2009
Posts: 2
Reputation:
Solved Threads: 0
I have 2 kinds of units that can be leased, trucks and heavy equipments. Each of them has it's own attributes, so i create 2 tables for them.
Then i have Order_Details table which stores the Order key and the unit key.
I'm confused as how to connect the trucks and heavy equipments table with the Order_Details table. I really want to use one ID for both kinds of units. Or do i need to have two Order_Details tables each for the truck and the heavy equipment? Or maybe there are better solutions?
Thx in advance.
Then i have Order_Details table which stores the Order key and the unit key.
I'm confused as how to connect the trucks and heavy equipments table with the Order_Details table. I really want to use one ID for both kinds of units. Or do i need to have two Order_Details tables each for the truck and the heavy equipment? Or maybe there are better solutions?
Thx in advance.
•
•
Join Date: Mar 2004
Posts: 762
Reputation:
Solved Threads: 38
I would probably create a single table for Units and give a unique ID to each truck and equipment. The ID would be a SKU built from a pre-defined set of rules describing how it's formed. For example, every truck ID would be prefixed with a T, and equipment could all begin with E. This would simplify your orderDetails table because then you could reference a single ID regardless of the type of Unit being leased. I would likely use a separate table then to store Unit attributes.
![]() |
Similar Threads
- Change MS access table design (Visual Basic 4 / 5 / 6)
- rest. menu table design (MS Access and FileMaker Pro)
- need help with table design (Database Design)
- Help on General Best Practices for Table/Database Design (Database Design)
- New Table Design (Database Design)
- database table design problems (Database Design)
Other Threads in the Database Design Forum
- Previous Thread: online room reservation database design
- Next Thread: MySQL on Vista server failed to start
| Thread Tools | Search this Thread |





