(no title)
spenuke | 7 years ago
I have had to push for leveraging postgres for data validation (including typing columns with enums where applicable), and sometimes it's hard to convince people, but all you have to do is (a) poke around your existing data and find cases where you have junk because of some out-of-band process that created data without using your main app's validation, and (b) do a couple out-of-band things like an ETL or two and see how it saves you from creating junk.
I don't know where I picked this adage up, but it's also something I constantly think about:
Your data will outlive your application code.
IME, if you value the data's integrity, it's not really a question whether you should be pushing validations down to the db layer.
unknown|7 years ago
[deleted]