Path: utzoo!attcan!uunet!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!brutus.cs.uiuc.edu!apple!oliveb!orc!bu.edu!dartvax!eleazar.dartmouth.edu From: carl@eleazar.dartmouth.edu (Carl Pedersen) Newsgroups: comp.databases Subject: Time related records Message-ID: <22947@dartvax.Dartmouth.EDU> Date: 28 Jun 90 17:08:51 GMT References: <1082@kirk.nmg.bu.oz> Sender: news@dartvax.Dartmouth.EDU Organization: Dartmouth College, Hanover, NH Lines: 19 My attempt to mail this bounced, so here is my reply to Cameron Stevenson. If you have a unique id for the key and for each person, and the time the key was given to the person, then these three items together comprise a unique key for the table. Why not just leave the old records there? The person who has the key now is the one who took it out most recently. select who from t where key_id = 12345 and checked_out = (select max(checked_out) from t where key_id = 12345); You may want to keep track of the times when the key is not checked out to anyone. In that case, if storage isn't a big issue, you could just have a special "person" who would "hold" all keys that are not checked out.