1、 添加、编辑、删除文章功能 用户、类别、评论的管理功能二、数据库设计2.1、E-R图2.2、表结构设计用户信息表 userinfo列名数据类型useridIntusernameVarchar2(50)userpasswordusertype文章信息表 ArticlesA_idNumberA_titleA_contentVarchar2(4000)A_publishedtimeDateT_namea_commentnum评论数量numberA_viewnum阅读数量文章分类表 TagsT_id评论信息表 CommentsC_idC_usernameVarchat2(50)C_commentC_l
2、eavetimedate三博客系统的性能需求该系统在性能功能上应达到如下需求: 操作简单、界面友好: 完全控件式的页面布局,使得文章的录入工作更简便,许多选项只需要点击鼠标就可以完成;另外,跟踪出现的提示信息也让用户随时清楚自己的操作情况。对常见网站的博客管理的各个方面:上传博客、浏览、删除、修改等方面都大体实现,实现了网站对即时文章的管理要求; 即时可见:对文章的处理(包括添加、编辑、删除)将立即在主页的对应栏目显示出来,达到“即时发布、即时见效”的功能; 系统运行应该快速、稳定、高效和可靠; 在结构上应具有很好的可扩展性,便于将来的功能扩展和维护。四 系统结构实现过程整个系统的工作流程为:
3、打开该系统网站,游客能浏览、阅读文章,能进行注册,注册后成为注册用户,注册用户登录后能够对文章进行评论。博主从后台入口登录,可以添加文章,包括文章标题、类别、内容;还能对用户、文章、类别、评论进行管理。数据库中主要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
4、%type default 0,viewnum 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 addcommentaid in comment
5、s.a_id%type,c_content in comments.c_comment%type,cname in comments.c_username%typeas begininsert into comments (a_id, c_comment, c_username, c_leavetime)values (aid, c_content, cname, sysdate);end addcomment;-ADDTAGcreate or replace procedure addtagtagname in tags.t_name%type)asinsert into tags(t_na
6、me) values (tagname);end addtag;-ADDUSERScreate or replace procedure addusersv_name in varchar2,v_password in varchar2,v_type in userinfo.usertype%type default 0insert into userinfo(username,userpassword,usertype)values (v_name,v_password,v_type);end addusers;-CHECKADMINcreate or replace procedure c
7、heckadminv_username in varchar2,result out numberisl_count number;select count(*) into l_count from userinfowhere USERNAME = v_username and USERPASSWORD = v_password and usertype = 1;if l_count=0 thenresult:=-1;else=1;end if;end checkadmin;-CHECKUSERScreate or replace procedure checkusers(v_username
8、 in varchar2,result out number)where USERNAME = v_username and USERPASSWORD = v_password and usertype=0;end checkusers;-DELETEARTICLEcreate or replace procedure deletearticleid_in in numberdelete from articles where a_id=id_in;end deletearticle;-DELETECOMMENTcreate or replace procedure deletecomment
9、delete from comments where c_id=id_in;end deletecomment;-DELETETAGcreate or replace procedure deletetagdelete from tags where t_name=tagname;end deletetag;-DELETEUSERcreate or replace procedure deleteuser(id_in in number) as此次调查以女生为主,男生只占很少比例,调查发现58的学生月生活费基本在400元左右,其具体分布如(图1-1)delete from userinfo w
10、here userid=id_in;end deleteuser;(二)创业优势分析-selectarticlecreate or replace procedure selectarticle2、Google网站www。people。com。cn(cur out article_type.cur_type这里有营业员们向顾客们示范着制作各种风格炯异的饰品,许多顾客也是学得不亦乐乎。据介绍,经常光顾“碧芝”的都是些希望得到世界上“独一无二”饰品的年轻人,他们在琳琅满目的货架上挑选,然后亲手串连,他们就是偏爱这种的方式,完全自助在现场,有上班族在里面精挑细选成品,有细心的小女孩在仔细盘算着用料和
11、价钱,准备自己制作的原料。可以想见,用本来稀奇的原料,加上别具匠心的制作,每一款成品都必是独一无二的。而这也许正是自己制造所能带来最大的快乐吧。营销调研课题open cur forselect * from articles;因此不难看出,自制饰品在校园里也大有市场所在。对于那些走在流行前端的女生来说,捕捉新事物便捕捉到了时尚与个性。end;据介绍,经常光顾“碧芝”的都是些希望得到世界上“独一无二”饰品的年轻人,他们在琳琅满目的货架上挑选,然后亲手串连,他们就是偏爱这种的方式,完全自助。-selectcommentcreate or replace procedure selectcommen
12、t300-400元 16 32%aid in comments.a_id%type,cur out comment_type.cur_type我们女生之所以会钟爱饰品,也许是因为它的新颖,可爱,实惠,时尚,简单等。的确,手工艺品价格适中。也许还有更多理由和意义。那么大学生最喜欢哪种手工艺品呢?此次调查统计如下图(1-3)(4) 信息技术优势isopen cur forselect * from comments where a_id=aid;-selecttagcreate or replace procedure selecttagcur out tag_type.cur_typeselec
13、t * from tags;-updatearticlecreate or replace procedure updatearticleid_in number,tagname in articles.t_name%typeupdate articles set a_title = title, a_content = content , t_name = tagname where a_id = id_in;end updatearticle;-updatepwdcreate or replace procedure updatepwdu_password in userinfo.userpassword%typeupdate userinfo set userpassword=u_password where userid=1;end updatepwd;-updatetagcreate or replace procedure updatetagid_in in number,tagname in varchar2update tags set t_name=tagname where t_id=id_in;end updatetag;
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1