收藏 分销(赏)

书店管理系统课程设计报告.doc

上传人:仙人****88 文档编号:11230256 上传时间:2025-07-09 格式:DOC 页数:13 大小:2.55MB 下载积分:10 金币
下载 相关 举报
书店管理系统课程设计报告.doc_第1页
第1页 / 共13页
书店管理系统课程设计报告.doc_第2页
第2页 / 共13页


点击查看更多>>
资源描述
课程设计 课 程: 数据库应用 题 目: 图书零售系统 专 业: 计算机 班 级: 0802 姓 名: 英俊的叔叔 2010年 6 月 30 日 一、系统定义 该系统采用Delphi软件开发工具开发,单机运行,主要供书店等图书销售商使用。 系统提供图书管理、销售管理、会员管理等模块(如图)。在图书管理模块中,用户可以对图书及其相关信息进行增加、查询等操作;在销售管理模块中,用户可以根据实际销售情况查询、更新销售记录;在会员管理系统中,可以进行系统会员的查询和新用户的添加等操作。以上操作中涉及的数据信息,都保存到数据库中。 二、需求分析 1) 该书店经营多种类型图书 2) 图书的进价通常要低于售出价格 3) 如果一本图书很长时间内都没有卖出,可能要面临打折处理,这类书称为特价书。 4) 经常光顾书店的人可以办一个会员卡,会员卡上金额积累到一定程度时可以打折,但特价书不在打折之列。非会员的编号为0。 5) 一个会员可以买多种图书, 管理员登录 图书录入 统计查询 销售 查销售记录 打折会员 普通会员 特价图书 查库存情况 三、系统设计 1、概念结构设计 信息录入 图书 会员 销售 作者 单价 书名 类型 会员编号 会员积分 入库时间 日期 会员编号 ISBN 数量 会员名 ISBN号 M N 总价 书名 入库 单价 ISBN号 入库时间 类型 数量 数量 1 1 作者 2、逻辑结构设计 books(ISBN、书名、作者、类型、单价、数量、入库时间) VIP(会员编号、会员名、会员积分) create table sales (ISBN varchar(20) primary key, vno varchar(10), QUANTITY int, total_money money, outdate varchar(10)); create table sales_copy (ISBN varchar(20) primary key, vno varchar(10), QUANTITY int, total_money money, outdate varchar(10)); create table quanxian (inname char(20) primary key, mima char(20), quanxian char(20)); 3、系统功能模块图 书店零售管理系统 图书管理 会员管理 销售管理 登录 输入用户名密码 查看记录名密码 增加记录名密码 查看信息 添加会员名密码 特价管理 信息录入 统计查询 录入特价书 按书名查找 按积分查看 按书名查看 查询总记录 特价图书 按类型查找 按类型查看 查看销售额 按会员名查看 查看全部会员 新建账户 四、详细设计 1.图书销售过程 create proc sell @a int output AS declare @ISBN varchar(30), @vno char(10), @QUANTITY int, @total_money float(6), @indate datetime select @ISBN=ISBN, @vno=vno, @QUANTITY=QUANTITY, @total_money=total_money from sales_copy if exists ( select * from books where ISBN=@ISBN and QUANTITY<@QUANTITY ) begin set @a=1 delete from sales_copy end else if exists ( select * from books where ISBN=@ISBN and datediff(day,indate,getdate()) >60 ) begin set @a=2 update books set QUANTITY=QUANTITY-@QUANTITY where ISBN=@ISBN update sales_copy set total_money=0.8*total_money*@QUANTITY where ISBN=@ISBN if not exists (select * from sales where ISBN=@ISBN ) begin insert into sales select * from sales_copy delete from sales_copy where ISBN=@ISBN end else begin update sales set QUANTITY=QUANTITY+@QUANTITY where ISBN=@ISBN delete from sales_copy where ISBN=@ISBN end end else if exists ( select * from VIP where points>=200 and vno=@vno ) begin set @a=3 update books set QUANTITY=QUANTITY-@QUANTITY where ISBN=@ISBN update sales_copy set total_money=0.8*total_money*@QUANTITY where ISBN=@ISBN update VIP set points=points+@total_money where vno=@vno if not exists (select * from sales where ISBN=@ISBN ) begin insert into sales select * from sales_copy delete from sales_copy where ISBN=@ISBN end else begin update sales set QUANTITY=QUANTITY+@QUANTITY where ISBN=@ISBN delete from sales_copy where ISBN=@ISBN end end else begin set @a=4 update books set QUANTITY=QUANTITY-@QUANTITY where ISBN=@ISBN update sales_copy set total_money=total_money*@QUANTITY where ISBN=@ISBN update VIP set points=points+@total_money where vno=@vno if not exists (select * from sales where ISBN=@ISBN ) begin insert into sales select * from sales_copy delete from sales_copy where ISBN=@ISBN end else begin update sales set QUANTITY=QUANTITY+@QUANTITY where ISBN=@ISBN delete from sales_copy where ISBN=@ISBN end end 过程有关的E-R图: 图书 销售 打折会员 普通会员或非会员 达到积分 打完折付款 原价付款 特价图书 打完折付款 加积分 达到时间 五、系统实现与测试 1、开发平台和工具选择 Delphi 可视编程工具和Microsoft sql server2000 数据库工具。 2、系统测试 经测试,系统运行稳定,基本功能全部实现。 六、课程设计总结 这次数据库课程设计基本完成了。但是设计过程可谓起伏跌宕。由于开始对图书零售系统一无所知,只好查大量的资料,耗掉了不少时间,做到后台数据库是更是困难重重,在写存储过程时几乎是一边学习与一边设计,感觉相当痛苦,花了一周终于搞完后台,前台相对简单,但是前后台的数据经常矛盾,导致程序故障,于是调试程序耗了不少时间,通过努力,还是啃下了这块硬骨头,虽然算不上美观实用,但完成了基本的功能。通过这次设计,才知道理论所学运用到实际的困难。为了以后的发展,从此要努力学习。 参考文献:1.数据库系统概论(第四版)高等教育出版社 2.Delphi7.0程序设计 清华大学出版社 北京交通大学出版社
展开阅读全文

开通  VIP会员、SVIP会员  优惠大
下载10份以上建议开通VIP会员
下载20份以上建议开通SVIP会员


开通VIP      成为共赢上传

当前位置:首页 > 学术论文 > 其他

移动网页_全站_页脚广告1

关于我们      便捷服务       自信AI       AI导航        抽奖活动

©2010-2026 宁波自信网络信息技术有限公司  版权所有

客服电话:0574-28810668  投诉电话:18658249818

gongan.png浙公网安备33021202000488号   

icp.png浙ICP备2021020529号-1  |  浙B2-20240490  

关注我们 :微信公众号    抖音    微博    LOFTER 

客服