# shardingjdbcdemo **Repository Path**: maxatom/shardingjdbcdemo ## Basic Information - **Project Name**: shardingjdbcdemo - **Description**: sharding jdbc 实现分库分表 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-07-23 - **Last Updated**: 2021-08-18 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # shardingjdbcdemo #### 介绍 sharding-jdbc 实现分库分表 实现验证: 1. 分库分表配置 2. 写入 3. 查询 #### 软件架构 - springboot - sharding-jdbc 实现分库分表 - docker mysql #### 使用说明 #### 数据库 库: lab18_orders_0 表: orders_{0,2,4,6} 库: lab18_orders_1 表: orders_{1,3,5,7} 表结构 ```sql drop table orders_0; CREATE TABLE `orders_0` ( `id` BIGINT(19) NOT NULL DEFAULT '0', `desc` VARCHAR(200) NULL DEFAULT '0' COLLATE 'utf8_general_ci', `user_id` INT(10) NULL DEFAULT '0', `user_name` VARCHAR(200) NULL DEFAULT '0' COLLATE 'utf8_general_ci', `amout` INT(10) NOT NULL DEFAULT '0', `create_time` DATETIME NULL DEFAULT NULL, `modify_time` DATETIME NULL DEFAULT NULL, `status` INT(10) NOT NULL DEFAULT '0' COMMENT '订单状态', PRIMARY KEY (`id`) USING BTREE ) COLLATE='utf8_general_ci' ENGINE=InnoDB ; ```