Database layout

jgc31

Registered User.
Local time
Today, 23:03
Joined
Dec 4, 2004
Messages
78
I have an issue with a database layout and I am not sure which is the best way to proceed.

The problem is in an invoice part of a db . When a service is delivered, say 2 hours of a technicians time, it has to be assigned to a particular tech. No problem when there is only one tech however there could be two or more techs who have helped to supply this particular service and the time ( and income) needs to be divided up between them. However the invoice can only show one item the ie total time taken to deliver the service ( quite likely to be a fixed cost for a particular service ).

Possibilties I have considered are: to have a number of fields in the invoice detail table , one for each tech, however I would have to assume a maximum number of possible techs per job and also there would be a lot of redundant fields and trying to analyse how many hours each has worked would be painful.

Each tech could be assigned a code ( single number or letter ) and these could be stored in a single field . The code would then have to be manipulated to work out how many techs worked on each item and how much each had worked. Again this is rather messy.

I think the ideal would be for each tech to have their own table where each time an service was invoiced which they helped delivered the appropiate percentage is assigned but I cant quite see how to do this.

Any ideas or examples gratefully recieved
 
You need to store each tech's time as a new record in the detail table, not a new column. Then use a totals query to add all the tech lines together for each invoice.
 

Users who are viewing this thread

Back
Top Bottom