Explore BrainMass

Explore BrainMass

    Temporal Databases

    Not what you're looking for? Search our solutions OR ask your own Custom question.

    This content was COPIED from BrainMass.com - View the original, and get the already-completed solution here!

    Demonstrate how you would use a temporal database to keep track of dates.

    © BrainMass Inc. brainmass.com December 24, 2021, 11:09 pm ad1c9bdddf
    https://brainmass.com/computer-science/databases/temporal-databases-543091

    SOLUTION This solution is FREE courtesy of BrainMass!

    A temporal database is like a standard database, with one large exception: it understands and logs the passing of time. For example, if someone worked at a company from 2011 to 2020, the temporal database will be able to store both dates as when the time starts, and when it ends. A standard database can only show that the employee is hired, and his or her employee information would have to be deleted when the employee leaves the company, because standard databases only understand the present. This standard was created in 1993, and implemented in 1994. All temporal databases include a valid time and transaction time integer that shows when the time happened in real life, and when the database was modified to accept the change.

    Databases, in their early format, were only made to store strings of text and numbers, and they did not recognize the passage of time.
    To alleviate these problems, the database community was called on to make a temporal variable that could be integrated into the database format. Many businesses, government offices and schools, and others would create temporal databases to track records for chronological access later.

    Example:

    John Doe was born on April 3, 1975 in the Kids Hospital of Medicine County, as son of Jack Doe and Jane Doe who lived in Smallville. Jack Doe proudly registered the birth of his first-born on April 4, 1975 at the Smallville City Hall. John grew up as a joyful boy, turned out to be a brilliant student and graduated with honors in 1993. After graduation he went to live on his own in Bigtown. Although he moved out on August 26, 1994, he forgot to register the change of address officially. It was only at the turn of the seasons that his mother reminded him that he had to register, which he did a few days later on December 27, 1994. Although John had a promising future, his story ends tragically. John Doe was accidentally hit by a truck on April 1, 2001. The coroner reported his date of death on the very same day.

    Using a current database

    To store the life of John Doe in a current (non-temporal) database we use a table Person (Name, Address). (In order to simplify Name is defined as the primary key of Person.)

    John's father officially reported his birth on April 4, 1975. On this date a Smallville official inserted the following entry in the database: Person(John Doe, Smallville). Note that the date itself is not stored in the database.

    After graduation John moves out, but forgets to register his new address. John's entry in the database is not changed until December 27, 1994, when he finally reports it. A Bigtown official updates his address in the database. The Person table now contains Person(John Doe, Bigtown). Note that the information of John living in Smallville has been overwritten, so it is no longer possible to retrieve that information from the database. An official accessing the database on December 28, 1994 would be told that John lives in Bigtown. More technically: if a database administrator ran the query SELECT ADDRESS FROM PERSON WHERE NAME='John Doe' on December 26, 1994, the result would be Smallville. Running the same query 2 days later would result in Bigtown.

    Until his death the database would state that he lived in Bigtown. On April 1, 2001 the coroner deletes the John Doe entry from the database. After this, running the above query would return no result at all. - Example obtained by reference to http://en.wikipedia.org/wiki/Temporal_database

    Using a temporal database and Bitemporal relations someone querying the database could easily see all of John Doe's addresses. A common use of this type of database are Driving records and credit bureaus.

    This content was COPIED from BrainMass.com - View the original, and get the already-completed solution here!

    © BrainMass Inc. brainmass.com December 24, 2021, 11:09 pm ad1c9bdddf>
    https://brainmass.com/computer-science/databases/temporal-databases-543091

    ADVERTISEMENT