攀枝花学院本科课程设计报告(论文)
CustomerQues CustomerAnswer CustomerLogTime 提示问题 问题答案 登陆次数 varchar(200) varchar(200) int datetime not null not null CustomerLastLogT 最近登陆时间 (2) 图书类型信息表tb_booktypeinfo 表2 图书类型信息表
列名 BookTypeId 说明 图书类型编号 数据类型 int varchar(50) 表3 图书信息表
约束 主码(自增字段) not null BookTypeName 类别名称 (3) 图书信息表tb_bookinfo
列名 BookId BookTypeId 说明 图书编号 图书类型 数据类型 int int 约束 主码(自增字段) not null, 引用tb_booktypeinfo的外码 BookName BookPress BookPubDate BookSize BookVersion BookAuthor BookTanslor Bookisbn BookPrice BookPages BookOutline BookCatalog BookMprice BookPrprice 课程名 出版社 出版日期 开本 版次 图书作者 图书译者 图书ISBN 图书定价 图书页码 图书简介 图书目录 市场价 会员价 varchar(20) varchar(20) datetime varchar(10) varchar(10) varchar(10) varchar(10) varchar(20) money int varchar(200) varchar(200) money money int int not null not null not null not null not null not null not null not null not null not null not null not null not null not null not null BookDealmount 成交量 BookLookmount 浏览次数
攀枝花学院本科课程设计报告(论文)
BookDiscount BookPic 折扣 decimal not null not null not null not null not null 图书封面图 varchar(20) datetime varchar(20) 表4 管理员信息表
BookStoremount 图书库存量 int BookStoretime 入库时间 BookPackstyle 封装方式 (4) 管理员信息表tb_manager 列名 AdminId AdminPwd 说明 管理员编号 密码 数据类型 int varchar(10) varchar(20) int 约束 主码(自增字段) not null not null not null AdminName 管理员名称 AdminFlag 权限标志 (5)参数设置信息表tb_parameter(该表是用户配置网站logo、名称、公告等信息的表,是一个独立于其它表的表。)
表5 参数设置信息表
列名 webname regtiaoyue notice address postcode tel copyright weblogo website shopstream postmethod postprice Postdescp worktime service law commques dealrule
说明 网站名 注册条款 公告 地址 邮编 电话号码 版权 网站Logo 网站地址 购物流程 送货方式 送货费用 运输说明 工作时间 售后服务 使用法律 常见问题 交易条款 数据类型 varchar(20) varchar(100) varchar(100) varchar(20) varchar(10) varchar(10) varchar(20) varchar(100) varchar(10) varchar(100) varchar(100) varchar(100) money varchar(100) varchar(20) varchar(100) varchar(100) varchar(100) varchar(100) 约束 主码(自增字段) not null not null not null not null not null not null not null not null not null not null not null not null not null not null not null not null not null not null affordmethod 支付方式 攀枝花学院本科课程设计报告(论文)
(6) 购物车临时订购信息tb_shopbook
表6 购物车临时订购信息表
列名 BookId 说明 图书编号 数据类型 int int int money varchar(10) 约束 主码(自增字段) 主码, 引用tb_bookinfo的外码 not null not null not null,默认为未付款,取“未付款”或“已付款” CustomerId 客户编号 ordermount 订购数量 price ispay 总价 是否付款 (7) 订单信息表tb_order 表7 订单信息表
列名 Id OrderId 说明 自动编号 订单编号 数据类型 int varchar(20) int datetime int 约束 not null(自增字段) 主码 not null, 引用tb_customerinfo的外码 not null not null CustomerId 客户编号 Orderdate message paymethod 下单日期 留言 支付方式 Ordermount 总订购数量 postmethod 送货方式 recevername 收货人姓名 receveraddr 收货地址 recevertel 收货人电话号码 memo 备注 totalprice 总卖出价 varchar(100) varchar(100) not null varchar(100) not null varchar(10) varchar(20) varchar(10) not null not null not null varchar(100) money 表8 订单详细信息表
not null (8) 订单详细信息表tb_orderdetail 列名 Id OrderDetailId OrderId 说明 自动编号 详细订单编号 订单号 数据类型 int int varchar(20) 约束 not null(自增字段) 主码 not null, 引用tb_order的外码
攀枝花学院本科课程设计报告(论文)
BookId ordermount poststatus 图书编号 订购数量 发货状态 int int varchar(10) not null not null not null,默认为未发货,取“未发货”或“已发货” not null,默认为未收货,取“未收货”或“已收货” not null Recevstatus 收货状态 varchar(10) sigletotalprice 卖出总价 (9) 图书评价信息表tb_comment money 表9 图书评价信息表
列名 CommentId BookId CustomerId Customername Commentdate Commentflag 说明 图书评价编号 图书编号 评论客户编号 评论时间 审核标志 数据类型 int int int 约束 主码(自增字段) not null,引用tb_bookinfo的外码 not null, 引用tb_customerinfo的外码 not null not null not null not null 评论客户名 varchar(20) datetime varchar(100) varchar(10) Commentcontent 评论内容 (10) 信息反馈信息表tb_reply
表10 信息反馈信息表
列名 ReplyId ReplyType Replytitle CustomerId 说明 信息反馈编号 留言类型 留言主题 留言客户编号 留言日期 客户IP 数据类型 int varchar(20) varchar(20) varchar(100) int 约束 主码(自增字段) not null not null not null not null, 引用tb_customerinfo的外码 not null not null not null Replycontent 留言内容 Customername 留言客户名 varchar(20) Commentdate CustomerIP
datetime varchar(10) 攀枝花学院本科课程设计报告(论文)
4 数据库实施
4.1创建表
(1) tb_customerinfo客户信息表
1. create table tb_customerinfo (
2. CustomerId int identity, 3. CustomerName varchar(20) not null, 4. CustomerPwd varchar(20) not null, 5. Customertruename varchar(20) not null, 6. CustomerSex varchar(2) not null
7. constraint CKC_CUSTOMERSEX_TB_CUSTO check (CustomerSex in ('男
','女')),
8. CustomerTel varchar(20) not null, 9. CustomerEmail varchar(20) not null, 10. CustomerAddr varchar(20) not null, 11. CustomerRegTime datetime not null, 12. CustomerQues varchar(200) null, 13. CustomerAnswer varchar(200) null, 14. CustomerLogTime int not null, 15. CustomerLastLogT datetime not null,
16. constraint PK_TB_CUSTOMERINFO primary key(CustomerId, CustomerName
) 17. )
(2)tb_booktypeinfo图书类型信息表
1. create table tb_booktypeinfo (
2. BookTypeId int identity, 3. BookTypeName varchar(50) not null, 4. constraint PK_TB_BOOKTYPEINFO primary key (BookTypeId) 5. )
(3)tb_bookinfo图书信息表
1. create table tb_bookinfo (
2. BookId int identity,