Patent ID: 8495041

Claim:
A computer system for making an inquiry about the latest value at a designated time using a database in which values and information on times associated with the individual values are contained in a table, the computer system comprising: a first storage unit that stores a first data structure, wherein said first data structure comprises, for each ID associated with the values in the database, (i) at least a first time stamp that is sorted in chronological order; (ii) values belonging to the individual first time stamps; and (iii) a pointer that designates one of the first time stamps, the first time stamps indicating the times when the values become valid; a second storage unit that stores a second data structure, wherein said second data structure comprises, for each ID, (i) the designated first time stamp; and (ii) a value belonging to the designated first time stamp; an accepting unit that accepts an inquiry for retrieving the latest value at a designated time from the database, the inquiry including a description for identifying at least one ID and a second time stamp indicating a time of retrieval; an identifying unit that identifies, from among first time stamps stored in the first storage unit and belonging to the identified ID, a first time stamp having the largest time stamp not exceeding the second time stamp (the first time stamp being hereinafter referred to as a first largest-time-stamp); and an obtaining unit that obtains, from the second storage unit, a value belonging to the identified ID when the designated first time stamp belonging to the identified ID is the same as the first largest-time-stamp, wherein when the second time stamp is older than the designated first time stamp stored in the second storage unit and belonging to the identified ID, the obtaining unit obtains, from the database, the largest time stamp belonging to the identified ID and not exceeding the second time stamp (the largest time stamp being hereinafter referred to as a second largest-time-stamp) and a value belonging to the second largest-time-stamp; and when the first largest-time-stamp is newer than the obtained second largest-time-stamp, the obtaining unit obtains a value belonging to the first largest-time-stamp from the first storage unit.