A
alfaista
hello all!
i've written about this before, but it was in another thread with another
topic, i'd like to re-state it more as a question than just a comment as i
did before.
here is my "data design" so to say....
original data, many fields and values
1st set of changed data:
will be an exact copy of original, except
user can change any value of any field, old value always saved
2nd set of changed data based on 1st set, changes operate the same as 1st
3rd set of changed data, based on original, changes operate the same as 1st
okay? hard to explain.
so, i don't want to store all the data again and again, that makes no sense.
the user may change one record, one value on that on record, and leave the
other 50 unchanged.
so, what about having a table of original data, then one table that contains
basic information of "new" sets, such as name of iteration and a key, then a
table that contains a link to the original record, a link to the interation
information, and the changed value(s)?
does this make sense or seem logical? is there a better way?
tblOrigData
pk
value1
value2
value3
value4
tblIterations (there would be a record for the original data also)
pk
name
date
fkKey (link to the iteration this is based from, equal to pk for original
data)
tblChanges (one record for each value changed)
pk
fkIterations (link to interation this belongs to)
fkOrigData (link to which value changed)
value
thanks!!
i've written about this before, but it was in another thread with another
topic, i'd like to re-state it more as a question than just a comment as i
did before.
here is my "data design" so to say....
original data, many fields and values
1st set of changed data:
will be an exact copy of original, except
user can change any value of any field, old value always saved
2nd set of changed data based on 1st set, changes operate the same as 1st
3rd set of changed data, based on original, changes operate the same as 1st
okay? hard to explain.
so, i don't want to store all the data again and again, that makes no sense.
the user may change one record, one value on that on record, and leave the
other 50 unchanged.
so, what about having a table of original data, then one table that contains
basic information of "new" sets, such as name of iteration and a key, then a
table that contains a link to the original record, a link to the interation
information, and the changed value(s)?
does this make sense or seem logical? is there a better way?
tblOrigData
pk
value1
value2
value3
value4
tblIterations (there would be a record for the original data also)
pk
name
date
fkKey (link to the iteration this is based from, equal to pk for original
data)
tblChanges (one record for each value changed)
pk
fkIterations (link to interation this belongs to)
fkOrigData (link to which value changed)
value
thanks!!