db icon indicating copy to clipboard operation
db copied to clipboard

Support for table joins

Open FluffyDiscord opened this issue 1 year ago • 1 comments

What about indexes, foreign keys and tables joins? Right now this package behaves like a key/value storage with SQL, rather than proper SQL database.

FluffyDiscord avatar Sep 24 '24 10:09 FluffyDiscord

Hi, thanks for the suggestion! In this project, there won’t be support for relations or joins, and here’s why:

Firstly, adding joins and relations would make automatic caching infeasible, which is one of the key features that sets this project apart from other ORMs. Secondly, I’m not a fan of traditional ORMs because they tend to introduce a lot of “magic” with relations and query builders, which can lead to performance issues. They often generate many uncontrolled joins, potentially resulting in very slow and unoptimized queries that can become a bottleneck. With this project, I aim for more direct control and fewer surprises, reducing the chances of running into these kinds of issues down the line.

Thanks again for your interest, and feel free to suggest other improvements or ask questions!

compositephp avatar Nov 03 '24 23:11 compositephp