RE: History tracking in databases
Posted in 1997
Quan As with any modelling question, there may be many good answers, but = heres one that may work for you. It may not be the most suitable one but = you know your application better than me so you be the judge. If at all possible, identify the attributes of BOX into fixed and = variable. Call these entities BOX_F and BOX_V. The ER diagram would look = like: +--------+ /+-------+ /+-------+ | CRATE |----------| BOX_F |-----------| BOX_V | +--------+ \\+-------+ \\+-------+ | \\|/ +---------------------------------------+ and the attributes would be: CRATE(crate_id, ...) BOX_F(box_id, crate_id, ...) BOX_V(box_id, crate_id, box_as_on_date, ...) where box_as_on_date could be a snapshot of the box attributes on a = particular date. HTH Sujit Pal ---------- From: bhq001@email.mot.com[SMTP:bhq001@email.mot.com] Sent: Thursday, August 28, 1997 5:21 AM To: informix-list@rmy.emory.edu Subject: History tracking in databases Hi, I am trying to develop a relational database for a project at work. Currently we are at the logical design phase for this database. The database structure is very hierarchical due to the data requirements of the project. As part of the design requirements, the database must provide means of tracking historical data. This is further explained below: Say you have a CRATE (CRATE1) which can contain smaller BOXes (BOX1,BOX2 etc.) CRATE1 is related to BOX1 and BOX2. Each BOX contains information specific to itself. Say BOX1 information was changed for some reason but we would still like to know the previous information for BOX1. CRATE1 is now related to BOX1,BOX1(old),BOX2 Question: How would this kind of relationship be implemented in an RDBMS? Thanks in advance for any advice given. H.Quan -------------------=3D=3D=3D=3D Posted via Deja News = =3D=3D=3D=3D----------------------- http://www.dejanews.com/ Search, Read, Post to Usenet