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:
- search employees current status (salary, manager, title etc.)
- search remployees status of particular date
- 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
Post a Comment