I'm in the early design stage for a small inventory-tracking application. I know there's an abundance of examples for your classic transaction table model, as well as for the asset tracking model where you change the location/other qualities of specific items; I'm stuck on a specific design element somewhere between the two methods.
We have a variety of training items that are lent out to customers, so we want to track the status of each individually. They fit into categories; there are X amount of trainer A, Y amount of trainer B. I'm giving them each an individual ID so they can be specifically tracked, rather than just as a sum.
Currently, I have just one table that is a list of trainerID and trainerType. I'm considering adding a field for status that is either Checked In or Checked Out, but what I'd prefer to do is treat this like a transaction so that I can record a bunch of supplemental information along with the check-out and check-in. But I also want the record to have a persistent state of checked-out or checked-in until the state is changed. Would the best way to do this be:
Two separate tables; one is just a list of trainersID and trainerType; second table is transactions. Determine status of trainer on the fly as needed with query by checking last transaction for the trainerID. When checking in, check to see if last transaction was check-out. When checking out, check to see that last transaction was check-in.
I think that would work fine, seems a bit clunky though and wondering if there's any easier way.