用户:商品列表、购买清单、个人中心
管理员:商品采购、采购记录、商品预警
/*
Navicat Premium Data Transfer
Source Server : localhost_3306
Source Server Type : MySQL
Source Server Version : 80019
Source Host : localhost:3306
Source Schema : db_company
Target Server Type : MySQL
Target Server Version : 80019
File Encoding : 65001
Date: 10/03/2022 20:17:58
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for db_商品
-- ----------------------------
DROP TABLE IF EXISTS `db_商品`;
CREATE TABLE `db_商品` (
`id` int(0) NOT NULL AUTO_INCREMENT,
`商品类别编号` int(0) NULL DEFAULT NULL,
`商品名称` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
`商品单价` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
`商品剩余量` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE,
INDEX `商品类别编号`(`商品类别编号`) USING BTREE,
CONSTRAINT `db_商品_ibfk_1` FOREIGN KEY (`商品类别编号`) REFERENCES `db_商品类别` (`商品类别编号`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 26 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of db_商品
-- ----------------------------
INSERT INTO `db_商品` VALUES (1, 101, '奶粉', '90', '5');
INSERT INTO `db_商品` VALUES (2, 101, '奶瓶', '15', '70');
INSERT INTO `db_商品` VALUES (3, 101, '奶嘴', '3', '45');
INSERT INTO `db_商品` VALUES (4, 102, '牙膏', '25', '63');
INSERT INTO `db_商品` VALUES (5, 102, '牙刷', '15', '15');
INSERT INTO `db_商品` VALUES (6, 102, '卫生巾', '35', '10');
INSERT INTO `db_商品` VALUES (7, 101, '儿童玩具', '65', '18');
INSERT INTO `db_商品` VALUES (8, 101, '尿不湿', '45', '28');
INSERT INTO `db_商品` VALUES (9, 102, '台灯', '53', '19');
INSERT INTO `db_商品` VALUES (10, 103, '面包', '5', '67');
INSERT INTO `db_商品` VALUES (11, 103, '好丽友蛋糕', '3', '37');
INSERT INTO `db_商品` VALUES (12, 103, '食用盐', '12', '29');
INSERT INTO `db_商品` VALUES (13, 103, '味精', '15', '72');
INSERT INTO `db_商品` VALUES (14, 104, '纯牛奶', '35', '63');
INSERT INTO `db_商品` VALUES (15, 104, '酸奶', '45', '101');
INSERT INTO `db_商品` VALUES (16, 104, '奶酪', '12', '104');
INSERT INTO `db_商品` VALUES (17, 104, '鲜奶', '15', '12');
INSERT INTO `db_商品` VALUES (18, 105, '桌子', '200', '55');
INSERT INTO `db_商品` VALUES (19, 105, '椅子', '155', '37');
INSERT INTO `db_商品` VALUES (20, 105, '沙发', '1500', '17');
INSERT INTO `db_商品` VALUES (21, 105, '空调', '3500', '200');
INSERT INTO `db_商品` VALUES (22, 105, '电冰箱', '2800', '135');
INSERT INTO `db_商品` VALUES (23, 106, '自行车', '1500', '67');
INSERT INTO `db_商品` VALUES (24, 106, '普通汽车', '10000', '62');
INSERT INTO `db_商品` VALUES (25, 106, '奔驰', '250000', '6');
INSERT INTO `db_商品` VALUES (26, 106, '路虎', '300000', '9');
-- ----------------------------
-- Table structure for db_商品类别
-- ----------------------------
DROP TABLE IF EXISTS `db_商品类别`;
CREATE TABLE `db_商品类别` (
`商品类别编号` int(0) NOT NULL AUTO_INCREMENT,
`商品类别` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
PRIMARY KEY (`商品类别编号`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 106 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of db_商品类别
-- ----------------------------
INSERT INTO `db_商品类别` VALUES (101, '儿童类');
INSERT INTO `db_商品类别` VALUES (102, '生活类');
INSERT INTO `db_商品类别` VALUES (103, '食品类');
INSERT INTO `db_商品类别` VALUES (104, '乳品类');
INSERT INTO `db_商品类别` VALUES (105, '家具类');
INSERT INTO `db_商品类别` VALUES (106, '交通类');
-- ----------------------------
-- Table structure for db_采购单
-- ----------------------------
DROP TABLE IF EXISTS `db_采购单`;
CREATE TABLE `db_采购单` (
`idNum` int(0) NOT NULL AUTO_INCREMENT,
`id` int(0) NOT NULL,
`购买商品种类` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
`商品类别编号` int(0) NULL DEFAULT NULL,
`购买商品名称` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
`购买商品数量` int(0) NULL DEFAULT NULL,
`商品单价` int(0) NULL DEFAULT NULL,
`总金额` int(0) NULL DEFAULT NULL,
PRIMARY KEY (`idNum`) USING BTREE,
INDEX `id`(`id`) USING BTREE,
INDEX `商品类别编号`(`商品类别编号`) USING BTREE,
CONSTRAINT `db_采购单_ibfk_1` FOREIGN KEY (`id`) REFERENCES `deptmanager` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
CONSTRAINT `db_采购单_ibfk_2` FOREIGN KEY (`商品类别编号`) REFERENCES `db_商品类别` (`商品类别编号`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 6 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of db_采购单
-- ----------------------------
INSERT INTO `db_采购单` VALUES (1, 1, '家具类', 105, '桌子', 15, 300, 4500);
INSERT INTO `db_采购单` VALUES (2, 1, '生活类', 102, '毛衣', 5, 10, 50);
INSERT INTO `db_采购单` VALUES (3, 1, '儿童类', 101, '奶粉', 5, 30, 150);
INSERT INTO `db_采购单` VALUES (6, 2, '儿童类', 101, '奶粉', 1, 30, 30);
-- ----------------------------
-- Table structure for db_销售单
-- ----------------------------
DROP TABLE IF EXISTS `db_销售单`;
CREATE TABLE `db_销售单` (
`id` int(0) NOT NULL AUTO_INCREMENT,
`客户编号` int(0) NULL DEFAULT NULL,
`客户账号` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
`商品名称` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
`商品数量` int(0) NULL DEFAULT NULL,
`商品单价` int(0) NULL DEFAULT NULL,
`总金额` int(0) NULL DEFAULT NULL,
`商品类别编号` int(0) NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE,
INDEX `客户编号`(`客户编号`) USING BTREE,
INDEX `商品类别编号`(`商品类别编号`) USING BTREE,
CONSTRAINT `db_销售单_ibfk_1` FOREIGN KEY (`客户编号`) REFERENCES `user_db` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
CONSTRAINT `db_销售单_ibfk_2` FOREIGN KEY (`商品类别编号`) REFERENCES `db_商品类别` (`商品类别编号`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 20 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of db_销售单
-- ----------------------------
INSERT INTO `db_销售单` VALUES (1, 1, '123456789', '奶粉', 1, 90, 90, 101);
INSERT INTO `db_销售单` VALUES (2, 2, '111', '奶粉', 2, 90, 180, 101);
INSERT INTO `db_销售单` VALUES (3, 1, '123456789', '儿童玩具', 4, 65, 260, 101);
INSERT INTO `db_销售单` VALUES (4, 1, '123456789', '尿不湿', 3, 45, 135, 101);
INSERT INTO `db_销售单` VALUES (5, 1, '123456789', '奶瓶', 10, 15, 150, 101);
INSERT INTO `db_销售单` VALUES (6, 1, '123456789', '奶嘴', 1, 3, 3, 101);
INSERT INTO `db_销售单` VALUES (7, 1, '123456789', '奶嘴', 1, 3, 3, 101);
INSERT INTO `db_销售单` VALUES (8, 1, '123456789', '奶嘴', 2, 3, 6, 101);
INSERT INTO `db_销售单` VALUES (9, 1, '123456789', '奶粉', 2, 90, 180, 101);
INSERT INTO `db_销售单` VALUES (10, 1, '123456789', '儿童玩具', 2, 65, 130, 101);
INSERT INTO `db_销售单` VALUES (11, 1, '123456789', '儿童玩具', 3, 65, 195, 101);
INSERT INTO `db_销售单` VALUES (12, 1, '123456789', '儿童玩具', 10, 65, 650, 101);
INSERT INTO `db_销售单` VALUES (13, 1, '123456789', '奶嘴', 1, 3, 3, 101);
INSERT INTO `db_销售单` VALUES (14, 1, '123456789', '奶瓶', 1, 15, 15, 101);
INSERT INTO `db_销售单` VALUES (15, 1, '123456789', '桌子', 1, 200, 200, 105);
INSERT INTO `db_销售单` VALUES (16, 1, '123456789', '奶嘴', 1, 3, 3, 101);
INSERT INTO `db_销售单` VALUES (17, 1, '123456789', '奶粉', 5, 90, 450, 101);
INSERT INTO `db_销售单` VALUES (18, 1, '123456789', '奶瓶', 20, 15, 300, 101);
INSERT INTO `db_销售单` VALUES (19, 1, '123456789', '奶瓶', 20, 15, 300, 101);
INSERT INTO `db_销售单` VALUES (20, 1, '123456789', '牙膏', 1, 25, 25, 102);
-- ----------------------------
-- Table structure for deptmanager
-- ----------------------------
DROP TABLE IF EXISTS `deptmanager`;
CREATE TABLE `deptmanager` (
`id` int(0) NOT NULL AUTO_INCREMENT,
`userName` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
`password` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of deptmanager
-- ----------------------------
INSERT INTO `deptmanager` VALUES (1, '111', '121');
INSERT INTO `deptmanager` VALUES (2, 'admin', '123456');
INSERT INTO `deptmanager` VALUES (3, '1234', '4321');
-- ----------------------------
-- Table structure for user_db
-- ----------------------------
DROP TABLE IF EXISTS `user_db`;
CREATE TABLE `user_db` (
`id` int(0) NOT NULL AUTO_INCREMENT,
`userName` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
`password` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Records of user_db
-- ----------------------------
INSERT INTO `user_db` VALUES (1, '123456789', 'abcd');
INSERT INTO `user_db` VALUES (2, '111', '111');
INSERT INTO `user_db` VALUES (3, '1122', '1122');
SET FOREIGN_KEY_CHECKS = 1;
Java+Swing实现学生选课管理系统
Java+Swing实现学校教务管理系统
Java+Swing+sqlserver学生成绩管理系统
Java+Swing用户信息管理系统
Java+Swing实现的五子棋游戏
基于JavaSwing 银行管理系统
Java+Swing+mysql仿QQ聊天工具
Java+Swing 聊天室
Java+Swing+dat文件存储实现学生选课管理系统
Java+Swing可视化图像处理软件
Java+Swing学生信息管理系统
Java+Swing图书管理系统
Java+Swing图书管理系统2.0
基于java+swing+mysql图书管理系统3.0
大作业-基于java+swing+mysql北方传统民居信息管理系统
点击下载
基于Eclipse+Java+Swing+Mysql实现进销存管理系统