4 ms·
What you are saying exactly highlights what the author is missing: That if your application has some logic, you will eventually have to map your database rows t
by tomtomtom777 7y ago
What you are saying exactly highlights what the author is missing: That if your application has some logic, you will eventually have to map your database rows to your in memory typed structures.
It sucks. Sometimes it sucks less if you map your queries as well, sometimes it sucks less if you stick to SQL and only map your results, sometimes it sucks so much you're better off with a no-sql solution.
But when using a relational database, ORM isn't optional.
- Avamander 7y agoUm, PL/PGSQL and et al for stored procedures exist, OOP is optional.
- revscat 7y agoSo? Stored procedures suck. There are good reasons they have never seen serious traction and are infrequently used to the point of being irrelevant.
- jevgeni 7y agoMajor international banks have entire payment systems implemented in PL/SQL. I’m talking 2-3kloc procedures and thousands of them.
- Avamander 7y agoThat's what you think not having any knowledge of them. Many of the best and huge systems I've seen have been implemented in stored procedures.
- mannykannot 7y agoOOP is optional, but if your program has any concept of structured data, then, regardless of whether that structure can be expressed syntactically within the programming language, you will necessarily have a mapping between that and the database. It might be as simple as a 1:1 mapping between relations and ADTs, with collections of references being used within the program to represent the keyed relationships that exist within the database scheme.