Hacker News new | past | comments | ask | show | jobs | submit login

The database is the only place that can be the authority because the application can have race conditions. It’s the only way to guarantee data integrity.



There's no way to specify every single application specific constraint directly in the database. Race conditions are not present when using locking reads (select ... for update, or DB specific shared locking selects) or serializable isolation level, which are the typical way of enforcing application level constraints.




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

Search: