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

"Designing" the database by creating objects first and exporting create statements is ignoring the responsibility to design the database completely, the database which is the foundation of almost all apps. It's irresponsible and leads to a database that isn't optimal at best and doesn't work at worst. The database design should be one of the most important tasks of an app and it shouldn't be an afterthought. The design shouldn't even involve code, even sql at first. Getting the data structures correct is most important. The code will flow from there. "Show me your data structures and I don't even need to see the code to understand how it works."

Putting an orm layer on top of this refusal to do one's job and design the database is the second nightmare of an orm. Adding a new language and new paradigms that don't make much sense just to translate data into objects adds a ton of completely unnecessary complexity. Not to mention many orms are slow either at fetching or hydrating data. They are just unnecessary solutions for nonexistent problems. It's too bad most people have no experience with database design or even sql to understand and see this. Most people prefer to make apps more complex unnecessarily rather than reduce complexity and think that makes them experts. They are usually the ones advocating for the unnecessary orm layer. On the other hand, this problem mostly goes away when you no longer deal with objects in oop languages, so there is hope.



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

Search: