H
Harlan
I am creating an equipment tracking db.
Equipment can be checked in and out from the storage location (could be many
times per day/month/year). I want to maintain a historical record of all
uses of this equipment.
What is the best approach (advantages/disadvantages) for the table used to
record the check in and check out dates?
I have the following fields
EquipmentID
DateOut
DateIn
Two thoughts:
When the equipment is returned, search for the record where the DateIn is
null for the respective EquipmentID and fill in that date, thus having only
one record for each use of the equipment. This way, to "see" what equipment
is out, just search for null values in the datein field.
OR
When the equipment is checked out, have one record of it's checkout, and
then one record of it's checkin when returned. This way, to "see" what is
out, need to compare last dateout to last datein fields to see if equipment
is out.
With 4000 pieces of equipment being moved in and out, this table could
become fairly large over time. And will have to be queried constantly by the
other functions of the db.
Equipment can be checked in and out from the storage location (could be many
times per day/month/year). I want to maintain a historical record of all
uses of this equipment.
What is the best approach (advantages/disadvantages) for the table used to
record the check in and check out dates?
I have the following fields
EquipmentID
DateOut
DateIn
Two thoughts:
When the equipment is returned, search for the record where the DateIn is
null for the respective EquipmentID and fill in that date, thus having only
one record for each use of the equipment. This way, to "see" what equipment
is out, just search for null values in the datein field.
OR
When the equipment is checked out, have one record of it's checkout, and
then one record of it's checkin when returned. This way, to "see" what is
out, need to compare last dateout to last datein fields to see if equipment
is out.
With 4000 pieces of equipment being moved in and out, this table could
become fairly large over time. And will have to be queried constantly by the
other functions of the db.