News for hackers. Stuff that matters.
Re:PostgreSQL indexing in Rails by xentronium on Friday December 27, 2013 @09:49PM (#6973649)
The problem is that sometimes you simply can't do it properly in application. Uniqueness is the most obvious example, although not the only one.
Re:PostgreSQL indexing in Rails by tominated on Friday December 27, 2013 @11:55PM (#6973999)
I probably phrased that incorrectly. I definitely think that you should have validation logic at the database level. I've had a couple of major issues in the past (while still learning web dev) where lack of indexes/constraints has pretty much ruined my database when I tried use them in production
Re:PostgreSQL indexing in Rails by jeltz on Saturday December 28, 2013 @03:50PM (#6976502)
You also want to implement foreign keys in the database since you do not want to have to remember to lock referenced rows when inserting new referring rows. The database helps you out with concurrency issues.