21 rules for dividing databases and tables, hold!
AD |
ShardingSphere5.xt_orderDB_1DB_2t_order_1t_order_2 t_order t_order_0t_order_1t_order_n DB_1
ShardingSphere5.x
t_orderDB_1DB_2t_order_1t_order_2
t_order t_order_0t_order_1t_order_n
DB_1.t_order_1DB_2.t_order_2
t_order t_order_0 t_order_910 t_ordert_order_n
SQLSQL t_orderSQLSQL t_order
SQL
select * from t_order where order_no='A11111'
SQL
select * from DB_1.t_order_n where order_no='A11111'
DB_1.t_order_n
JOIN
- JOIN
t_cityDB_n.t_order_nJOINJOIN
10001000SQL
t_order SQLSQLorder_no order_no % 2 DB_1 DB_2
order_no t_order order_no
ShardingSphere
- ID
- order_no % 2
- .....
JOIN
t_order t_order_item order_no order_no
t_order t_order_item SQL
SELECT * FROM t_order o JOIN t_order_item i ON o.order_no=i.order_no
SQL
SELECT * FROM t_order_0 o JOIN t_order_item_0 i ON o.order_no=i.order_no SELECT * FROM t_order_0 o JOIN t_order_item_1 i ON o.order_no=i.order_no SELECT * FROM t_order_1 o JOIN t_order_item_0 i ON o.order_no=i.order_no SELECT * FROM t_order_1 o JOIN t_order_item_1 i ON o.order_no=i.order_no
t_order_n t_order_item_n
SELECT * FROM t_order_0 o JOIN t_order_item_0 i ON o.order_id=i.order_id SELECT * FROM t_order_1 o JOIN t_order_item_1 i ON o.order_id=i.order_id
t_order t_order_item t_order
SQL
SQL SQL -> -> SQL -> SQL -> SQL ->
SQLSQLSQL
SELECT order_no FROM t_order where order_status > 0 and user_id = 10086
SQLFieldTableConditionOrder ByGroup ByLimit SQL
SQLuser_idSQL
SELECT order_no FROM t_order where user_id = 10086 and order_status > 0
SQL
SQL SQL
SQL SQLSQL
3
SQL
SQL = BETWEEN IN SQLSQL
SELECT * FROM t_order where t_order_id in (1,2)
SQL
SELECT * FROM t_order_0 where t_order_id in (1,2)SELECT * FROM t_order_1 where t_order_id in (1,2)
SQLSQLSQL
t_order t_order_id t_usert_order_id
SELECT * FROM t_order_0 t LEFT JOIN t_user_0 u ON u.user_id = t.user_id WHERE t.user_id = 1SELECT * FROM t_order_0 t LEFT JOIN t_user_1 u ON u.user_id = t.user_id WHERE t.user_id = 1SELECT * FROM t_order_1 t LEFT JOIN t_user_0 u ON u.user_id = t.user_id WHERE t.user_id = 1SELECT * FROM t_order_1 t LEFT JOIN t_user_1 u ON u.user_id = t.user_id WHERE t.user_id = 1
5
DQL DML DDL t_order SQL t_order_0 t_order_n
SET TCL
autocommit
SET autocommit=0;
DCL order order
CREATE USER order@127.0.0.1 identified BY '';
DESCRIBE t_order;
t_order t_order_0 t_order_n
SQL
USE order_db;
ShardingSphere Schema
SQL
SQLSQL t_order SQL t_order
SELECT * FROM t_order
SELECT * FROM t_order_n
SQL
SQL SQL JDBC
SQL
t_ordert_order_nIDID
ID
IDIDIDID
9ID
SQL
6
API
XASeata
5 Seata +
Shadow Table
21Proxy
ShardingSphere5.x 2
Disclaimer: The content of this article is sourced from the internet. The copyright of the text, images, and other materials belongs to the original author. The platform reprints the materials for the purpose of conveying more information. The content of the article is for reference and learning only, and should not be used for commercial purposes. If it infringes on your legitimate rights and interests, please contact us promptly and we will handle it as soon as possible! We respect copyright and are committed to protecting it. Thank you for sharing.(Email:[email protected])
Mobile advertising space rental |
Tag: rules for dividing databases and tables hold
Preliminary Exploration of Data Heterogeneity in Canal (Tips)
NextHow to face the future of embryonic science: can global regulatory agencies keep up?
Guess you like
-
Yang Mi Shows Off Huawei's Tri-Folding Phone at International Fashion Week: A Shining Light on Chinese Technological PowerDetail
2024-10-03 16:32:52 1
-
The Golden Week: Discounted Airfares Become a Treasure Hunt Tool, Shaping New Trends in the Tourism MarketDetail
2024-10-03 09:23:17 1
-
Northeast Rain Sister Breaks Down on Live Stream: The Fall of an Internet Celebrity, Trust and Responsibility at a CrossroadsDetail
2024-10-02 21:28:51 11
- Detail
-
Apple Phones Banned: Why Has the Once-Shining Star Fallen From Grace?Detail
2024-10-01 12:19:49 1
-
AI Audio Incident: Hefei Police Unravel the Truth Behind Online Rumors, A Clash of Technology and JusticeDetail
2024-09-30 22:45:17 1
-
Yadea Guaneng E8: The "Rolls Royce" of Electric Vehicles, A Perfect Blend of Performance and IntelligenceDetail
2024-09-30 22:05:41 1
-
The Chaos of Live Streaming E-commerce: Deep Reflections Triggered by the San Zhi Yang False Advertising IncidentDetail
2024-09-30 19:43:26 1
-
New E-commerce Development Trends: Regulation and Empowerment, Boosting High-Quality Development of the Digital EconomyDetail
2024-09-29 18:03:14 1
- Detail
- Detail
-
Maoyan Entertainment Unveils "Shenbi Malia": AI-Powered Screenplay Creation with One-Click Dynamic Storyboard GenerationDetail
2024-09-27 15:52:43 1
-
Huawei Cloud and CAICT Jointly Released Two Value Reports to Empower City Digital Transformation and UpgradingDetail
2024-09-27 15:29:32 1
-
Huawei MateXT: Scalpers Caught in the Crossfire, High Prices Unrelenting, Can Production Ramp-Up Offer Relief?Detail
2024-09-27 14:40:15 11
-
10G-PON Leads Digital Transformation: 2024 International Information and Communication Exhibition Focuses on Innovative DevelopmentDetail
2024-09-27 14:00:08 1
-
The Light of Science Illuminates Dreams: The Path of Science Popularization at the Shandong Science and Technology MuseumDetail
2024-09-27 11:59:09 11
-
The Huawei Chip Dispute: A Balancing Act Between Independent Innovation and Open CollaborationDetail
2024-09-27 09:34:01 11
-
"Playing it Safe": Li Pao'er's Exit from Sanzhiyang, the Dilemma of "Siege" in Internet Celebrity EconomyDetail
2024-09-27 09:31:55 1
- Detail
-
From "Catching Up" to "Surpassing": The "Golden Age" of China's Precision Instrument DevelopmentDetail
2024-09-25 14:16:48 21