From dc9183563aceb3acbbea3670628b47da5d017b5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=82=96=E9=A3=9E=E9=B9=8F?= <2879562915@qq.com> Date: Fri, 13 Sep 2024 12:09:30 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...345\272\223\350\256\276\350\256\241(1).md" | 58 +++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 "\350\202\226\351\243\236\351\271\217/20240912\347\275\221\344\270\212\344\271\246\345\272\227\347\256\241\347\220\206\347\263\273\347\273\237\347\232\204\346\225\260\346\215\256\345\272\223\350\256\276\350\256\241(1).md" diff --git "a/\350\202\226\351\243\236\351\271\217/20240912\347\275\221\344\270\212\344\271\246\345\272\227\347\256\241\347\220\206\347\263\273\347\273\237\347\232\204\346\225\260\346\215\256\345\272\223\350\256\276\350\256\241(1).md" "b/\350\202\226\351\243\236\351\271\217/20240912\347\275\221\344\270\212\344\271\246\345\272\227\347\256\241\347\220\206\347\263\273\347\273\237\347\232\204\346\225\260\346\215\256\345\272\223\350\256\276\350\256\241(1).md" new file mode 100644 index 0000000..6b78ac6 --- /dev/null +++ "b/\350\202\226\351\243\236\351\271\217/20240912\347\275\221\344\270\212\344\271\246\345\272\227\347\256\241\347\220\206\347\263\273\347\273\237\347\232\204\346\225\260\346\215\256\345\272\223\350\256\276\350\256\241(1).md" @@ -0,0 +1,58 @@ +# 网上书店管理系统的数据库设计 + +1. 实体: + 1. 分类 + 1. 分类编号 + 2. 分类名称 + + 2. 图书: + 1. 图书编号 + 2. 价格 + 3. 书名 + 4. 出版社 + 5. 作者 + 6. 出版日期 + 7. 版次 + 8. ISBN书号 + 9. 封面图片 + 10. 包装 + 11. 纸张 + 12. 图书详情 + + 3. 出版社 + 1. 出版社编号 + 2. 出版社名称 + 3. 地址:先故意违反第一范式 + 4. 电话 + + 4. 作者 + 1. 作者编号 + 2. 作者姓名 + 3. 性别 + 4. 生日 + 5. 图片 + 6. 作者简介 + + 5. 书店 + + 6. 用户 + + 7. 图片 + + 8. 订单 + + 9. 库存 + + 10. 销售 + + 11. 地址 + 1. 地址编号 + + + +![image-20240913110722606](https://gitee.com/feibang_1_0/xiao-feipengs-picture-bed/raw/master/img/upgit_20240913_1726196842.png) + + + + + -- Gitee From f3f33b604fee1f66ae1bcab393c0fee65e177707 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=82=96=E9=A3=9E=E9=B9=8F?= <2879562915@qq.com> Date: Fri, 13 Sep 2024 18:09:07 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...345\272\223\350\256\276\350\256\241(2).md" | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 "\350\202\226\351\243\236\351\271\217/20240913\347\275\221\344\270\212\344\271\246\345\272\227\347\256\241\347\220\206\347\263\273\347\273\237\346\225\260\346\215\256\345\272\223\350\256\276\350\256\241(2).md" diff --git "a/\350\202\226\351\243\236\351\271\217/20240913\347\275\221\344\270\212\344\271\246\345\272\227\347\256\241\347\220\206\347\263\273\347\273\237\346\225\260\346\215\256\345\272\223\350\256\276\350\256\241(2).md" "b/\350\202\226\351\243\236\351\271\217/20240913\347\275\221\344\270\212\344\271\246\345\272\227\347\256\241\347\220\206\347\263\273\347\273\237\346\225\260\346\215\256\345\272\223\350\256\276\350\256\241(2).md" new file mode 100644 index 0000000..ee1cf3e --- /dev/null +++ "b/\350\202\226\351\243\236\351\271\217/20240913\347\275\221\344\270\212\344\271\246\345\272\227\347\256\241\347\220\206\347\263\273\347\273\237\346\225\260\346\215\256\345\272\223\350\256\276\350\256\241(2).md" @@ -0,0 +1,52 @@ +# 课堂笔记 + +完善网上书点管理系统,整理表格及其关系。 + +# 作业 + +表格 + +| 分类表 | | | | | | | | 图书表 | | | | | | | | | | | +| ---------- | -------- | -------------- | -------------- | -------- | ----------------------------- | ---- | ---------- | ------ | ---------- | ---------- | ---------- | ---------- | ---------------- | -------- | ------------ | -------------- | -------- | -------- | +| 分类编号 | 分类名称 | | | | | | | | 图书编号 | 书名 | 定价 | 作者(编号) | 出版日期 | ISBN书号 | 出版社(编号) | 分类(编号) | | | +| 1 | 科技 | | | | | | | | 1 | 三国演义 | 777 | | 2021年11月 | 11111 | 1 | 2 | | | +| 2 | 励志 | | | | | | | | 2 | 西游记 | 888 | | 2020年12月 | 22222 | 2 | 1 | | | +| 3 | 教育 | | | | | | | | 3 | 红楼梦 | 999 | | 2008年8月 | 33333 | 3 | 3 | | | +| | | | | | | | | | | | | | | | | | | | +| | | | | | | | | | | | | | | | | | | | +| | | | | | | | | | | | | | | | | | | | +| | | | | | | | | | | | | | | | | | | | +| | | | | | | | | | | | | | | | | | | | +| | | | | | | | | | | | | | | | | | | | +| 作者 | | | | | 出版社 | | | | | | | | | | | | | | +| 作者编号 | 作者姓名 | 性别 | 作者简介 | 作者图像 | | | | | 出版社编号 | 出版社名称 | 地址(编号) | 联系电话 | | | | | | | +| 1 | 叶叶功 | 女 | 帅气女 | 1 | | | | | 1 | 闽大出版社 | 1 | 9999 | | | | | | | +| 2 | 卢卢比 | 男 | 装杯哥 | 3 | | | | | 2 | 深大出版社 | 2 | 8888 | | | | | | | +| 3 | 菜菜韦 | 男 | 小孩哥 | 2 | | | | | 3 | 南大出版社 | 3 | 7777 | | | | | | | +| | | | | | | | | | | | | | | | | | | | +| | | | | | | | | | | | | | | | | | | | +| | | | | | | | | | | | | | | | | | | | +| 用户信息表 | | 省信息表 | | | 市信息表 | | 区信息表 | | | | | | | | | | | | +| 用户编号 | 账号 | 密码 | 头像 | 电话 | 邮箱 | 角色 | 地址(编号) | | 省份编号 | 省份名称 | | | 城市编号 | 城市名称 | | 区县编号 | 区县名称 | | +| 1 | aaaa | 1111 | 5 | 12345 | [11@qq.com](mailto:11@qq.com) | 3 | 2 | | 1 | 福建省 | | | 1 | 龙岩 | | 1 | 新罗区 | | +| 2 | bbbb | 2222 | 6 | 23456 | [22@qq.com](mailto:22@qq.com) | 2 | 3 | | 2 | 广东省 | | | 2 | 深圳 | | 2 | 宝安区 | | +| 3 | cccc | 3333 | 7 | 34567 | [33@qq.com](mailto:33@qq.com) | 1 | 1 | | 3 | 江西省 | | | 3 | 南昌 | | 3 | 青山湖区 | | +| | | | | | | | | | | | | | | | | | | | +| | | | | | | | | | | | | | | | | | | | +| | | | | | | | | | | | | | | | | | | | +| | | | | | | | | | | | | | | | | | | | +| 订单信息表 | | | 具体地址信息表 | | 图像表 | | | | | | | | | | | | | | +| 订单编号 | | 订单地址(编号) | 用户编号 | 图书编号 | 数量 | 价格 | | | 地址编号 | 省份编号 | 城市编号 | 区县编号 | 具体地址 | | 图像编号 | 图像路径 | 用户编号 | 作者编号 | +| 1 | | 3 | 2 | 1 | 1 | 1000 | | | 1 | 1 | 1 | 1 | 闽大团结里14号楼 | | 1 | book/001.jpg | | 1 | +| 2 | | 1 | 3 | 2 | 4 | 3000 | | | 2 | 2 | 2 | 2 | 富源工业区旁 | | 2 | head/101.jpg | | 3 | +| 3 | | 2 | 1 | 3 | 2 | 1500 | | | 3 | 3 | 3 | 3 | 火炬广场旁 | | 3 | author/201.jpg | | 2 | +| | | | | | | | | | | | | | | | 4 | head/102.jpg | | | +| | | | | | | | | | | | | | | | 5 | head/103.jpg | 1 | | +| | | | | | | | | | | | | | | | 6 | head/104.jpg | 2 | | +| | | | | | | | | | | | | | | | 7 | head/105.jpg | 3 | | +| | | | | | | | | | | | | | | | | | | | +| 角色信息表 | | 权限表 | | | | | 评论信息表 | | | | | | | | | | | | +| 角色编号 | 角色名称 | | 权限编号 | 权限名称 | | | | | 评论编号 | 评论内容 | 图书编号 | 用户编号 | | | | | | | +| 1 | 普通会员 | | 1 | 购买 | | | | | 1 | 788 | 1 | 2 | | | | | | | +| 2 | 尊贵会员 | | 2 | 查看 | | | | | 2 | 777 | 2 | 1 | | | | | | | +| 3 | 超级会员 | | 3 | 添加 | | | | | 3 | 666 | 3 | 3 | | | | | | | \ No newline at end of file -- Gitee From 6baa65f18a8ce0e3c5a910859647d703a6055548 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=82=96=E9=A3=9E=E9=B9=8F?= <2879562915@qq.com> Date: Sat, 14 Sep 2024 20:15:27 +0800 Subject: [PATCH 3/3] tijiao --- ...345\272\223\350\256\276\350\256\241(3).md" | 293 ++++++++++++++++++ 1 file changed, 293 insertions(+) create mode 100644 "\350\202\226\351\243\236\351\271\217/20240913\347\275\221\344\270\212\344\271\246\345\272\227\347\256\241\347\220\206\347\263\273\347\273\237\346\225\260\346\215\256\345\272\223\350\256\276\350\256\241(3).md" diff --git "a/\350\202\226\351\243\236\351\271\217/20240913\347\275\221\344\270\212\344\271\246\345\272\227\347\256\241\347\220\206\347\263\273\347\273\237\346\225\260\346\215\256\345\272\223\350\256\276\350\256\241(3).md" "b/\350\202\226\351\243\236\351\271\217/20240913\347\275\221\344\270\212\344\271\246\345\272\227\347\256\241\347\220\206\347\263\273\347\273\237\346\225\260\346\215\256\345\272\223\350\256\276\350\256\241(3).md" new file mode 100644 index 0000000..4486599 --- /dev/null +++ "b/\350\202\226\351\243\236\351\271\217/20240913\347\275\221\344\270\212\344\271\246\345\272\227\347\256\241\347\220\206\347\263\273\347\273\237\346\225\260\346\215\256\345\272\223\350\256\276\350\256\241(3).md" @@ -0,0 +1,293 @@ +# 日记 + +马上中秋了 + +# 课堂笔记 + +运用ai进行网上书店的数据库设计 + +1.如何准确让ai识别关键字并做出对应行动 + +2.如何去训练ai并让其满足我们的需求 + +# 作业 + +三个模型 + +1.CDM + +![image-20240914103028083](https://gitee.com/feibang_1_0/xiao-feipengs-picture-bed/raw/master/img/upgit_20240914_1726281028.png) + +2.LDM + +![image-20240914103056836](https://gitee.com/feibang_1_0/xiao-feipengs-picture-bed/raw/master/img/upgit_20240914_1726281056.png) + +3.PDM + +![image-20240914103152890](https://gitee.com/feibang_1_0/xiao-feipengs-picture-bed/raw/master/img/upgit_20240914_1726281113.png) + +SQL语句及插入数据 + +```sql +CREATE DATABASE if not EXISTS shop_db; +USE shop_db; + +/*==============================================================*/ +/* DBMS name: MySQL 5.0 */ +/* Created on: 2024-09-14 10:21:41 */ +/*==============================================================*/ + + +drop table if exists address; + +drop table if exists area; + +drop table if exists author; + +drop table if exists book; + +drop table if exists category; + +drop table if exists city; + +drop table if exists man_book; + +drop table if exists management; + +drop table if exists order01; + +drop table if exists pitcure; + +drop table if exists publisher; + +drop table if exists role; + +drop table if exists role_man; + +drop table if exists sheng; + +drop table if exists user; + +/*==============================================================*/ +/* Table: address */ +/*==============================================================*/ +create table address +( + address_id int not null, + sheng_id int not null, + city_id int not null, + area_id int not null, + address_detail varchar(255), + primary key (address_id) +); + +/*==============================================================*/ +/* Table: area */ +/*==============================================================*/ +create table area +( + area_id int not null, + area_name varchar(255), + primary key (area_id) +); + +/*==============================================================*/ +/* Table: author */ +/*==============================================================*/ +create table author +( + autohr_id int not null, + author_name varchar(255), + gender int, + author_detail varchar(255), + primary key (autohr_id) +); + +/*==============================================================*/ +/* Table: book */ +/*==============================================================*/ +create table book +( + book_id int not null, + cate_id int not null, + publisher_id int not null, + autohr_id int not null, + book_name varchar(255), + price_r int, + ISBN int, + publish_date varchar(255), + primary key (book_id) +); + +/*==============================================================*/ +/* Table: category */ +/*==============================================================*/ +create table category +( + cate_id int not null, + cate_name varchar(255), + primary key (cate_id) +); + +/*==============================================================*/ +/* Table: city */ +/*==============================================================*/ +create table city +( + city_id int not null, + city_name varchar(255), + primary key (city_id) +); + +/*==============================================================*/ +/* Table: man_book */ +/*==============================================================*/ +create table man_book +( + book_id int not null, + management_id int not null, + primary key (book_id, management_id) +); + +/*==============================================================*/ +/* Table: management */ +/*==============================================================*/ +create table management +( + management_id int not null, + management_name varchar(255), + primary key (management_id) +); + +/*==============================================================*/ +/* Table: "order" */ +/*==============================================================*/ +create table order01 +( + order_id int not null, + address_id int not null, + user_id int not null, + book_id int not null, + order_num int, + order_price int, + primary key (order_id) +); + +/*==============================================================*/ +/* Table: pitcure */ +/*==============================================================*/ +create table pitcure +( + pitcure_id int not null, + book_id int not null, + autohr_id int not null, + pitcure_path varchar(255), + primary key (pitcure_id) +); + +/*==============================================================*/ +/* Table: publisher */ +/*==============================================================*/ +create table publisher +( + publisher_id int not null, + publisher_name varchar(255), + publisher_phone int, + primary key (publisher_id) +); + +/*==============================================================*/ +/* Table: role */ +/*==============================================================*/ +create table role +( + role_id int not null, + role_name varchar(255), + primary key (role_id) +); + +/*==============================================================*/ +/* Table: role_man */ +/*==============================================================*/ +create table role_man +( + management_id int not null, + role_id int not null, + primary key (management_id, role_id) +); + +/*==============================================================*/ +/* Table: sheng */ +/*==============================================================*/ +create table sheng +( + sheng_id int not null, + sheng_name varchar(255), + primary key (sheng_id) +); + +/*==============================================================*/ +/* Table: user */ +/*==============================================================*/ +create table user +( + user_id int not null, + role_id int not null, + user_name varchar(255), + user_account int, + user_pwd int, + user_phone int, + primary key (user_id) +); + +alter table address add constraint FK_Relationship_1 foreign key (sheng_id) + references sheng (sheng_id) on delete restrict on update restrict; + +alter table address add constraint FK_Relationship_2 foreign key (city_id) + references city (city_id) on delete restrict on update restrict; + +alter table address add constraint FK_Relationship_3 foreign key (area_id) + references area (area_id) on delete restrict on update restrict; + +alter table book add constraint FK_Relationship_7 foreign key (cate_id) + references category (cate_id) on delete restrict on update restrict; + +alter table book add constraint FK_Relationship_8 foreign key (publisher_id) + references publisher (publisher_id) on delete restrict on update restrict; + +alter table book add constraint FK_Relationship_9 foreign key (autohr_id) + references author (autohr_id) on delete restrict on update restrict; + +alter table man_book add constraint FK_man_book foreign key (book_id) + references book (book_id) on delete restrict on update restrict; + +alter table man_book add constraint FK_man_book2 foreign key (management_id) + references management (management_id) on delete restrict on update restrict; + +alter table order01 add constraint FK_Relationship_14 foreign key (address_id) + references address (address_id) on delete restrict on update restrict; + +alter table order01 add constraint FK_Relationship_15 foreign key (user_id) + references user (user_id) on delete restrict on update restrict; + +alter table order01 add constraint FK_Relationship_16 foreign key (book_id) + references book (book_id) on delete restrict on update restrict; + +alter table pitcure add constraint FK_Relationship_11 foreign key (book_id) + references book (book_id) on delete restrict on update restrict; + +alter table pitcure add constraint FK_Relationship_13 foreign key (autohr_id) + references author (autohr_id) on delete restrict on update restrict; + +alter table role_man add constraint FK_role_man foreign key (management_id) + references management (management_id) on delete restrict on update restrict; + +alter table role_man add constraint FK_role_man2 foreign key (role_id) + references role (role_id) on delete restrict on update restrict; + +alter table user add constraint FK_Relationship_4 foreign key (role_id) + references role (role_id) on delete restrict on update restrict; + + +``` + -- Gitee