加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
bookstore.sql 4.17 KB
一键复制 编辑 原始数据 按行查看 历史
xuy77 提交于 2020-05-17 22:06 . debug嘤嘤嘤
/*
Navicat Premium Data Transfer
Source Server : localhost_3306
Source Server Type : MySQL
Source Server Version : 80019
Source Host : localhost:3306
Source Schema : bookstore
Target Server Type : MySQL
Target Server Version : 80019
File Encoding : 65001
Date: 17/05/2020 22:05:36
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for book
-- ----------------------------
DROP TABLE IF EXISTS `book`;
CREATE TABLE `book` (
`Bookid` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '0',
`Bname` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
`Descri` text CHARACTER SET utf8 COLLATE utf8_general_ci,
`Author` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '',
`Press` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '' COMMENT '出版社',
`price` double(50, 2) NOT NULL,
`url` varchar(300) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`num` int(0) NOT NULL DEFAULT 0,
PRIMARY KEY (`Bookid`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for chart
-- ----------------------------
DROP TABLE IF EXISTS `chart`;
CREATE TABLE `chart` (
`Userid` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
`Bookid` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`num` int(0) NOT NULL DEFAULT 0,
`status` int(0) NOT NULL DEFAULT 0 COMMENT '0是还未购买,1是已购买',
`Chartid` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`price` double(50, 2) DEFAULT NULL,
PRIMARY KEY (`Chartid`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for deal
-- ----------------------------
DROP TABLE IF EXISTS `deal`;
CREATE TABLE `deal` (
`Dealid` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '',
`Dealtime` datetime(0) NOT NULL ON UPDATE CURRENT_TIMESTAMP(0),
`Bookid` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`Userid` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`Comment` text CHARACTER SET utf8 COLLATE utf8_general_ci,
`CommentTime` datetime(0) DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP(0),
`Money` double(50, 2) NOT NULL DEFAULT 0.00,
`state` int(0) NOT NULL DEFAULT 0,
PRIMARY KEY (`Dealid`) USING BTREE,
INDEX `Book_Deal`(`Bookid`) USING BTREE,
INDEX `User_Deal`(`Userid`) USING BTREE,
CONSTRAINT `Book_Deal` FOREIGN KEY (`Bookid`) REFERENCES `book` (`Bookid`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `User_Deal` FOREIGN KEY (`Userid`) REFERENCES `user` (`userid`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for manager
-- ----------------------------
DROP TABLE IF EXISTS `manager`;
CREATE TABLE `manager` (
`Manaid` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`Mpassword` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`Mname` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
PRIMARY KEY (`Manaid`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for user
-- ----------------------------
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
`userid` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '0',
`password` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`gender` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`telephone` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`username` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`email` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
PRIMARY KEY (`userid`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
SET FOREIGN_KEY_CHECKS = 1;
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化