




版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、个人博客需求分析含有Oracle数据库主要存储过程语句一 需求分析该系统为个人博客,具有一般博客系统的功能。博主,即管理员,拥有最高权限,能对文章,分类,评论,用户等进行管理。游客只能浏览前台页面,及浏览文章。只有游客注册成为注册用户后,才能对文章进行评论。根据以上需求分析,该系统要实现的主要功能为:u 前台显示文章部分l 显示最新的前几篇文章l 显示所有文章分类l 按分类显示其下的所有文章l 文章详细信息浏览阅读l 游客注册以及注册用户的登录l 评论文章功能 后台管理部分 登录验证,只有博主能登录 添加、编辑、删除文章功能 用户、类别、评论的管理功能编辑删除类别添加类别删除文章编辑文章用户管
2、理修改密码添加文章信息管理文章管理类别管理删除评论阅读文章浏览首页阅读文章浏览首页评论文章博客系统游 客注册用户博主系统功能模块图二、数据库设计2.1、E-R图文章注册用户游客博主评论类别分类发表管理管理阅读包含管理11nn1111nn1nn11n总E-R图2.2、表结构设计用户信息表 userinfo列名数据类型useridIntusernameVarchar2(50)userpasswordVarchar2(50)usertypeInt文章信息表 Articles列名数据类型A_idNumberA_titleVarchar2(50)A_contentVarchar2(4000)A_publ
3、ishedtimeDateT_nameVarchar2(50)a_commentnum评论数量numberA_viewnum阅读数量number文章分类表 Tags列名数据类型T_idnumberT_nameVarchar2(50)评论信息表 Comments列名数据类型C_idnumberA_idnumberC_usernameVarchat2(50)C_commentVarchar2(50)C_leavetimedate三博客系统的性能需求该系统在性能功能上应达到如下需求: 操作简单、界面友好: 完全控件式的页面布局,使得文章的录入工作更简便,许多选项只需要点击鼠标就可以完成;另外,跟踪出
4、现的提示信息也让用户随时清楚自己的操作情况。对常见网站的博客管理的各个方面:上传博客、浏览、删除、修改等方面都大体实现,实现了网站对即时文章的管理要求; 即时可见:对文章的处理(包括添加、编辑、删除)将立即在主页的对应栏目显示出来,达到“即时发布、即时见效”的功能; 系统运行应该快速、稳定、高效和可靠; 在结构上应具有很好的可扩展性,便于将来的功能扩展和维护。四 系统结构实现过程开始退出是否登录是否管理文章是否是博主是否管理用户是否管理评论是否管理类型登录评论文章浏览文章是是是是否否否文章管理类型管理评论管理用户管理是是否否系统流程图整个系统的工作流程为:打开该系统网站,游客能浏览、阅读文章,
5、能进行注册,注册后成为注册用户,注册用户登录后能够对文章进行评论。博主从后台入口登录,可以添加文章,包括文章标题、类别、内容;还能对用户、文章、类别、评论进行管理。数据库中主要Oracle操作语句-ADDARTICLEcreate or replace procedure addarticle(title in articles.a_title%type,content in articles.a_content%type,tagname in articles.t_name%type,commentnum in articles.a_commentnum%type default 0,vie
6、wnum in articles.a_viewnum%type default 0)asbegininsert into articles ( a_title, a_content, t_name, a_publishedtime, a_commentnum, a_viewnum)values(title, content, tagname, sysdate, commentnum, viewnum);end addarticle;-ADDCOMMENTcreate or replace procedure addcomment(aid in comments.a_id%type,c_cont
7、ent in comments.c_comment%type,cname in comments.c_username%type)as begininsert into comments (a_id, c_comment, c_username, c_leavetime)values (aid, c_content, cname, sysdate);end addcomment;-ADDTAGcreate or replace procedure addtag(tagname in tags.t_name%type)asbegininsert into tags(t_name) values
8、(tagname);end addtag;-ADDUSERScreate or replace procedure addusers(v_name in varchar2,v_password in varchar2,v_type in userinfo.usertype%type default 0)asbegininsert into userinfo(username,userpassword,usertype)values (v_name,v_password,v_type);end addusers;-CHECKADMINcreate or replace procedure che
9、ckadmin(v_username in varchar2,v_password in varchar2,result out number)isl_count number;beginselect count(*) into l_count from userinfowhere USERNAME = v_username and USERPASSWORD = v_password and usertype = 1;if l_count=0 thenresult:=-1;elseresult:=1;end if;end checkadmin;-CHECKUSERScreate or repl
10、ace procedure checkusers(v_username in varchar2,v_password in varchar2,result out number)isl_count number;beginselect count(*) into l_count from userinfowhere USERNAME = v_username and USERPASSWORD = v_password and usertype=0;if l_count=0 thenresult:=-1;elseresult:=1;end if;end checkusers;-DELETEART
11、ICLEcreate or replace procedure deletearticle(id_in in number)asbegindelete from articles where a_id=id_in;end deletearticle;-DELETECOMMENTcreate or replace procedure deletecomment(id_in in number)asbegindelete from comments where c_id=id_in;end deletecomment;-DELETETAGcreate or replace procedure de
12、letetag(tagname in tags.t_name%type)asbegindelete from tags where t_name=tagname;end deletetag;-DELETEUSERcreate or replace procedure deleteuser(id_in in number) asbegindelete from userinfo where userid=id_in;end deleteuser;-selectarticlecreate or replace procedure selectarticle(cur out article_type
13、.cur_type)isbeginopen cur forselect * from articles;end;-selectcommentcreate or replace procedure selectcomment(aid in comments.a_id%type,cur out comment_type.cur_type)isbeginopen cur forselect * from comments where a_id=aid;end;-selecttagcreate or replace procedure selecttag(cur out tag_type.cur_ty
14、pe)isbeginopen cur forselect * from tags;end;-updatearticlecreate or replace procedure updatearticle(id_in number,title in articles.a_title%type,content in articles.a_content%type,tagname in articles.t_name%type)asbeginupdate articles set a_title = title, a_content = content , t_name = tagname where a_id = id_in;end updatearticle;-updatepwdcreate or replace procedure updatepwd(u_password in userinfo.userpassword%type)asbegi
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025年02月湖北荆州监利市事业单位统一公开招聘工作人员221人笔试历年典型考题(历年真题考点)解题思路附带答案详解
- 水电物业合同范本
- 科技助力健康糖尿病患者用好中药泡脚的秘诀
- 公墓售卖合同范本
- 秋季幼儿户外活动的意义与实施策略
- 2025至2030年中国汽车卡扣数据监测研究报告
- 2024年台州职业技术学院招聘考试真题
- 2024年山东临沂兰山区事业单位招聘综合类岗位考试真题
- 2024年江苏南京鼓楼医院人力资源服务中心岗位招聘笔试真题
- 电子工程设计的教育培训体系建设
- Q∕GDW 11612.41-2018 低压电力线高速载波通信互联互通技术规范 第4-1部分:物理层通信协议
- 2006 年全国高校俄语专业四级水平测试试卷
- 浙江省劳动保障监察员培训监察执法程序(林琳)
- 新人教版数学四年级下册全册表格式教案
- 疫情期间离市外出审批表
- (完整版)全身体格检查评分标准(表)
- 装饰装修工程施工合理化建议和降低成本措施提要:完整
- (改)提高地下室侧墙刚性防水施工合格率_图文
- 电芯品质协议版本(标准版)
- 食管癌化疗临床路径(最全版)
- 食品销售经营者食品安全管理制度(零售)
评论
0/150
提交评论