Rails design for database record (employment) history -


so, have rails application tracks employees. want track employment history on time. we'd able following sorts of queries:

  1. search employees current status (salary, manager, title etc.)
  2. search remployees status of particular date
  3. search employees ever matched condition

we don't mind historical queries being slower, maybe 2 orders of magnitude slower.

this history different audit trail - audit trail history of data, audit trail tell "what salary stored employee x on date y," won't let correct older data if wrong.

[we using audit trails auditing purposes, think of logic audit trails providing orthogonal design requirement.]

is there known database design pattern best implementing kind of history? or site can find discussions of various "obvious" designs , trade-offs? rails plugins?

rails 2.3.5 ruby 1.8.7, if matters.

i haven't used it, paper_trail claims support type of version management. seem handle requirements (1) , (2) -- not sure (3), might need heavy lifting query searched across models , versions @ same time.

this history different audit trail

meaning need ability make changes old versions -- doubt supported, , seems problematic implement if need act audit trail.


Comments

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

windows - Python Service Installation - "Could not find PythonClass entry" -

Determine if a XmlNode is empty or null in C#? -