Hello everyone. I'm a relative novice when it comes to databases and am having trouble designing a particular part of a database which I'll now describe.
Basically I'm storing information on equipment which is hired out. It comes in three broad categories:
Personnel ( Electricians, plumbers etc )
Plant ( Things like generators, cement mixers etc )
Vehicles
The system using the database needs to be able to access any item with a unique id so I've also created three tables and a crude sort of lookup table.
personnel ( id*, created, modified, description, cost_per_hour, ... )
plant ( id*, created, modified, description, on_hire, date_of_purchase, ... )
vehicle ( id*, created, modified, description, on_hire, date_of_purchase, ... )
lookup ( id, type )
The tables all share a common sequence for id generation
To find what I need I initially do a lookup on this lookup table and then query the relevant table based on the type. This setup was working ok until I needed to create reports and it seems it's grossly inadequate for that. At present the only workable solution I can think of is to combine them all into one big table which just doesn't seem right to me.
Basically then I'm hoping someone with more experience than me can suggest a better design. I'm reading up on databases as fast as I can but I'm under pressure to get this working so any help would be very much appreciated!
If I've left anything out please just ask and I'll get back asap.
Thanks in advance...