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

> encourages code over sql which is a bad thing

Not saying you are incorrect but you made an assertion here. Can you please elaborate?




Not certain about the OP's reasoning, but doing aggregate functions on the database server is often more performant than doing the same in your application. This is, in part, because of the smaller result set sizes.

Also, it's useful having logic baked into the database rather than your application in the case that you need a different application to connect to your database. It's a problem, for example, if you're maintaining your foreign key relationships through ActiveRecords's relations and ignoring it on the server. It makes it much easier for junk data to get in the database.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: