create database ebook;
use ebook;
drop table if exists book;
drop table if exists customer;
drop table if exists order_detail;
drop table if exists orders;
/*==============================================================*/
/* Table: book */
/*==============================================================*/
create table book
(
id int not null auto_increment,
title varchar(50) not null,
author varchar(50) not null,
publisher varchar(100) not null,
type char(1) not null,
description text,
image_url varchar(50) not null,
price decimal(8,2) not null,
primary key (id)
);
/*==============================================================*/
/* Table: customer */
/*==============================================================*/
create table customer
(
id int not null auto_increment,
name varchar(50) not null unique,
password varchar(50) not null ,
sex char(1) not null,
email varchar(100) not null unique,
phone varchar(30),
address varchar(200) not null,
question varchar(100),
answer varchar(100),
primary key (id)
);
/*==============================================================*/
/* Table: order_detail */
/*==============================================================*/
create table order_detail
(
book_id int not null,
order_id int not null,
quantity int not null,
unit_price decimal(8,2) not null,
primary key (book_id, order_id)
);
/*==============================================================*/
/* Table: orders */
/*==============================================================*/
create table orders
(
id int not null auto_increment,
customer_id int not null,
order_number varchar(25) not null,
total_price decimal(8,2) not null,
status char(1) not null,
created_at timestamp not null,
primary key (id)
);
alter table order_detail add constraint FK_Relationship_1 foreign key (book_id)
references book (id) on delete restrict on update restrict;
alter table order_detail add constraint FK_Relationship_2 foreign key (order_id)
references orders (id) on delete restrict on update restrict;
alter table orders add constraint FK_Relationship_3 foreign key (customer_id)
references customer (id) on delete restrict on update restrict;
/*==============================================================*/
/* Insert table:book */
/*==============================================================*/
INSERT INTO `book` (`title`,`author`,`publisher`,`type`,`description`,`image_url`,`price`) VALUES ('时空穿行','沉默的谎言','工业出版社','2','1989—1991年,笔者在留美写作《金翼》的学术性续本《银翅》期间,有机会关注20世纪上半叶由外国...','bookcover/101.jpg',46);
INSERT INTO `book` (`title`,`author`,`publisher`,`type`,`description`,`image_url`,`price`) VALUES ('感悟','大尉','内蒙古出版社','2','总有一种力量将我们支撑 总有一种爱让我们心痛 &nb...','bookcover/102.jpg',56);
INSERT INTO `book` (`title`,`author`,`publisher`,`type`,`description`,`image_url`,`price`) VALUES ('赢在影响力','卡耐基','社会出版社','2','《赢在影响力:人际交往的学问》是卡耐基《人性的弱点》21世纪特别修订版。本书创造了全球出版史上空前的...','bookcover/103.jpg',34);
INSERT INTO `book` (`title`,`author`,`publisher`,`type`,`description`,`image_url`,`price`) VALUES ('学会宽容','学会沉默','人民出版社','2','宽容是智慧,是力量。宽容是爱,是体谅。宽容是福…… ...\r\n宽容是智慧,是力量。宽容是爱,是体谅。宽容是福……','bookcover/107.jpg',56);
INSERT INTO `book` (`title`,`author`,`publisher`,`type`,`description`,`image_url`,`price`) VALUES ('别做正常的傻瓜','雪儿','大学出版社','2','我们每天都在做决策,大到几千万的战略投资,小到买什么...\r\n','bookcover/106.jpg',78);
INSERT INTO `book` (`title`,`author`,`publisher`,`type`,`description`,`image_url`,`price`) VALUES ('平面港之CI设计','成朝晖','中国美术学院出版社 ','1','企业的生命体处于社会结构中,就如同人类处于自然间一样,具有生老病死之周期演变。而人类的活动、思维所残留下的印象烙印在同类团体中,却可以一代代的传达延续','bookcover/TS5.jpg',18);
INSERT INTO `book` (`title`,`author`,`publisher`,`type`,`description`,`image_url`,`price`) VALUES ('数据结构——习题、实验','朱建芳 ','机械工业出版社','1',' 本书是与李新燕和靳敏编的《数据结构》一书配套的辅助教材,亦可单独使用。本书的编写目的是使学生通过实验、课程设计和大量的习题解答加深对数据结构基本知识的理解,掌握求解数据结构问题的思路和方法,提高应用数据结构解决实际问题的能力。','bookcover/TS11.jpg',58);
INSERT INTO `book` (`title`,`author`,`publisher`,`type`,`description`,`image_url`,`price`) VALUES ('计算机组装与维护教程','袁启昌','机械工业出版社','1',' 本书重点介绍了微机组装技术和系统维护技术。全书以当今最流行的微型计算机为基础,详细介绍各种流行配件的技术指标、特性、技术参数,使用、选购、组装以及常用维护技术,内容包括:微型计算机概述、CPU、主板、内存、外存 、输入设备、输出设备、其他设备、多媒体计算机组装、BIOS设置、系统软件的安装、Windows注册表的应用与维护,最后讲述了微型计算机及外设的故障排除与维修技术。','bookcover/TS12.jpg',38);
INSERT INTO `book` (`title`,`author`,`publisher`,`type`,`description`,`image_url`,`price`) VALUES ('网管员必备宝典——Red Hat Enterprise Linux 4.0 网络','王文寿','清华大学出版社\r\n','1','本书主要介绍网络基础知识及系统管理,接着重点介绍Red Hat Enterprise Linux下各种服务器如DHCP、DNS、NFS、Samba、FTP、WWW、Mail、Proxy、MySQL和PostgreSQL等的配置和管理,Linux下的系统与网络安全......','bookcover/TS13.jpg',49);
INSERT INTO `book` (`title`,`author`,`publisher`,`type`,`description`,`image_url`,`price`) VALUES ('嵌入式Linux系统开发技术详解-基于ARM ','孙纪坤,张小全','人民邮电出版社','1',' 本书以嵌入式Linux系统开发流程为主线,剖析了嵌入式Linux系统构建的各个环节。本书从嵌入式系统基础知识和Linux编程技术讲起,接下来说明了嵌入式Linux交叉开发环境的建立,然后分析了嵌入式Linux系统的引导程序、内核和文件系统三大组成部分,最后介绍了嵌入式Linux系统集成和部署的方法。','bookcover/TS14.jpg',34);
INSERT INTO `book` (`title`,`author`,`publisher`,`type`,`description`,`image_url`,`price`) VALUES ('大勇和小花的欧洲日记','薛勇,林若岚','湖南教育出版社','2','《大勇和小花的欧洲日记》串起了欧洲文明的溯源之旅。从屹立在近现代艺术之巅的巴黎拾级而下,依次是蓬皮杜博物馆(现代艺术)、奥塞博物馆(印象派艺术)、卢浮宫博物馆(古典主义)','bookcover/bookcover.jpg',31);
INSERT INTO `book` (`title`,`author`,`publisher`,`type`,`description`,`image_url`,`price`) VALUES ('杜拉拉升职记','杜拉拉','电子工业出版社','2','她的故事比比尔盖茨更吸引人...','bookcover/dulala.jpg',29);
INSERT INTO `book` (`title`,`author`,`publisher`,`type`,`description`,`image_url`,`price`) VALUES ('java 2入门经典','JDK5','人民邮电出版社','1','一部java经典...','bookcover/java2.jpg',88);
INSERT INTO `book` (`title`,`author`,`publisher`,`type`,`description`,`image_url`,`price`) VALUES ('中国国家地理','FINI','电子工业出版社','3','描述了中国地理更多不为人知的秘密...','bookcover/ngcn.jpg',67);
INSERT INTO `book` (`title`,`author`,`publisher`,`type`,`description`,`image_url`,`price`) VALUES ('摄影教材','Fini','电子工业出版社','3','来自美国纽约摄影学院的专业摄影教材.','bookcover/photog.jpg',72);
INSERT INTO `book` (`title`,`author`,`publisher`,`type`,`description`,`image_url`,`price`) VALUES ('搭地铁,玩上海','Subway','人民教育出版社','2','上海的地铁,地铁的上海...','bookcover/subwayinshanghai.jpg',68);
INSERT INTO `book` (`title`,`author`,`publisher`,`type`,`description`,`image_url`,`price`) VALUES
jsp+JavaBean做的网上购物系统
4星 · 超过85%的资源 需积分: 10 191 浏览量
2009-09-21
20:12:55
上传
评论 2
收藏 2.26MB RAR 举报
weiwei358
- 粉丝: 2
- 资源: 5
最新资源
- chromedriver-linux64.zip 是一个用于在 Linux 系统上运行 Chrome 浏览器的驱动程序
- 基于Python和PyTorch框架完成的一个手写数字识别实验源码(带MINIST手写数字数据集)+详细注释(高分项目)
- 基于Matlab在MNIST数据集上利用CNN完成手写体数字识别任务,并实现单层CNN反向传播算法+源代码+文档说明(高分项目)
- NVIDIA驱动、CUDA和Pytorch及其依赖
- html动态爱心代码一(附源码)
- c40539bc-071a-486c-9d52-9d0c18d62dac 4.html
- 基于物理的非视域成像(NLOS)算法,利用了nerf+python源码+文档说明
- yuluer知更鸟.7z(1).001
- python课程设计-基于tensorflow实现的图文生成程序,数据集flickr30k-images+源代码+文档说明+截图
- python作业-基于Flickr30k数据集实现图像文本跨模态搜索python源码+数据集+测试界面+项目说明(高分课程设计)
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈