Groups | Blog | Home
all groups > sql server programming > november 2004 >

sql server programming : Is Redundant Data Ok?


Nigel Rivett
11/6/2004 4:10:02 PM
You have some choices.
You can keep all versions of membership data and have an active flag or a
start/end date on it. In that way the winner data will always be available.

When a member wins then take a copy of the data and save it in the members
table for the winners table to link to.

when a member wins flag the entry as being linked from the winners table -
any changes made then create another version of the entry.

Have an audit trail on the memberst table so that the winners table can
always link to a version of the data.

Reall up to you - think I wouldn't hold the data in the winners table but
maybe another version of the members table so that can have mutiple winner
entries linking to the same members entry.

[quoted text, click to view]
Nigel Rivett
11/6/2004 4:46:04 PM
All the options I gave will fill your requirements.
Would need to know more about the system to suggest what I would do.

You probably already have an audit trail on the table so you could use that
but it would be slow probably - depends how often you needed to access the
old data as opposed to the current (which you could get from the last updated
date on the members table.

But it sounds like you would be happier copying all the data to the winners
table (being comfortable with a solution always helps) - if the table is
going to be quite smal you could argue that it doesn't really matter. It's
historic data so...


[quoted text, click to view]
Leon
11/6/2004 5:30:33 PM
I have two tables one name members and the other name winners. The members
table hold such information as FirstName, LastName, Email, etc., and the
winner table hold such information as FirstName, LastName, Email, Prize,
Address, City, etc. However, as you can see these two table holds pretty
much the same data, but they are used for two different purposes. The member
table is use for member registration in which the member can edit there
personal information on the fly, a member can also be deleted from the
member table, but the winner table is use for member that have won a prize
in which winners can never be deleted from this table, information can never
be edit, the winner table mainly keep a lifelong track second of all past
and present members ("even if they no longer have a record in the member
table").

Is it ok to have redundant data in my database in this situation? and is
this situation pretty common in database design?

Leon
11/6/2004 6:26:55 PM
Thanks for you response, but..
remember members can come in and change their name and everything, but we
want to keep the name of the member we gave the prize to at the time of
winning. the reason we need the winner table to keep a running track record
of all winners doing the life of the game, but member come and go. on the
other hand, we are dealing with millions of members, and we can only have so
many winners per day. Which way would you do it?

[quoted text, click to view]

Leon
11/6/2004 6:55:00 PM
Thanks again!
[quoted text, click to view]

AddThis Social Bookmark Button