You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shardingsphere.apache.org by 郑云朋 <zh...@gmail.com> on 2019/11/14 04:49:55 UTC

shardingsphere Support cross database data hybrid query?

Can shardingsphere be used to implement mixed data association query after
database division?

Example:
Database 1: tables A1, B1
Database 2: tables A2, B2
How to associate A1 with B2 query?

"Routing to multiple data nodes supports paging, de duplication, sorting,
grouping, aggregation and association query (cross database association is
not supported)."
What does it mean that it is not clear (cross Library Association is not
supported)?

Test:
Configure sharding:
Database 1: table A1
Database 2: table B2
The query results of table A1 and table B2 are both normal. When table A1
is used as the main table to associate table B2, an error is reported:
table B2 cannot be found in database 1

Re: shardingsphere Support cross database data hybrid query?

Posted by "zhangliang@apache.org" <zh...@apache.org>.
No, ShardingSphere can support the SQL which can execute in a same database
only.

For example:
Database 1: tables A1, B1
Database 2: tables A2, B2

ShardingSphere can support SQL for join tables A1, B1 or tables A2, B2,
cannot support join tables A1, B2 or join tables A2, B1. Because of the SQL
is not well syntax in any database, no database can find A1, B2 together.

------------------

Liang Zhang (John)
Apache ShardingSphere & Dubbo


郑云朋 <zh...@gmail.com> 于2019年11月14日周四 下午3:34写道:

> Can shardingsphere be used to implement mixed data association query after
> database division?
>
> Example:
> Database 1: tables A1, B1
> Database 2: tables A2, B2
> How to associate A1 with B2 query?
>
> "Routing to multiple data nodes supports paging, de duplication, sorting,
> grouping, aggregation and association query (cross database association is
> not supported)."
> What does it mean that it is not clear (cross Library Association is not
> supported)?
>
> Test:
> Configure sharding:
> Database 1: table A1
> Database 2: table B2
> The query results of table A1 and table B2 are both normal. When table A1
> is used as the main table to associate table B2, an error is reported:
> table B2 cannot be found in database 1
>