基于oracle的网上图书销售系统数据库设计内容摘要:

nextents 1 16 maxextents 99 17 pctincrease 0) 18 tablespace hyuser。 表已创建。 SQL select * from books。 BOOKID BOOKNAME CATEGORY AMOUNT LEFT_AMOUNT ISDISCOUNT PRICE DISCOUNTPRICE AUTHOR PUBLISH PUBLISHDATE 00011 Oracle10g 数据库 计算机 48 40 0 25 25 肖龙文 清华大学出版社 00012 Oracle10g 实践 计算机 23 21 0 13 13 杨欣 清华大学出版社 00022 王长喜英语六级 英语 23 21 0 13 13 杨欣 清华大学出版社 00123 王长喜英语四级 英语 23 21 0 13 13 杨欣 清华大学出版社 00453 英语六级作文 英语 18 16 0 18 18 杨欣 清华大学出版社 00233 物理工程学 物理 18 16 0 18 18 杨欣 清华大学出版社 00435 英语六级突破 英语六级 18 16 0 18 18 杨欣 清华大学出版社 已选择 7 行。 (4)图书种类数据表 (category) 字段名 数据类型 宽度 允许空值 主键 备注 1 categoryID Varchar2 10 ﹡ 图书种类 编号 2 category Varchar2 20 图书种类 SQL CREATE TABLE category( 2 categoryID VARCHAR2(10) PRIMARY KEY, 3 category VARCHAR2(20) NOT NULL 4 ) 5 storage(initial 100k 6 next 20k 7 minextents 1 8 maxextents 99 9 pctincrease 0) 10 tablespace hyuser。 表已创建。 Insert into category(categoryID,category)values(39。 0000139。 ,39。 计算机 39。 )。 Insert into category(categoryID,category)values(39。 0000239。 ,39。 数学 39。 )。 Insert into category(categoryID,category)values(39。 0000339。 ,39。 英语六级 39。 )。 Insert into category(categoryID,category)values(39。 0000439。 ,39。 英语四级 39。 )。 Insert into category(categoryID,category)values(39。 0000539。 ,39。 土木工程 39。 )。 Insert into category(categoryID,category)values(39。 0000639。 ,39。 物理 39。 )。 Insert into category(categoryID,category)values(39。 0000739。 ,39。 医学 39。 )。 Insert into category(categoryID,category)values(39。 0000839。 ,39。 美术 39。 )。 Insert into category(categoryID,category)values(39。 0000939。 ,39。 音乐 39。 )。 Insert into category(categoryID,category)values(39。 0001039。 ,39。 化学 39。 )。 Insert into category(categoryID,category)values(39。 0001139。 ,39。 生物学 39。 )。 SQL select * from category。 CATEGORYID CATEGORY 00001 计算机 00002 数学 00003 英语六级 00004 英语四级 00005 土木工程 00006 物理 00007 医学 00008 美术 00009 音乐 00010 化学 00010 化学 00011 生物学 已选择 11 行。 ( 5) 订单列表数据表( orders) 字段名 数据类型 大小 允许空值 主键 备 注 1 ID Varchar2 10 ﹡ 主键 2 orderID Varchar2 10 订单 编号 3 bookID Varchar2 10 图书 编号 4 amount int 购买数量 SQL CREATE TABLE allorders( 2 ID VARCHAR2(10) PRIMARY KEY, 3 orderID VARCHAR2(10) not null, 4 bookID VARCHAR2(10) not null, 5 amount int not null 6 ) 7 storage(initial 100k 8 next 20k 9 minextents 1 10 maxextents 99 11 pctincrease 0) 12 tablespace hyuser。 Insert into orders(orderID,bookID,amount)values(39。 0001239。 ,39。 0323039。 ,3)。 Insert into orders(orderID,bookID,amount)values(39。 0034439。 ,39。 0323239。 ,2)。 Insert into orders(orderID,bookID,amount)values(39。 0434339。 ,39。 0434339。 ,1)。 Insert into orders(orderID,bookID,amount)values(39。 0232339。 ,39。 0324239。 ,3)。 Insert into orders(orderID,bookID,amount)values(39。 0055139。 ,39。 0442039。 ,5)。 Insert into orders(orderID,bookID,amount)values(39。 4430139。 ,39。 4553039。 ,4)。 SQL select * from orders。 ID ORDERID BOOKID AMOUNT 00001 00001 02920 1 00322 00012 03230 3 00342 00344 03232 2 004343 04343 04343 1 00435 00551 04420 5 044331 44301 45530 4 004333 04343 04343 1 已选择 7 行。 ( 6) 订单信息数据表 (order_list) 字段名 数据类型 大小 允许空 值 主键 备注 1 orderID Varchar2 10 ﹡ 订单 编号 2 bookID Varchar2 10 图书 编号 3 amount int 图书数量 4 Price float 10 图书价钱 5 userName Varchar2 20 用户名 6 isDone int ﹡ 是否完成 7 ordertime Date 订单 时间 8 remark Varchar2 50 ﹡ 处理情况 注: isDone:0 表示未完成的订单, 1 表示已完成的订单。 SQL CREATE TABLE order_list(orderID VARCHAR2(10) PRIMARY KEY, 2 bookID VARCHAR2(10) not null, 3 Amount int not null, 4 Price float(10) not null, 5 userName varchar2(30) not null, 6 isDone int default 0, 7 ordertime Date, 8 remark varchar2(50) 9 ) 10 storage(initial 100k 11 next 20k 12 minextents 1 13 maxextents 99 14 pctincrease 0) 15 tablespace hyuser。 表已创建。 SQL select * from order_list。 ORDERID BOOKID AMOUNT PRICE USERNAME ISDONE ORDERTIME REMARK 044331 44301 4 12 miss 0 142月 12 meiyou 012345 44444 4 3。
阅读剩余 0%
本站所有文章资讯、展示的图片素材等内容均为注册用户上传(部分报媒/平媒内容转载自网络合作媒体),仅供学习参考。 用户通过本站上传、发布的任何内容的知识产权归属用户或原始著作权人所有。如有侵犯您的版权,请联系我们反馈本站将在三个工作日内改正。