K
Keith Christmas
I have fully normalised a data model for an Employment Agency database which
I would now like to implement using Access 2000 (which I am not that
familiar with).
Within the logical data structure I have two tables; "Order" (Primary Key =
Order Nbr) and Order Line (PK = Order Nbr & Line Nbr). Each day there are
possibly 500 orders each with an average of 5.
Each Order Line represents the Temp whose service is required at a specific
Date and Time (These date/times are usually 1 to 5 days after the order is
placed). The Temp Nbr is stored on the Order Line and acts as a foreign key
to the 'Temp' table.
My requirement is to search the database and find a Temp that has not been
assigned a job on that day, so...
Option a)
Attach an index on the Order Line record assigned to the 'Temp Nbr' foreign
key and to the Date Required attribute and then create a query that searches
each Order Line looking for Temps that have NOT been assigned to an order on
that date by checking for Null values.
I have a nasty feeling that this option will need to check EVERY order line
on EVERY ORDER that has been placed for a future date in order to determine
if the requested Temp is available or not on that specific date.
or
Option b)
Create separate entity (called Booking Detail for sake of argument) with
Temp Nbr and Booked Date as the PK. This table will be written to each time
a Temp is assigned to an order line. Now all I need to do to determine if
the Temp is free is access the Booking Detail record. If an error occurs
(i.e. record not found) then I know that the Temp is free and I haven't had
to trawl through all the Order Lines.
or
Option c)
something else???
Any expert guidance into the most efficient method of doing this would be
very welcome,
I hope I've made this clear, and I hope this is the correct news group to
post such a question.
TIA,
Keith Christmas
I would now like to implement using Access 2000 (which I am not that
familiar with).
Within the logical data structure I have two tables; "Order" (Primary Key =
Order Nbr) and Order Line (PK = Order Nbr & Line Nbr). Each day there are
possibly 500 orders each with an average of 5.
Each Order Line represents the Temp whose service is required at a specific
Date and Time (These date/times are usually 1 to 5 days after the order is
placed). The Temp Nbr is stored on the Order Line and acts as a foreign key
to the 'Temp' table.
My requirement is to search the database and find a Temp that has not been
assigned a job on that day, so...
Option a)
Attach an index on the Order Line record assigned to the 'Temp Nbr' foreign
key and to the Date Required attribute and then create a query that searches
each Order Line looking for Temps that have NOT been assigned to an order on
that date by checking for Null values.
I have a nasty feeling that this option will need to check EVERY order line
on EVERY ORDER that has been placed for a future date in order to determine
if the requested Temp is available or not on that specific date.
or
Option b)
Create separate entity (called Booking Detail for sake of argument) with
Temp Nbr and Booked Date as the PK. This table will be written to each time
a Temp is assigned to an order line. Now all I need to do to determine if
the Temp is free is access the Booking Detail record. If an error occurs
(i.e. record not found) then I know that the Temp is free and I haven't had
to trawl through all the Order Lines.
or
Option c)
something else???
Any expert guidance into the most efficient method of doing this would be
very welcome,
I hope I've made this clear, and I hope this is the correct news group to
post such a question.
TIA,
Keith Christmas