Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I largely avoid UPDATE and DELETE statements. Changes are new rows, time ordered, which supersede prior rows. Like an audit log.

Works great. Especially for anything that needs history, e.g. medical data.



Wrote one of those many years ago, yes - for medical data. It's the right solution to just about every problem actually, and I'm surprised that it isn't more commonly taught.


Yeah, logical deletes ftw :) .

One thing I haven't figured out is how to archive old records, I think it's not a problem for modern DBMSs, but we have a problem at work with 15 years' worth of historical data.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: