摘
面象软件工程传统面程软件工程相需求获取系统分析设计实现方面着区UMLOOAOOD常工具UML构建软件面象软件工程程系统进行断精化建模程模型包括例模型分析模型设计模型然需具体计算机语言建立系统实现模型然整软件工程中需建立系统测试模型保证软件产品质量
面象工具构建系统应该面象软件工程方法然常会发现实际开发程中开发员然够理解UML图形然心应手UML构建整项目原然原软件工程方法清楚UML建立系统模型清楚分析设计区间转化
应软件系统质说计算机现实世界进行数字化模拟应软件制造程UML方法建立列模型程关图书馆系统基需求较简单允许学生图书馆阅图书外通网络者图书馆终端查阅预订书然图书馆理员图书进行理简化系统没图书馆中员作细分
文UML程做探讨着眼UML进行建模程说明层次模型间区联系展示系统演进程会深入UML细节方面更加复杂系统分析设计方法相通举反三
二图书馆理系统行性分析
着政府机关广企事业单位部网络广泛建立通信息台构筑高效实协工作动化办公应系统满足信息高度享时发布需求效实现部知识理已成众户需求
图书理系统政府机关广企事业单位动化办公提供较解决方案开发程中软件工程步骤设计开发采面象思想技术采SQL SERVER 2000数库系统方便子系统进行数交换时注意软件图形应界面优化软件质量系统具强操作性
三图书馆理系统需求分析
31系统目标设计
系统开发总目标实现部图书阅理系统化规范化动化
够图书进行注册登记图书基信息(:书编号书名作者价格等)预先存入数库中供检索
够阅进行注册登记包括记录阅姓名编号班级年龄性址电话等信息
提供方便查询方法:书名作者出版社出版时间(确切时间时间段某时间前某时间)等信息进行图书检索反映出图书阅情况阅编号阅信息进行检索出版社名称查询出版社联系方式信息
提供书籍进行预先预订功
提供旧书销毁功淘汰损坏丢失书目时数库进行修改
够该理系统户进行理工作职提供功授权
提供较完善差错控制友户界面量避免误操作
32系统功需求分析
(1) 读者理:读者信息制定输入修改查询包括种类性书数量书期限备注等
(2) 书籍理:书籍基信息制定输入修改查询包括书籍编号类关键词备注
(3) 阅理:包括书书预订书籍续查询书籍期处理书籍丢失处理
(4)系统理:包括户权限理数理动书机理
满足需求系统包含子系统
(1)基业务功子系统:该系统中包含书书预订等功
(2)基数录入功子系统:该子系统包含书籍信息读者信息录入功
(3)信息查询子系统:包含功查询书籍信息读者信息
(4)数库理功子系统:包含阅信息理功书籍信息理功预订信息理功
(5)帮助功子系统
图该图书馆理系统功模块图:
图1:图书馆理系统功模块图
33功描述
(1) 书处理书业务
(2) 书处理书业务
(3) 书籍预订阅者通网络进行书籍预订
(4) 书籍信息录入处理书籍类信息录入业务
(5) 阅者信息录入读者信息进行录入
(6) 书籍信息查询负责书籍信息查询
(7) 读者信息查询负责数信息查询
(8) 阅信息理书籍阅信息包括书书名ISBN书时间等
(9) 书籍信息理书籍信息包括书籍名字ISBN作者入库时间书籍相应书目编号等
(10) 预订信息理负责理书籍预订信息
34图书馆理系统数流图:
显示系统界面
效户密码
处理户名密码
输入户名密码
户
输入效命令
反馈户
处理修改密码
修改户名密码
处理命令
修改户表
书籍修改命令
书
书籍入库修改信息
显示结果
处理\书命令
修改书籍信息表
修改书表
图2:图书馆理系统DFD图
四系统UML建模设计
41UML简介
UML种功强面象视化系统分析建模语言采整套成熟建模技术广泛适应领域模型帮助开发员更理解业务流程建立更更完善系统模型户开发员问题描述达相理解减少语义差异保障分析正确性
42该图书馆理系统例分析
该图书馆理系统例图:
图3:图书馆理系统例图
例图中出理员读者间系统具例
理员包含例:
(1) 登录系统:理员通登录该系统进行项功操作
(2) 书籍理:包括书籍增删改等
(3) 书籍阅理:包括书书预订书籍逾期处理书籍丢失处理等等
(4) 读者理:包含读者增删改等操作
(5) 动书机理
读者包含例:
(1) 登录系统
(2) 书:进行书业务
(3) 书:读者具书业务
(4) 查询:包含信息书籍信息查询业务
(5) 预订:读者书籍预订业务
(6) 逾期处理:书籍期缴纳罚金等
(7) 书籍丢失处理:书籍丢失措施进行处理
(8) 动书机等
43系统序图
序图显示象间交互图象时间序排列该图书馆理系统含重序图象序图类似
(1) 书序图
(2) 书序图
(3) 罚款序图
1 书序图
图4:图书馆理系统书序图
序图说明
(1) login():登录系统
(2) checkstu_card()读者信息进行验证检查否符合图书馆书条件
(3) showinformation():显示该读者基信息函数
(4) borrow():读者书函数
(5) getreaders():取读者信息函数该读者否符合书条件符合返回信息
(6) gettitle()取书目信息
(7) getreservation():检验书籍否预订函数
(8) getnoreservation():书籍没预订取消预订函数
(9) create(borroweritem):创建书籍外函数
书时读者先书予理员理员书籍读者进行检验书籍读者符合书条件书成功
2 书序图
图5:图书馆理系统书序图
序图说明
(1) login():登录系统
(2) getitem()取书籍条目信息
(3) update():图书馆书籍条目阅者信息进行更新条目
书时读者先书交理员理员扫描书籍书籍没期等违规现象书目读者阅信息进行更新时书成功
3 罚款序图
图6:图书馆理系统罚款序图
序图说明
理员书籍进行扫描发现书籍已超图书馆规定书期限天定金额进行罚款期天数罚款金额系统动计算户交完罚金读者阅信息进行更新
44系统状态图
图书馆书籍状态图图7示
状态图说明
书籍未变成图书馆库书籍时新加书籍状态书籍处库状态时预订外外变出状态处预订状态时外超出预订时间期限预订状态直接转状态阅者规定预订时间考虑取消预订取消预订书籍状态转外书籍变状态
图7:图书馆书籍状态图
45系统活动图
活动图描述某流程中务执行活动图描述活动协工作操作必须完成系列事情法确定什样序完成事情时活动图更清晰描述事情图书馆理系统中描述图书馆系统书书预订活动图
1书活动图
书活动图说明
理员首先扫描读者书证检验证件否符合图书馆书条件该读者书数量未达规定数量书籍均未属期范围符合书条件扫描书籍条形码检查书籍否书籍者已预订预订取消预订方书条件符合时更新书籍信息读者阅信息记录书时间
图8:图书馆理系统书活动图
2书活动图
书活动图说明
图书理员书籍进行扫描书籍已期求读者请欠款书读者缴应交罚款更新书目信息读者信息
图9:图书馆理系统书活动图
3预订图书活动图
预订书籍活动图说明
读者先进入系统查询需书籍显示书籍信息检验书籍否属预订书籍符合条件检查书籍否已预订已外未成立读者登录系统该书籍进行预订
图10:图书馆理系统预订书籍活动图
46图书馆理系统类图
类图说明
(1) reader类阅者类属性包括阅者账户ID(reader_id)姓名(reader_Name)址(Address)班级(class)书籍书目(borrowed)等中操作书(addborrowed)书(deleteborrowed)预订(reservation)等
(2) admin类理员类编号姓名属性操作书籍增删改读者增删改等等
(3) Title 类记录书目信息类包括书籍名字(name)作者(author)book_id等属性
(4) Item 类具体某书类属性包括书籍号(id)操作包括预订(reserve)书目查找(find_on_title)等
(5) borrow类某书阅信息类包括阅书籍ISBN阅时间(date)等
(6) Reservation类预订信息类预订信息包括预订日期(date)预订书籍ISBN预订书籍户ID(UserID)等属性
(7) persistent store类书籍永久存储类数库中存储数书籍关活动存储类
图11:图书馆理系统类图关系
五图书馆理系统数库建模
考虑系统推广性系统采SQL SERVER2000作数库采PowerDesigner进行数建模动生成sql脚
51数库概念设计
1数库表设计
(1) 理员表admin:理员编号(admin_id)理员姓名(admin_name)密码(admin_password)登录次数(logins)次登录时间(lastlogin)权限(right)
(2) 读者表reader:读者编号(reader_id)读者姓名(reader_name)性(sex)年龄(age)班级(class)书量(maxborrowed)书总量(amount)权限(right)
(3)书籍表books:书籍编号(book_id)书名(title)作者(author)出版社(book concert)价格(price)出版时间(time)库总量(amount)剩余量(remain)
(4)阅信息表(borrow_information)书籍编号(book_id)读者编号(reader_id)书时间(borrow_time)期时间(end_time)时间(return_time)
(5)预订信息表:读者编号(reader_id)书籍编号(book_id)预订时间(reservation_time)取消预订时间(reservationcanceltime)
(6) 书籍类型表booktype书籍类型编号(type_id)书籍类型名称(type_name)
(7) 户权限表right:权限(right)
2图书理系统实体间ER图
图12:图书馆理系统实体间ER图
3基powerdesignerCDM数库模型
(1)数库概念数模型CDM象图该图显示实体属性实体间关系
图13:图书馆理系统CDM建模
52 数库物理设计
概念模型生成物理模型数库脚文件 图书理sql文件代码附页
附:PDM象动生成数库脚文件代码:
if exists (select 1
from dbosysreferences r join dbosysobjects o on (oid rconstid and otype 'F')
where rfkeyid object_id('books') and oname 'FK_BOOKS_理书籍_ADMIN')
alter table books
drop constraint FK_BOOKS_理书籍_ADMIN
go
if exists (select 1
from dbosysreferences r join dbosysobjects o on (oid rconstid and otype 'F')
where rfkeyid object_id('borrow_information') and oname 'FK_BORROW_I_BORROW_IN_BOOKS')
alter table borrow_information
drop constraint FK_BORROW_I_BORROW_IN_BOOKS
go
if exists (select 1
from dbosysreferences r join dbosysobjects o on (oid rconstid and otype 'F')
where rfkeyid object_id('borrow_information') and oname 'FK_BORROW_I_BORROW_IN_READER')
alter table borrow_information
drop constraint FK_BORROW_I_BORROW_IN_READER
go
if exists (select 1
from dbosysreferences r join dbosysobjects o on (oid rconstid and otype 'F')
where rfkeyid object_id('login') and oname 'FK_LOGIN_LOGIN_ADMIN')
alter table login
drop constraint FK_LOGIN_LOGIN_ADMIN
go
if exists (select 1
from dbosysreferences r join dbosysobjects o on (oid rconstid and otype 'F')
where rfkeyid object_id('login') and oname 'FK_LOGIN_LOGIN2_READER')
alter table login
drop constraint FK_LOGIN_LOGIN2_READER
go
if exists (select 1
from dbosysreferences r join dbosysobjects o on (oid rconstid and otype 'F')
where rfkeyid object_id('reversation') and oname 'FK_REVERSAT_REVERSATI_BOOKS')
alter table reversation
drop constraint FK_REVERSAT_REVERSATI_BOOKS
go
if exists (select 1
from dbosysreferences r join dbosysobjects o on (oid rconstid and otype 'F')
where rfkeyid object_id('reversation') and oname 'FK_REVERSAT_REVERSATI_READER')
alter table reversation
drop constraint FK_REVERSAT_REVERSATI_READER
go
if exists (select 1
from sysindexes
where id object_id('admin')
and name '权限_FK'
and indid > 0
and indid < 255)
drop index admin权限_FK
go
if exists (select 1
from sysobjects
where id object_id('admin')
and type 'U')
drop table admin
go
if exists (select 1
from sysindexes
where id object_id('books')
and name '理书籍_FK'
and indid > 0
and indid < 255)
drop index books理书籍_FK
go
if exists (select 1
from sysindexes
where id object_id('books')
and name '图书类型_FK'
and indid > 0
and indid < 255)
drop index books图书类型_FK
go
if exists (select 1
from sysobjects
where id object_id('books')
and type 'U')
drop table books
go
if exists (select 1
from sysobjects
where id object_id('booktype')
and type 'U')
drop table booktype
go
if exists (select 1
from sysindexes
where id object_id('borrow_information')
and name 'Association_2_FK'
and indid > 0
and indid < 255)
drop index borrow_informationAssociation_2_FK
go
if exists (select 1
from sysindexes
where id object_id('borrow_information')
and name 'Association_1_FK'
and indid > 0
and indid < 255)
drop index borrow_informationAssociation_1_FK
go
if exists (select 1
from sysobjects
where id object_id('borrow_information')
and type 'U')
drop table borrow_information
go
if exists (select 1
from sysindexes
where id object_id('login')
and name 'login2_FK'
and indid > 0
and indid < 255)
drop index loginlogin2_FK
go
if exists (select 1
from sysindexes
where id object_id('login')
and name 'login_FK'
and indid > 0
and indid < 255)
drop index loginlogin_FK
go
if exists (select 1
from sysobjects
where id object_id('login')
and type 'U')
drop table login
go
if exists (select 1
from sysindexes
where id object_id('reader')
and name '户权限_FK'
and indid > 0
and indid < 255)
drop index reader户权限_FK
go
if exists (select 1
from sysobjects
where id object_id('reader')
and type 'U')
drop table reader
go
if exists (select 1
from sysindexes
where id object_id('reversation')
and name 'reversation2_FK'
and indid > 0
and indid < 255)
drop index reversationreversation2_FK
go
if exists (select 1
from sysindexes
where id object_id('reversation')
and name 'reversation_FK'
and indid > 0
and indid < 255)
drop index reversationreversation_FK
go
if exists (select 1
from sysobjects
where id object_id('reversation')
and type 'U')
drop table reversation
go
create table admin (
admin_id int not null
admin_name char(20) null
admin_password char(16) null
logins int null
last_login char(10) null
right int null
constraint PK_ADMIN primary key nonclustered (admin_id)
)
go
create index 权限_FK on admin (
)
go
create table booktype (
type_id int null
)
go
create table books (
book_id int not null
admin_id int null
title char(20) null
type_id int null
author char(40) null
price money null
book concern char(50) null
addtime datetime null
amount int null
remain int null
constraint PK_BOOKS primary key nonclustered (book_id)
constraint FK_BOOKS_理书籍_ADMIN foreign key (admin_id)
references admin (admin_id)
constraint FK_BOOKS_BOOKTYPE_BOOKTYPE foreign key ()
references booktype
)
go
create index 图书类型_FK on books (
)
go
create index 理书籍_FK on books (
admin_id ASC
)
go
create table reader (
reader_id int not null
reader_name char(20) null
sex char(2) null
age tinyint null
class char(15) null
address text null
memo text null
maxborrowed int null
reader_password char(16) null
right int null
constraint PK_READER primary key nonclustered (reader_id)
)
go
create table borrow_information (
book_id int not null
reader_id int not null
borrow_time datetime null
end_time datetime null
amount int null
return_time datetime null
constraint PK_BORROW_INFORMATION primary key (book_id reader_id)
constraint FK_BORROW_I_BORROW_IN_BOOKS foreign key (book_id)
references books (book_id)
constraint FK_BORROW_I_BORROW_IN_READER foreign key (reader_id)
references reader (reader_id)
)
go
create index Association_1_FK on borrow_information (
book_id ASC
)
go
create index Association_2_FK on borrow_information (
reader_id ASC
)
go
create table login (
admin_id int not null
reader_id int not null
right int null
constraint PK_LOGIN primary key (admin_id reader_id)
constraint FK_LOGIN_LOGIN_ADMIN foreign key (admin_id)
references admin (admin_id)
constraint FK_LOGIN_LOGIN2_READER foreign key (reader_id)
references reader (reader_id)
)
go
create index login_FK on login (
admin_id ASC
)
go
create index login2_FK on login (
reader_id ASC
)
go
create index 户权限_FK on reader (
)
go
create table reversation (
book_id int not null
reader_id int not null
reservation_time datetime null
reservationcancel datetime null
constraint PK_REVERSATION primary key (book_id reader_id)
constraint FK_REVERSAT_REVERSATI_BOOKS foreign key (book_id)
references books (book_id)
constraint FK_REVERSAT_REVERSATI_READER foreign key (reader_id)
references reader (reader_id)
)
go
create index reversation_FK on reversation (
book_id ASC
)
go
create index reversation2_FK on reversation (
reader_id ASC
)
go
文档香网(httpswwwxiangdangnet)户传
《香当网》用户分享的内容,不代表《香当网》观点或立场,请自行判断内容的真实性和可靠性!
该内容是文档的文本内容,更好的格式请下载文档