使用python3,PyQt5,MySQL数据库搭建
主要功能:
- 用户注册、登录、修改密码、用户管理
- 存储图书信息、采购增加和淘汰删除功能、租借功能
- 实现图书采购、淘汰、租借功能。
- 实现查询图书信息、采购和淘汰、库存、和租借情况
- 实现统计图书的采购、库存、淘汰、租借情况
主要界面(完整代码在最后):
部分代码(MySQL数据库设计代码)
DROP TABLE IF EXISTS `user_book`;
CREATE TABLE `user_book` (
`StudentId` char(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,
`BookId` char(6) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,
`BorrowTime` date NULL DEFAULT NULL,
`ReturnTime` date NULL DEFAULT NULL,
`BorrowState` bit(1) NULL DEFAULT b'0'
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = DYNAMIC;
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for book
-- ----------------------------
DROP TABLE IF EXISTS `book`;
CREATE TABLE `book` (
`BookName` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,
`BookId` char(6) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,
`Auth` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,
`Category` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
`Publisher` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
`PublishTime` date NULL DEFAULT NULL,
`NumStorage` int NULL DEFAULT 0,
`NumCanBorrow` int NULL DEFAULT 0,
`NumBorrowed` int NULL DEFAULT 0
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = DYNAMIC;
完整代码:Python 图书馆管理系统(MySQL数据库) 有GUI界面