database - historical data modelling literature, methods and techniques -


last year launched http://tweetmp.org.au - site dedicated australian politics , twitter.

late last year our politician schema needed adjusted because politicians retired , new politicians came in.

changing our db required manual (sql) change, considering implementing cms our admins make these changes in future.

there's many other sites government/politics sites out there australia manage own politician data.

i'd come centralized way of doing this.

after thinking while, maybe best approach not model current view of politician data , how relate political system, model transactions instead. such current view projection of transactions/changes happen in past.

using approach, other sites "subscribe" changes (a la` pubsubhub) , submit changes , integrate these change items schemas.

without approach, sites have tear down entire db, , repopulate it, associated records need reassociated. managing data way pretty annoying, , severely impedes mashups of data public good.

i've noticed things work way - source version control, banking records, stackoverflow points system , many other examples.

of course, immediate challenges , design issues approach includes

  • is current view cached , repersisted? how updated?
  • what base entities must exist never change?
  • probably heaps more can't think of right now...

is there notable literature on subject recommend? also, patterns or practices data modelling useful?

any appreciated.

-cv

this common problem in data modelling. comes down this:

are interesting in view now, view @ point in time or both?

for example, if have service models subscriptions need know:

  • what services had @ point in time: needed work out how charge, see history of account , forth; and
  • what services has now: can access on website?

the starting point kind of problem have history table, such as:

  • service history: id, userid, serviceid, start_date, end_date

chain service histories user , have history. how model have now? easiest (and denormalized view) last record or record null end date or present or future end date have now.

as can imagine can lead gnarly sql selectively denomralized have services table , table history. each time services changed history record created or updated. kind of approach makes history table more of audit table (another term you'll see bandied about).

this analagous problem. need know:

  • who current mp each seat in house of representatives;
  • who current senator each seat;
  • who current minister each department;
  • who prime minister.

but need know each of things @ point in time need history things.

so on 20th august 2003, peter costello made press release need know @ time was:

  • the member higgins;
  • the treasurer; and
  • the deputy prime minister.

because conceivably interesting in finding press releases peter costello or treasurer, lead same press release impossible trace without history.

additionally might need know seats in states, possibly geographical boundaries , on.

none of should require schema change schema should able handle it.


Comments

Popular posts from this blog

c++ - Convert big endian to little endian when reading from a binary file -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

unicode - Are email addresses allowed to contain non-alphanumeric characters? -