![]() |
|
Pathologically Eclectic Rubbish Lister | |
PerlMonks |
Re: RDB updates: rebuild from scratch vs. incrementalby danmcb (Monk) |
on Aug 30, 2005 at 13:37 UTC ( [id://487754]=note: print w/replies, xml ) | Need Help?? |
definitely incremental - especially if the events that cause you to update your data take place incrementally. Doing the update as events arrive distributes the processing workload over time, and makes you design a system that has some robustness. Think about what those evenst are, how they are signalled to your system, and what the change on your data is for different events. Work this out with pencil and paper as far as you can. Work out what it is you don't know (not so much about the technical side, more about the proper behaviour of the system). What inconsistent states can arise as a result of unexpected events? How will you hanlde them? What are the invariants of the state of your system? Design database queries that update you db for expected events. If updates affect several tables (ie to preserve the links between tables that you mention, which by the way are a GOOD thing generally), find out how to lock tables so that the data accessed by users will always be consistent. DO take the time to make sure that your database design is good, and correctly normalised. Not doing this will cost you many many hours down the line. If you don't know what this means, check out some of the many tutorials on teh web
In Section
Seekers of Perl Wisdom
|
|