Answer the question
In order to leave comments, you need to log in
What is the best way to display relationships in tables?
Good afternoon
I'm writing a mini-framework. And I need to implement methods to query the mapper to the database. The question is:
Nested queries VS Joins.
On the one hand, nested queries are easy to write and quickly executed, on the other hand, joins seem to be there, so they need to be used. Given that the connection, for example, many-to-one, is implemented on joins unreasonably long (maybe I'm wrong).
Answer the question
In order to leave comments, you need to log in
Take the implementation of Doctrine or Active Record already and don't chew your brain. Join and subquery are tools that are both good for their specific tasks. It is impossible to choose one of them as a spherical instrument in a vacuum. And subquery is usually much slower than join
many-to-one implemented on joins is unreasonably long
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question