个人博客需求分析.docx

上传人:牧羊曲112 文档编号:3211960 上传时间:2023-03-11 格式:DOCX 页数:10 大小:38.84KB
返回 下载 相关 举报
个人博客需求分析.docx_第1页
第1页 / 共10页
个人博客需求分析.docx_第2页
第2页 / 共10页
个人博客需求分析.docx_第3页
第3页 / 共10页
个人博客需求分析.docx_第4页
第4页 / 共10页
个人博客需求分析.docx_第5页
第5页 / 共10页
亲,该文档总共10页,到这儿已超出免费预览范围,如果喜欢就下载吧!
资源描述

《个人博客需求分析.docx》由会员分享,可在线阅读,更多相关《个人博客需求分析.docx(10页珍藏版)》请在三一办公上搜索。

1、个人博客需求分析个人博客需求分析 含有Oracle数据库主要存储过程语句 一 需求分析 该系统为个人博客,具有一般博客系统的功能。 博主,即管理员,拥有最高权限,能对文章,分类,评论,用户等进行管理。游客只能浏览前台页面,及浏览文章。只有游客注册成为注册用户后,才能对文章进行评论。 根据以上需求分析,该系统要实现的主要功能为: u 前台显示文章部分 l 显示最新的前几篇文章 l 显示所有文章分类 l 按分类显示其下的所有文章 l 文章详细信息浏览阅读 l 游客注册以及注册用户的登录 l 评论文章功能 后台管理部分 登录验证,只有博主能登录 添加、编辑、删除文章功能 用户、类别、评论的管理功能

2、博客系统 游 客 注册用户 博主 浏览首页 阅读文章 浏览首页 阅读文章 评论文章 信息管理 文章管理 类别管理 删除评论 修改密码 用户管理 添加文章 编辑文章 删除文章 添加类别 系统功能模块图 编辑删除类别 二、数据库设计 2.1、E-R图 管理 1 1 管理 n 博主 1 管理 n评论 n 包含 1 文章 1 分类 1 类别 n n 阅读 1 1 1 发表 n 注册用户 游客 总E-R图 2.2、表结构设计 用户信息表 userinfo 列名 userid username userpassword usertype 文章信息表 Articles 列名 A_id A_title 数据类

3、型 Number Varchar2(50) 数据类型 Int Varchar2(50) Varchar2(50) Int A_content A_publishedtime T_name Varchar2(4000) Date Varchar2(50) a_commentnum评论数量 number A_viewnum阅读数量 文章分类表 Tags 列名 T_id T_name 评论信息表 Comments 列名 C_id A_id C_username C_comment C_leavetime 数据类型 number number Varchat2(50) Varchar2(50) dat

4、e 数据类型 number Varchar2(50) number 三博客系统的性能需求 该系统在性能功能上应达到如下需求: 操作简单、界面友好: 完全控件式的页面布局,使得文章的录入工作更简便,许多选项只需要点击鼠标就可以完成;另外,跟踪出现的提示信息也让用户随时清楚自己的操作情况。对常见网站的博客管理的各个方面:上传博客、浏览、删除、修改等方面都大体实现,实现了网站对即时文章的管理要求; 即时可见:对文章的处理将立即在主页的对应栏目显示出来,达到“即时发布、即时见效”的功能; 系统运行应该快速、稳定、高效和可靠; 在结构上应具有很好的可扩展性,便于将来的功能扩展和维护。 四 系统结构实现过

5、程 开始 浏览文章 否 是否登录 是 登录 评论文章 否 是否是博主 是 是否管理文章 是 文章管理 否 是否管理评论 是 评论管理 否 是否管理类型 是 类型管理 否 是否管理用户 是 用户管理 退出 系统流程图 整个系统的工作流程为: 打开该系统网站,游客能浏览、阅读文章,能进行注册,注册后成为注册用户,注册用户登录后能够对文章进行评论。博主从后台入口登录,可以添加文章,包括文章标题、类别、内容;还能对用户、文章、类别、评论进行管理。 数据库中主要Oracle操作语句 -ADDARTICLE create or replace procedure addarticle ( title in

6、 articles.a_title%type, content in articles.a_content%type, tagname in articles.t_name%type, commentnum in articles.a_commentnum%type default 0, viewnum in articles.a_viewnum%type default 0 ) as begin insert into articles ( a_title, a_content, t_name, a_publishedtime, a_commentnum, a_viewnum) values

7、(title, content, tagname, sysdate, commentnum, viewnum); end addarticle; -ADDCOMMENT create or replace procedure addcomment ( aid in comments.a_id%type, c_content in comments.c_comment%type, cname in comments.c_username%type ) as begin insert into comments (a_id, c_comment, c_leavetime) values (aid,

8、 c_content, cname, sysdate); end addcomment; -ADDTAG create or replace procedure addtag ( tagname in tags.t_name%type )as begin insert into tags(t_name) values (tagname); end addtag; c_username, -ADDUSERS create or replace procedure addusers ( v_name in varchar2, v_password in varchar2, v_type in us

9、erinfo.usertype%type default 0 ) as begin insert into userinfo(username,userpassword,usertype) values (v_name,v_password,v_type); end addusers; -CHECKADMIN create or replace procedure checkadmin ( v_username in varchar2, v_password in varchar2, result out number ) is l_count number; begin select cou

10、nt(*) into l_count from userinfo where USERNAME = v_username and USERPASSWORD = v_password and usertype = 1; if l_count=0 then result:=-1; else result:=1; end if; end checkadmin; -CHECKUSERS create or replace procedure checkusers (v_username in varchar2, v_password in varchar2, result out number) is

11、 l_count number; begin select count(*) into l_count from userinfo where USERNAME = v_username and USERPASSWORD = v_password and usertype=0; if l_count=0 then result:=-1; else result:=1; end if; end checkusers; -DELETEARTICLE create or replace procedure deletearticle ( id_in in number )as begin delet

12、e from articles where a_id=id_in; end deletearticle; -DELETECOMMENT create or replace procedure deletecomment ( id_in in number )as begin delete from comments where c_id=id_in; end deletecomment; -DELETETAG create or replace procedure deletetag ( tagname in tags.t_name%type )as begin delete from tag

13、s where t_name=tagname; end deletetag; -DELETEUSER create or replace procedure deleteuser(id_in in number) as begin delete from userinfo where userid=id_in; end deleteuser; -selectarticle create or replace procedure selectarticle ( cur out article_type.cur_type ) is begin open cur for select * from

14、articles; end; -selectcomment create or replace procedure selectcomment ( aid in comments.a_id%type, cur out comment_type.cur_type ) is begin open cur for select * from comments where a_id=aid; end; -selecttag create or replace procedure selecttag ( cur out tag_type.cur_type ) is begin open cur for

15、select * from tags; end; -updatearticle create 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 )as begin update articles set a_title = title, a_content = content , t_name = tagname where a_id = id_

16、in; end updatearticle; -updatepwd create or replace procedure updatepwd ( u_password in userinfo.userpassword%type )as begin update userinfo set userpassword=u_password userid=1; end updatepwd; -updatetag create or replace procedure updatetag ( id_in in number, tagname in varchar2 )as begin update tags set t_name=tagname where t_id=id_in; end updatetag; where

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 生活休闲 > 在线阅读


备案号:宁ICP备20000045号-2

经营许可证:宁B2-20210002

宁公网安备 64010402000987号