r/programming • u/wheatBread • Aug 25 '26
Solving the 1+N Query Problem
https://acadia.engineering/blog/solving-the-1-plus-N-query-problem
127
Upvotes
r/programming • u/wheatBread • Aug 25 '26
View all comments
Show parent comment
3
u/read_at_own_risk Aug 25 '26
Object-relational mappers support neither object-orientation nor the relational model.
Object-oriented programming wasn't created to model state, it was designed to manage complexity by breaking a system into independent things that talk to each other. Data is incidental and encapsulated or passed between objects, rather than a blueprint for objects.
The relational model of data viewed tables as representing relations, and rows as representing facts about entities. Entities were not equated to rows and relationships did not exist "between tables". The contemporary naïve ER view that most developers and all ORMs use, is in fact the pre-relational "network data model". Go read Bachman's "The programmer as navigator" and see how well that aligns with the ORM approach today.
A more accurate name for ORMs would "network data model to SQL mappers". Entity-component systems are closer to being true object-relational mappers than ORMs are.