




版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、图书管理系统 数据库设计报告 文件标识:lms-database 当前版本:1.0 作 者:xxx 文件状态: 草稿 正式发布 正在修改 完成日期:2011-12-24 项目名称, 数据库设计报告 k7yeqs 2011page 2 of 32 版 本 历 史 版本/状态作者参与者起止日期备注 项目名称, 数据库设计报告 k7yeqs 2011page 3 of 32 目目目 录录录 0. 文档介绍文档介绍 .4 0.1 文档目的.4 0.2 文档范围.4 0.3 读者对象.4 0.4 参考文献.4 0.5 术语与缩写解释.4 1. 数据库环境说明数据库环境说明 .4 2. 数据库的命名规则数
2、据库的命名规则 .5 3.概念设计概念设计 .6 4. 逻辑设计逻辑设计 .6 5.物理模型物理模型 .8 5.0 表汇总.8 5.1 表 users.9 5.2 表 userrole.9 5.3 表 userrights.10 5.4 表 overlimitrecord.10 5.5 表 lostrecord.10 5.6 表 orderrecord.11 5.7 表 borrowrecord.11 5.8 表 book.11 5.9 表 liabrary.12 5.10 表 bookcategory.12 5.11 表 bookkind.13 5.12 表 systemlog.13 6.
3、安全性设计安全性设计 .13 6.1 防止用户直接操作数据库的方法.13 6.2 用户帐号密码的加密方法.14 6.3 角色与权限.14 7. 优化优化 .14 8. 数据库管理与维护说明数据库管理与维护说明 .15 8.1 数据库日常检查 .15 8.2 数据库备份方案.15 9. 数据库对象.16 项目名称, 数据库设计报告 k7yeqs 2011page 4 of 32 0. 文档介绍文档介绍 0.1 文档目的文档目的 本文档为图书管理系统的数据库设计文档,主要介绍系统的数据库设计,给出了系统的 逻辑设计和物理设计,同时给出了数据库环境的说明,确定了数据库命名规则,给出了数据 库的优化方
4、案、安全性设计方案和数据库维护、管理等内容,本文档可作为项目开发人员在 数据库实现时的参考和规范。 0.2 文档范围文档范围 本文档适用于项目开发的设计阶段,在项目开发阶段可按照本文档检验数据库的实施情 况。 0.3 读者对象读者对象 1.图书管理系统的开发人员 2.指导老师 3.图书管理系统的测试人员 4.图书管理系统的客户 0.4 参考文献参考文献 【01】王珊 萨师煊, 数据库系统概论 ,高等教育出版社,2006-05-04 0.5 术语与缩写解释术语与缩写解释 缩写、术语缩写、术语解解 释释 spp精简并行过程,simplified parallel process sd系统设计,sy
5、stem design 逻辑设计 把一种计划、规划、设想通过视觉的形式通过概念、判断、推理、论证来理解 和区分客观世界的思维传达出来的活动过程 物理设计设计数据库的物理结构,根据数据库的逻辑结构来选定 rdbms,并设计和实 施数据库的存储结构、存取方式等。 1. 数据库环境说明数据库环境说明 数据库系统:mysql 数据库设计工具:power designer 项目名称, 数据库设计报告 k7yeqs 2011page 5 of 32 编程工具:power designer 详细配置: 2. 数据库的命名规则数据库的命名规则 2.1 数据库涉及字符规则数据库涉及字符规则 采用 26 个英文字
6、母(区分大小写)和 0 9 这十个自然数,加上下划线_组成,共 63 个字符。不能出现其他字符(注释除外) 。 2.2 数据库对象命名规则数据库对象命名规则 数据库对象包括表、视图(查询) 、存储过程(参数查询) 、函数、约束。对象名字由前 缀和实际名字组成,长度不超过 30。 前缀:使用小写字母。如: 表tb 视图vi 存储过程sp 函数fn 实际名字 实际名字尽量描述实体的内容,由单词或单词组合,每个单词的首字母大写,其他字母 小写,不以数字和_开头。因此,合法的对象名字类似如下。 表tbuser_info、tbmessage_detail 视图vi_messagelist 存储过程sp_
7、messageadd 2.3 数据库表命名规则数据库表命名规则 字段由前缀和实际名字组成。实际名字中首单词一个系统尽量采取同一单词。 前缀:使用小写字母 tb,表示表。 例如:tbmember tbmember_info t bforum_board tbforum_thread1 2.4 字段命名规则字段命名规则 数字、字符、日期/时间、lob(大对象)、杂项,字段由表的简称、下划线,实际名字加后 缀组成。 后缀:使用小写字母,代表该字段的属性。 例如: user_idint user_namestr user_regdatedtm 2.5 视图命名规则视图命名规则 字段由前缀和实际名字组成
8、,中间用下划线连接。 前缀:使用小写字母 vi,表示视图。 例如:vi_user vi_userinfo 2.6 存储过程命名规则存储过程命名规则 字段由前缀和实际名字组成,中间用下划线连接。 前缀:使用小写字母 sp,表示存储过程。 例如:sp_user 2.7 sql 语句规则语句规则 项目名称, 数据库设计报告 k7yeqs 2011page 6 of 32 所有 sql 语句的关键词全部大写或首字母大写,比如 select,update,from, order,by 等。 3.概念设计概念设计 4. 逻辑设计逻辑设计 项目名称, 数据库设计报告 k7yeqs 2011page 7 of
9、 32 项目名称, 数据库设计报告 k7yeqs 2011page 8 of 32 5.物理模型物理模型 5.0 表汇总表汇总 表名功能说明 users记录用户的基本信息,包括姓名、性别、单位、联系方式等 userrole记录用户的角色,不同的角色拥有不同的权限 userrights记录图书管理系统中用户可拥有的所有权限 overlimitrecord记录超期的图书借阅记录 lostrecord记录图书遗失的记录 orderrecord记录读者预约图书的情况 borrowrecord记录读者借阅图书的情况 book记录图书的基本信息,包括书名、出版社、页数、是否可借阅等 library记录图书
10、馆分馆的基本情况,包括分馆地址、电话等信息 项目名称, 数据库设计报告 k7yeqs 2011page 9 of 32 bookcategory记录图书的类别及相关属性,划分不同类别可方便用户借阅查找 bookkinds记录图书的种类及相关属性,不同种类的书籍有不同的赔付价格 systemlog记录系统的运行情况 5.1 表表 users 表名users 列名数据类型空/非空约束条件表示含义 useridint 非空主键用户编号 usernamenvchar非空无用户姓名 usernumint非空无用户学号 usersexnvchar(2)可以为空只能是男或是女用户性别 userroleint
11、非空只能为“用户角色”表中已有项的角色 编号 用户所属角色 userunitnvchar可以为空无用户所在单位 useremailnvchar可以为空格式为“xxxx.xx”用户邮箱 userphonenvchar(11 ) 可以为空位数为 11 位,全部字符为数字用户联系电话 userpswnvchar(12 ) 非空长度至少为 6,最多为 12 位的数字、字 母的组合 用户登录密码 userisborrowint非空无用户是否可借阅 书籍 userborroecntint非空无用户当前可借阅 的书籍数量 补充说明1.userrole 为外键,关联着用户角色表中的角色编号 2.userisb
12、orrow 的初始值为 1,当 userborrowcnt 的值为 0 时其值为 0,当用户出现超期 事务未处理时,userisborrow 的值为-1,出现遗失事务未处理时其值-2,当同时有 userborrowcnt 为 0 和超期事务未处理时其值为-3,当同时有 userborrowcnt 为 0 和遗失 事务未处理时其值为-4,当同时有遗失和超期事务未处理时其值为-5,只有当其值为 1 时表示当前可借,否则当前不可借阅。 5.2 表表 userrole 表名userrole 列名数据类型空/非空约束条件表示含义 roleidint非空主键角色编号 rolenamenvchar非空最大为
13、 256 个字符角色名称 roledescribenvchar可以为空无角色描述 roleborrowcntint非空无可借阅书籍的最大数量 项目名称, 数据库设计报告 k7yeqs 2011page 10 of 32 roleborrowdaysint非空无可借阅书籍的最大天数 roleborrowtimesint非空无可续借的次数 rolecontinuedaysint 非空无续借一次可多借阅书籍的天 数 rolerightsint非空只能为权限表中已有 项的编号 角色所拥有的权限 补充说明rolerights 为外键,关联着权限表中的权限编号 5.3 表表 userrights 表名us
14、errights 列名数据类型空/非空约束条件表示含义 rightsidint非空主键权限编号 rightsnamenvchar非空最大为 256 个字符权限名称 rightsdescribenvchar可以为空无权限描述 补充说明无 5.4 表表 overlimitrecord 表名overlimitrecord 列名数据类型空/非空约束条件表示含义 olridint非空主键超期记录编号 olruseridint非空无超期借阅书籍的读者编号 olrbookidint非空无超期被借阅的书籍编号 overdaysint非空无超期天数 isfineboolean非空无是否已经缴纳超期罚款的标识 o
15、vercostint非空无超期应缴纳的罚款金额 补充说明olruserid 和 olrbookid 为外键,分别关联用户表中的用户编号和图 书表中的图书编号 5.5 表表 lostrecord 表名lostrecord 列名数据类型空/非空约束条件表示含义 lostrecidint非空主键书籍遗失记录编号 lostrecbookidint非空无遗失的书籍编号 lostrecuseridint非空无遗失书籍的用户编号 lostrecdatedate非空无书籍遗失事务等级日期 lostisfineboolean非空无是否已经缴纳遗失书籍赔付款 lostrebuyboolean非空无是否已经重新购入
16、该书籍 项目名称, 数据库设计报告 k7yeqs 2011page 11 of 32 补充说明lostrecuserid 和 lostrecbookid 为外键,分别关联用户表中的用户编号 和图书表中的图书编号 5.6 表表 orderrecord 表名orderrecord 列名数据类型空/非空约束条件表示含义 orderrecidint非空主键预约图书记录的编号 orderrecbookidint非空无被预约图书的编号 orderrecuseridint非空无预约图书的用户编号 orderrecdatedate非空无预约图书的日期 orderisfinishboolean非空无预约活动是否
17、完成 补充说明orderrecuserid 和 orderrecbookid 为外键,分别关联用户表中的用户 编号和图书表中的图书编号 5.7 表表 borrowrecord 表名orderrecord 列名数据类型空/非空约束条件表示含义 brdint非空主键借阅书籍记录的编号 bruseridint非空无借阅书籍的用户的编号 brbookidint非空无被借阅的书籍的编号 brdatedate非空无借阅书籍的时间 brisbackboolean非空无是否已经归还书籍的标识位 brbackdatedate非空无用户应该归还书籍的最大日期 briscontinueboolean非空无用户是否可
18、以续借书籍 brcontinuetimesint非空无用户还可以续借该书籍的次数 brisoverlimitboolean非空无借阅的书籍是否已经超期 broverlimitfinevnchar可以为空无若书籍超期所应缴纳的超期款 补充说明orderrecuserid 和 orderrecbookid 为外键,分别关联用户表中的用户 编号和图书表中的图书编号 5.8 表表 book 表名book 列名数据类 型 空/非空约束条件表示含义 bookidint非空主键书籍编号 booknamenvchar非空最大长度为 256 个字符书籍名称 bookauthornvchar非空最大长度为 256
19、 个字符书籍的作者名 项目名称, 数据库设计报告 k7yeqs 2011page 12 of 32 isbnidnvchar非空最大长度为 256 个字符书籍的 isbn 码 publishnvchar非空最大长度为 256 个字符书籍的出版社名 publishplacenvchar非空最大长度为 256 个字符书籍的出版地 publishdatedate非空无书籍的出版时间 totalwordsint非空无书籍的总字数 totalpageint非空无书籍的总页数 bookpricenvchar非空无书籍的定价 bookabstructnvchar非空无书籍的内容简介 bookcategory
20、int非空无书籍的类别 bookindatedate非空无书籍的入库时间 booklibraryint非空无书籍所在的图书分馆 isborrowboolean非空无标识书籍当前是否可借 bookkindint非空无书籍的种类 补充说明1.bookcategory 为外键,关联着图书类别表中的类别编号 2.bookkind 为外键,关联这图书种类表中的种类编号 3.图书类别表示图书的内容的类别,如哲学类,文学类,设置图书类别图 书可以方便用户进行查找和定位,图书的种类表示书籍的种类,如新书、 珍藏版书籍、外文书、中文书,设置图书种类是可能不同种类的书籍在超 期、遗失时的赔付额度不一样,如 198
21、0 年前的书属于珍藏版的书,遗失后 应该按定价的 5 倍赔付等 4.当书籍当前已经被借出或者已经遗失了,则该书籍当前不可借阅 5.书籍作者的最大长度设为 256 是因为可能一本书的作者为多个,名字的 总长度较大 6.isbn 码为图书的分类编码,同样的书籍的 isbn 码应该一样 5.9 表表 liabrary 表名liabrary 列名数据类 型 空/非空约束条件表示含义 liabraryidint非空主键图书分馆编号 libnamnvchar非空最大长度为 256 个字符图书分馆名称 libphonenvchar非空最大长度为 11图书分馆的联系电话 libaddressnvchar非空最
22、大长度为 256 个字符图书分馆的地址 libabstructnvchar非空无图书分馆的简介 补充说明一个图书管理系统可能同时管理位于不同位置的几个图书分馆,所以需要 设置图书分馆表,一本图书也应该属于某一个图书分馆 项目名称, 数据库设计报告 k7yeqs 2011page 13 of 32 5.10 表表 bookcategory 表名bookcategory 列名数据类 型 空/非空约束条件表示含义 categoryidint非空主键图书类别编号 categorynamenvchar非空最大长度为 256 个字 符 图书类别名称 categorydescribenvchar非空无类别的
23、简介 补充说明图书的类别是指图书内容的分类,如哲学类、历史类、计算机类等,将 图书按类别归类可方便用户的查找和借阅 5.11 表表 bookkind 表名bookkind 列名数据类型空/非空约束条件表示含义 kindidint非空主键图书种类编号 kindnamenvchar非空最大长度为 256 个字符图书种类名称 kinddescribenvchar可以为空无图书种类的简介 overlimitcostnvchar非空无图书超期的罚金额度 lostcostnvchar非空无图书遗失的罚金额度 补充说明图书可能会被划分为新书、珍藏版书籍、外文书、中文书等种类,根据种 类的不同书籍的超期、遗失
24、的赔付金额也不同,如外文书遗失需要赔付两 倍定价的金额,而一般的中文书只需按定价赔付等,所以需要划分不同的 书籍种类 5.12 表表 systemlog 表名systemlog 列名数据类型空/非空约束条件表示含义 logidint非空主键系统日志编号 logcontentnvchar非空无系统日志内容 logtimedate 2.数据库版本检查:数据库应该打了最新的 patchset。 sqlselect * from v$version; 3.查看 sga 区域:sga 区各项 buffer 之和应该小于系统物理内存的一半。 sqlshow sga; 4.回滚段竞争检查:如果是 oracl
25、e8i 版本返回值应该低于 2%。如果该值过高,8i 需要手工 建立更多的回滚段,如果是 9i,返回值应该为 0,如果持续存在非零值,应该增加回滚表空 间的大小。 8i: sql select the average of waits/gets is |round(sum(waits) / sum(gets) * 100,2)|%from v$rollstat; 9i: sqlselect distinct nospaceerrcnt as nospace from v$undostat where begin_timesysdate-(1/12); 5.查看日志文件:数据库运行时,可以通过查
26、询 v$log_history 来观察 log switch 的切换 时间。联机日志最好是业务非高峰期每小时切换一次,业务高峰期 20 分钟左右切换一次。 sqlselect to_char(first_time,yyyy-mm-dd hh24:mi:ss) change_time from v$log_history; 6.查看表空间:查看各个表空间所占的大小,剩余空间,使用空间百分比等信息,特别是当 业务表空间的剩余空间低于 50m 或者使用空间百分比大于 90%时,需要考虑增加表空间的大 小。 sql select a.tablespace_name,a.bytes totalbytes
27、,sum(b.bytes) freebytes from dba_data_files a,dba_free_space b where a.file_id = b.file_id group by a.tablespace_name, a.bytes ; 7.检查 job 状态:broken 列应该为 n;如果 broken 列为 y,检查 oracle 告警日志,分析 job 失败的原因。解决后运行:exec dbms_job.run(:job); sqlselectjob,what,to_char(next_date,yyyy/mm/ddhh24:mi:ss),broken,failur
28、es from dba_jobs; 8.查看数据库连接用户:查看当前数据库连接的用户进程的具体信息,包括连接的数据库用 户名,机器名,运行的程序名,进程状态。 项目名称, 数据库设计报告 k7yeqs 2011page 16 of 32 select username,machine,program,status from v$session where osuser oracle; 8.2 数据库备份方案数据库备份方案 添加任务计划,定期定时运行备份批处理命令,实现自动备份。 设计一个物理备份和逻辑备份相结合的数据库备份方案,以保证数据的完整性和 0 损失 恢复。 逻辑备份: 星期一 完全备
29、份 在 00:00 时备份 星期二 增量备份 在 00:00 时备份 星期三 增量备份 在 00:00 时备份 星期四 增量备份 在 00:00 时备份 星期五 累积备份 在 00:00 时备份 星期六 增量备份 在 00:00 时备份 星期日 增量备份 在 00:00 时备份 分析:每天在 00:00 时备份是因为在这个时段的访问量相对很少,星期一完全备份可 以将数据库中的信息全部备份,而之后的几天采用增量备份可以减少备份量,加快备份速度。 在在星期五选择累计备份,是考虑到数据库出错时恢复的考虑,当数据库在某一周有错误时, 可以直接恢复到星期五的数据,而不用一天一天的按增量备份的数据恢复。
30、物理备份: 9. 数据库对象数据库对象 序列序列 序列名称序列名称 users_seq 序列描述序列描述该序列用以完成用户编号的自增 序列实现序列实现create sequence users_seq increment by 1 start with 1 nomaxvalue nocycle nocache; 序列名称序列名称userrole_seq 序列描述序列描述创建序列,用以完成用户角色编号的自增 序列实现序列实现create sequence userrole_seq 备份方法备份频率备份时间备份目的备注 本地热备1 次/天 00:00 保留最近一周的备份数据 本地冷备1 次/一月每
31、周星期五下午保留数据库全部数据 异地导出备份1 次/天 12:00 保留最近一周的备份数据 项目名称, 数据库设计报告 k7yeqs 2011page 17 of 32 increment by 1 start with 1 nomaxvalue nocycle nocache; 序列名称序列名称userright_seq 序列描述序列描述创建序列,用以完成用户权限编号的自增 序列实现序列实现create sequence userright_seq increment by 1 start with 1 nomaxvalue nocycle nocache; 存储过程存储过程 存储过程名称存
32、储过程名称inserttousers 存储过程描述存储过程描述向用户表中插入新的用户记录的存储过程 参数说明 依次表示:用户姓名,学号、性别、所属角色编号、单位、邮箱和电话 最后一个参数为插入结果的返回值,成功时返回 1,否则返回出错代码 存储过程实现存储过程实现create or replace procedure inserttousers( itemname in varchar, itemnum in integer, itemsex in varchar, itemrole in integer, itemunit in varchar, itememail in varchar,
33、itemtel in varchar, itempsw in varchar, itemisborrow in integer, itemborrowcnt in integer, insertres out integer )is begin savepoint sp1; insert into users (userid,username,usernum,usersex, userrole,userunit,useremail,usertel,userpsw,userisborrow,userborrowcnt )values ( users_seq, itemname, itemnum,
34、 itemsex, itemrole, itemunit, itememail, itemtel, itempsw,itemisborrow, itemborrowcnt ); insertres := 1; 项目名称, 数据库设计报告 k7yeqs 2011page 18 of 32 commit; exception when dup_val_on_index then insertres := sqlcode; when others then insertres := sqlcode; rollback to savepoint sp1; end; 存储过程名称存储过程名称delonu
35、sers 存储过程描述存储过程描述删除用户表记录 参数说明: 依次表示:用户姓名、学号、性别、所属角色编号、单位、邮箱和电话、 密码 当不需要依据某一项来选择删除的用户时,如果为字符类型则传入 null,如果为数字类型则传入-1 如删除编号为 1 的用户时调用函数为 delonusers(1,null,-1,null,-1,null,null,null); 最后一个参数为删除记录的执行结果成功时返回 1 否则返回出错代码 存储过程实现存储过程实现create or replace procedure delonusers( itemid in integer, itemname in varc
36、har, itemnum in integer, itemsex in varchar, itemrole in integer, itemunit in varchar, itememail in varchar, itemtel in varchar, itempsw in varchar, itemisborrow in integer, itemborrowcnt in integer, delres out integer )is tmpcondition varchar(500); begin savepoint sp1; tmpcondition := null; -如果需要根据
37、用户的编号删除,则只需获取用户的编号,而不用再看用户的其他属 性,因为用户编号是唯一 if itemid -1 then tmpcondition := tmpcondition | itemid; 项目名称, 数据库设计报告 k7yeqs 2011page 19 of 32 -如果是根据用户的其他属性删除时 else if itemname is not null then tmpcondition := tmpcondition |username = |itemname; end if; if itemnum -1 then if tmpcondition is not null the
38、n tmpcondition := tmpcondition | usernum = |itemnum; else tmpcondition := tmpcondition | add usernum = |itemnum; end if; end if; if itemsex is not null then if tmpcondition is not null then tmpcondition := tmpcondition | usersex = |itemsex; else tmpcondition := tmpcondition | add usersex = |itemsex;
39、 end if; end if; if itemrole -1 then if tmpcondition is not null then tmpcondition := tmpcondition | userrole = |itemrole; else tmpcondition := tmpcondition | add userrole = |itemrole; end if; end if; if itemunit is not null then if tmpcondition is not null then tmpcondition := tmpcondition | userun
40、it = |itemunit; else tmpcondition := tmpcondition | add userunit = |itemunit; end if; end if; if itememail is not null then if tmpcondition is not null then tmpcondition := tmpcondition | useremail = |itememail; else tmpcondition := tmpcondition | add useremail = |itememail; end if; 项目名称, 数据库设计报告 k7
41、yeqs 2011page 20 of 32 end if; if itemtel is not null then if tmpcondition is not null then tmpcondition := tmpcondition | usertel = |itemtel; else tmpcondition := tmpcondition | add usertel = |itemtel; end if; end if; if itempsw is not null then if tmpcondition is not null then tmpcondition := tmpc
42、ondition | userpsw = |itempsw; else tmpcondition := tmpcondition | add userpsw = |itempsw; end if; end if; if itempsw -1 then if tmpcondition is not null then tmpcondition := tmpcondition | userisborrow = |itemisborrow; else tmpcondition := tmpcondition | add userisborrow = |itemisborrow; end if; en
43、d if; if itempsw -1 then if tmpcondition is not null then tmpcondition := tmpcondition | userborrowcnt = |itemborrowcnt; else tmpcondition := tmpcondition | add userborrowcnt = |itemborrowcnt; end if; end if; end if; -执行删除语句 tmpcondition := delete from users where |tmpcondition; execute immediate tm
44、pcondition; delres := 1; commit; exception when no_data_found then delres := sqlerrm; when others then 项目名称, 数据库设计报告 k7yeqs 2011page 21 of 32 delres := sqlerrm; rollback to savepoint sp1; end; 存储过程名称存储过程名称updateonusers 存储过程描述存储过程描述更新记录项的存储过程 参数说明 参数一:需要更新的记录的查找条件,数组记录一次对应用户姓名、学号、 性别、所属角色编号、单位、邮箱和电话、
45、密码 如果不需要某一项作为查找条件时,该项对应位置传入 null 参数二:记录需要更新的数据项,数组记录依次对应用户姓名、学号、性 别、所属角色编号、单位、邮箱和电话、密码 如果不需要更新某一项的值时,该项对应位置传入 null 最后一个参数为更新结果的返回值,成功时返回 1,否则返回出错代码 存储过程实现存储过程实现-创建一个数组类型,用以存储需要修改的记录的值 create or replace type users_arr as varray(11) of varchar2(500); create or replace procedure updateonusers( conditio
46、narr in users_arr, valuearr in users_arr, updateres out integer)is tmpcondition varchar(500); tmpvalue varchar(500); begin savepoint sp1; tmpcondition := null; tmpvalue := null; if conditionarr(0) is not null then tmpcondition := tmpcondition| userid = |conditionarr(0); end if; if valuearr(0) is not
47、 null then tmpvalue := tmpvalue| userid = |valuearr(0); end if; if conditionarr(1) is not null then if tmpcondition is not null then tmpcondition := tmpcondition| username = |conditionarr(1); else tmpcondition := tmpcondition| and username = |conditionarr(1); end if; end if; if valuearr(1) is not nu
48、ll then 项目名称, 数据库设计报告 k7yeqs 2011page 22 of 32 if tmpvalue is not null then tmpvalue := tmpvalue| username = |valuearr(1); else tmpvalue := tmpvalue|, username = |valuearr(1); end if; end if; if conditionarr(2) is not null then if tmpcondition is not null then tmpcondition := tmpcondition| usernum =
49、 |conditionarr(2); else tmpcondition := tmpcondition| and usernum = |conditionarr(2); end if; end if; if valuearr(2) is not null then if tmpvalue is not null then tmpvalue := tmpvalue| usernum = |valuearr(2); else tmpvalue := tmpvalue|, usernum = |valuearr(2); end if; end if; if conditionarr(3) is n
50、ot null then if tmpcondition is not null then tmpcondition := tmpcondition| usersex = |conditionarr(3); else tmpcondition := tmpcondition| and usersex = |conditionarr(3); end if; end if; if valuearr(3) is not null then if tmpvalue is not null then tmpvalue := tmpvalue| userrole = |valuearr(3); else
51、tmpvalue := tmpvalue|, userrole = |valuearr(3); end if; end if; if conditionarr(4) is not null then if tmpcondition is not null then tmpcondition := tmpcondition| userrole = |conditionarr(4); else tmpcondition := tmpcondition| and userrole = |conditionarr(4); 项目名称, 数据库设计报告 k7yeqs 2011page 23 of 32 e
52、nd if; end if; if valuearr(4) is not null then if tmpvalue is not null then tmpvalue := tmpvalue| userrole = |valuearr(4); else tmpvalue := tmpvalue|, userrole = |valuearr(4); end if; end if; if conditionarr(5) is not null then if tmpcondition is not null then tmpcondition := tmpcondition| userunit
53、= |conditionarr(5); else tmpcondition := tmpcondition| and userunit = |conditionarr(5); end if; end if; if valuearr(5) is not null then if tmpvalue is not null then tmpvalue := tmpvalue| userunit = |valuearr(5); else tmpvalue := tmpvalue|, userunit = |valuearr(5); end if; end if; if conditionarr(6)
54、is not null then if tmpcondition is not null then tmpcondition := tmpcondition| useremail = |conditionarr(6); else tmpcondition := tmpcondition| and useremail = |conditionarr(6); end if; end if; if valuearr(6) is not null then if tmpvalue is not null then tmpvalue := tmpvalue| useremail = |valuearr(
55、6); else tmpvalue := tmpvalue|, useremail = |valuearr(6); end if; end if; if conditionarr(7) is not null then if tmpcondition is not null then 项目名称, 数据库设计报告 k7yeqs 2011page 24 of 32 tmpcondition := tmpcondition| usertel = |conditionarr(7); else tmpcondition := tmpcondition| and usertel = |conditiona
56、rr(7); end if; end if; if valuearr(7) is not null then if tmpvalue is not null then tmpvalue := tmpvalue| usertel = |valuearr(7); else tmpvalue := tmpvalue|, usertel = |valuearr(7); end if; end if; if conditionarr(8) is not null then if tmpcondition is not null then tmpcondition := tmpcondition| use
57、rpsw = |conditionarr(8); else tmpcondition := tmpcondition| and userpsw = |conditionarr(8); end if; end if; if valuearr(8) is not null then if tmpvalue is not null then tmpvalue := tmpvalue| userpsw = |valuearr(8); else tmpvalue := tmpvalue|, userpsw = |valuearr(8); end if; end if; if conditionarr(9
58、) is not null then if tmpcondition is not null then tmpcondition := tmpcondition| userisborrow = |conditionarr(9); else tmpcondition := tmpcondition| and userisborrow = |conditionarr(9); end if; end if; if valuearr(9) is not null then if tmpvalue is not null then tmpvalue := tmpvalue| userisborrow =
59、 |valuearr(9); else tmpvalue := tmpvalue|, userisborrow = |valuearr(9); end if; 项目名称, 数据库设计报告 k7yeqs 2011page 25 of 32 end if; if conditionarr(10) is not null then if tmpcondition is not null then tmpcondition := tmpcondition| userborrowcnt = |conditionarr(10); else tmpcondition := tmpcondition| and
60、 userborrowcnt = |conditionarr(10); end if; end if; if valuearr(10) is not null then if tmpvalue is not null then tmpvalue := tmpvalue| userborrowcnt = |valuearr(10); else tmpvalue := tmpvalue|, userborrowcnt = |valuearr(10); end if; end if; strvalues := update users set |strvalues|where |strconditi
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025年劳务安全协议书:华区餐饮服务业员工劳动保护合同
- 2025年度企业内部数据保密管理协议书模板
- 2025年度地质勘查技术服务与数据共享合同
- 专卖店装修保修合同模板
- 2024年佛山外向型骨干企业全球化发展白皮书-佛山市贸促会
- 2025年度商用复印机购销合同附带原装耗材包
- 商务办公区装修合同
- Unit 3 Keep fit Section B 1a-1d 教学设计 2024-2025学年人教版英语七年级下册
- 浮力(教学设计)2023-2024学年教科版五年级科学下册
- 2023-2024学年天津市南开区高中学业水平合格性考试模拟考试生物试卷
- ASTM标准全部目录(中文版)
- 《汽车电气设备构造与维修》 第4版 课件 第3、4章 电源系统、发动机电器
- 辽海版小学美术六年级下册全册教案
- 2023年南京市鼓楼区建宁路街道安监办招聘专职安全员考试真题及答案
- 2024陕西延长石油集团矿业公司所属单位招聘笔试参考题库附带答案详解
- 乡镇精神卫生工作总结
- 井工煤矿中长期防治水规划编制细则
- 2024年湘中幼儿师范高等专科学校高职单招(英语/数学/语文)笔试历年参考题库含答案解析
- 设备使用手册(范例模板)
- 上海房屋修缮工程培训课件
- 医院电梯安全操作培训记录
评论
0/150
提交评论