Ask about the use of one-to-many and many-to-many mappings #2375
Replies: 4 comments 2 replies
-
You are going to have to be more specific / and or give an example. Can you do that? |
Beta Was this translation helpful? Give feedback.
-
Assume that the User and Department tables are larger, |
Beta Was this translation helpful? Give feedback.
-
Thank you very much I'd like to follow up with a question: Of course, this may not be the problem with EBean However, I hope your experience can help me. After splitting tables with large cardinality, @onetomany and @manytomany can no longer be used. What if I want to continue to simplify table splitting via eBeans? Because I really haven't found a solution that Ebean and ShardingSphere can use together, or do you have a more recommended solution? Looking forward to your reply. Thank you I am sorry that I am not an English speaker, so I may have some errors in expression |
Beta Was this translation helpful? Give feedback.
-
So table partitioning / sharding / distributed database is all in all a very very big question in general. Given you have ended up at "I'm using ShardingSphere" we don't know where you started from and the path / thinking that took you to get to using ShardingSphere. So the questions are what is the general context of the problem, what other options were considered and what lead you to ShardingSphere in particular? For example, if my starting point is "I'm using Postgres" then we might quickly get to "I'm going to use Postgres table partitioning". A slight generalisation on that is ... If a database provides built in table partitioning then we should really look strongly at using it because table partitioning impacts the database query planner, parallel query execution, index management - lots of interesting stuff INSIDE the database. Then there is the whole world of "distributed database" which include dealing with distributed query execution (efficiently performing joins across a cluster of nodes) and typically that brings in replication (so that the db can perform some of the joins locally). |
Beta Was this translation helpful? Give feedback.
-
Hello, I am learning java development by myself. I hope to get your help. I have a problem that has been plagued for a long time. Under the large amount of data, we know that using many-to-many annotations will cause poor efficiency. Does ebean recommend a more mainstream solution to solve this problem, or does the developer no longer use ManyTomany annotations to solve this problem? I haven't found a good solution to solve my troubles. I want to hear everyone's correct suggestions.
Beta Was this translation helpful? Give feedback.
All reactions