forked from apache/shardingsphere
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
38 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
+++ | ||
date = "2016-01-08T16:14:21+08:00" | ||
title = "架构图" | ||
weight = 4 | ||
weight = 5 | ||
+++ | ||
# 架构图 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
+++ | ||
date = "2016-03-03T16:14:21+08:00" | ||
title = "核心概念" | ||
weight = 4 | ||
+++ | ||
|
||
本文介绍`Sharding-JDBC`包含的一些核心概念。 | ||
|
||
## LogicTable | ||
数据分片的逻辑表,对于水平拆分的数据库(表),同一类表的总称。例:订单数据根据主键尾数拆分为`10`张表,分别是`t_order_0`到`t_order_9`,他们的逻辑表名为`t_order`。 | ||
|
||
## ActualTable | ||
在分片的数据库中真实存在的物理表。即上个示例中的`t_order_0`到`t_order_9`。 | ||
|
||
## DataNode | ||
数据分片的最小单元。由数据源名称和数据表组成,例:`ds_1.t_order_0`。配置时默认各个分片数据库的表结构均相同,直接配置逻辑表和真实表对应关系即可。如果各数据库的表结果不同,可使用`ds.actual_table`配置。 | ||
|
||
## DynamicTable | ||
逻辑表和真实表不一定需要在配置规则中静态配置。比如按照日期分片的场景,真实表的名称随着时间的推移会产生变化。此类需求`Sharding-JDBC`是支持的,不过目前配置并不友好,会在新版本中提升。 | ||
|
||
## BindingTable | ||
指在任何场景下分片规则均一致的主表和子表。例:订单表和订单项表,均按照订单ID分片,则此两张表互为`BindingTable`关系。`BindingTable`关系的多表关联查询不会出现笛卡尔积关联,关联查询效率将大大提升。 | ||
|
||
## ShardingColumn | ||
分片字段。用于将数据库(表)水平拆分的关键字段。例:订单表订单ID分片尾数取模分片,则订单ID为分片字段。`SQL`中如果无分片字段,将执行全路由,性能较差。`Sharding-JDBC`支持多分片字段。 | ||
|
||
## ShardingAlgorithm | ||
分片算法。`Sharding-JDBC`通过分片算法将数据分片,支持通过等号、`BETWEEN`和`IN`分片。分片算法目前需要业务方开发者自行实现,可实现的灵活度非常高。未来`Sharding-JDBC`也将会实现常用分片算法,如`range`,`hash`和`tag`等。 | ||
|
||
## SQL Hint | ||
对于分片字段非`SQL`决定,而由其他外置条件决定的场景,可使用`SQL Hint`灵活的注入分片字段。例:内部系统,按照员工登录ID分库,而数据库中并无此字段。`SQL Hint`支持通过`ThreadLocal`和`SQL`注释(待实现)两种方式使用。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
+++ | ||
date = "2016-01-28T16:14:21+08:00" | ||
title = "目录结构说明" | ||
weight = 6 | ||
weight = 7 | ||
+++ | ||
|
||
# 目录结构说明 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
+++ | ||
date = "2016-01-08T16:14:21+08:00" | ||
title = "使用限制" | ||
weight = 7 | ||
weight = 8 | ||
+++ | ||
|
||
# 使用限制 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
+++ | ||
date = "2016-01-08T16:14:21+08:00" | ||
title = "柔性事务" | ||
weight = 5 | ||
weight = 6 | ||
+++ | ||
# 最大努力送达型 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
+++ | ||
date = "2016-01-08T16:14:21+08:00" | ||
title = "压力测试报告" | ||
weight = 8 | ||
weight = 9 | ||
chart = true | ||
+++ | ||
# 压力测试报告 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
+++ | ||
date = "2016-01-29T16:14:21+08:00" | ||
title = "事务支持说明" | ||
weight = 10 | ||
weight = 11 | ||
+++ | ||
# 事务支持说明 | ||
|
||
|