You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2019/06/05 15:08:18 UTC

[GitHub] [incubator-shardingsphere] feelwing1314 commented on issue #650: Welcome to leave your article link(欢迎留下关于ShardingSphere的文章链接)

feelwing1314 commented on issue #650: Welcome to leave your article link(欢迎留下关于ShardingSphere的文章链接)
URL: https://github.com/apache/incubator-shardingsphere/issues/650#issuecomment-499124310
 
 
   借助sharding-sphere实现类多租户设计,实现的需求如下:
   商户tmall,taobao,aliyun等每一个商户操作的表完全一样,但是操作的库不一样,tmall商户操作的库是xxx_tmall,taobao商户操作的库是xxx_taobao,aliyun商户操作的库是xxx_aliyun,以此类推:
   
   参考文章地址:https://mp.weixin.qq.com/s/X34qKPAs2aHQTvE_6VStiQ
   对应源码地址:https://github.com/feelwing1314/shardingsphere-multitenancy
   
   本文除实现这个需求外,还衍生了另一个需求:某个库内只有部分表会分表,其他表都不分表。分表的逻辑为tmall访问的表是tb_order_tmall,taobao访问的表是tb_order_taobao,aliyun访问的表是tb_order_aliyun,以此类推。。。

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services