荟聚奇文、博采众长、见贤思齐
当前位置:公文素材库 > 计划总结 > 工作总结 > B2C校园网上书店需求分析 课程设计总结报告

B2C校园网上书店需求分析 课程设计总结报告

网站:公文素材库 | 时间:2019-05-29 14:30:42 | 移动端:B2C校园网上书店需求分析 课程设计总结报告

B2C校园网上书店需求分析 课程设计总结报告

附表2

漳州师范学院计算机科学与工程系

数据库课程设计总结报告

学生学号080811403专业软件工程方向姓名班级蔡品芳08计非师(4)班所属学期201*-201*学年第1学期一、项目介绍与设计目的本项目主要针对于校园二手图书交易而开发。系统可以向浏览者提供出售的图书的信息,并进行购买等操作。并且给店主(管理员)一个条理清楚,操作简便的管理平台。为买家和卖家提供方便实用高效的交易平台。二、项目环境要求本网站为ASP.NET网站,采用VisualStudio201*开发环境,运行时需要安装IIS和.NETFramework3.5。三、项目功能模块根据买家和卖家所涉及到的行为,可以把系统基本分为5个功能模块:1.人员信息管理模块2.商品呈现模块3.购物车模块4.商品管理模块5.订单管理模块四、小组成员名单及分工情况(要求包括小组成员名单、工作分配及小组各成员贡献度))个人作品五、程序用户名及密码管理员密码为:080811403六、体会与感想1.在做购物网站过程中,购物车的模块很关键,其逻辑比起其他模块要稍稍复杂一点。一个是购物行为前对登录的验证,购物时商品信息的传递,以及结算,修改,删除等操作都必须将逻辑弄清楚,因为购物车模块的信息直接关系到订单表和订单明细表数据的正确性。2.整个网站的页面数据传递有很多种方式,但其安全性和灵活度都不一样,要考虑相应的情况选择合适的传值方式。3.后台数据完善后,要考虑如何将数据更合理地呈现给前台的用户,不需要呈现所有数据,要站在用户的角度进行思考,将有效呈现数据最大提高。七、指导教师意见指导教师(签名):年月日注:该表格由学生填写,内容采用小四号宋体。

扩展阅读:网上书店项目总结报告

数据库代码:

/*==============================================================*//*DBMSname:MicrosoftSQLServer201**//*Createdon:201*-11-29:27:06*/

/*==============================================================*/

ifexists(select1

fromsys.sysreferencesrjoinsys.sysobjectsoon(o.id=r.constidando.type="F")wherer.fkeyid=object_id("Administrators")ando.name="FK_ADMINIST_REFERENCE_USERS")altertableAdministrators

dropconstraintFK_ADMINIST_REFERENCE_USERSgo

ifexists(select1

fromsys.sysreferencesrjoinsys.sysobjectsoon(o.id=r.constidando.type="F")wherer.fkeyid=object_id("Re_status")ando.name="FK_RE_STATU_REFERENCE_ADMINIST")altertableRe_status

dropconstraintFK_RE_STATU_REFERENCE_ADMINISTgo

ifexists(select1

fromsys.sysreferencesrjoinsys.sysobjectsoon(o.id=r.constidando.type="F")

wherer.fkeyid=object_id("books")ando.name="FK_BOOKS_REFERENCE_BOOKTYPE")altertablebooks

dropconstraintFK_BOOKS_REFERENCE_BOOKTYPEgo

ifexists(select1

fromsys.sysreferencesrjoinsys.sysobjectsoon(o.id=r.constidando.type="F")

wherer.fkeyid=object_id("books")ando.name="FK_BOOKS_REFERENCE_PUBLISH")altertablebooks

dropconstraintFK_BOOKS_REFERENCE_PUBLISHgo

ifexists(select1

fromsys.sysreferencesrjoinsys.sysobjectsoon(o.id=r.constidando.type="F")wherer.fkeyid=object_id("booktype")ando.name="FK_BOOKTYPE_REFERENCE_BOOKTYPE")altertablebooktype

dropconstraintFK_BOOKTYPE_REFERENCE_BOOKTYPEgo

ifexists(select1

fromsys.sysreferencesrjoinsys.sysobjectsoon(o.id=r.constidando.type="F")wherer.fkeyid=object_id("leaveWords")ando.name="FK_LEAVEWOR_REFERENCE_USERS")altertableleaveWords

dropconstraintFK_LEAVEWOR_REFERENCE_USERSgo

ifexists(select1

fromsys.sysreferencesrjoinsys.sysobjectsoon(o.id=r.constidando.type="F")

wherer.fkeyid=object_id("limite")ando.name="FK_LIMITE_REFERENCE_ADMINIST")altertablelimite

dropconstraintFK_LIMITE_REFERENCE_ADMINISTgo

ifexists(select1

fromsys.sysreferencesrjoinsys.sysobjectsoon(o.id=r.constidando.type="F")

wherer.fkeyid=object_id("model")ando.name="FK_MODEL_REFERENCE_LIMITE")altertablemodel

dropconstraintFK_MODEL_REFERENCE_LIMITEgo

ifexists(select1

fromsys.sysreferencesrjoinsys.sysobjectsoon(o.id=r.constidando.type="F")

wherer.fkeyid=object_id("orders")ando.name="FK_ORDERS_REFERENCE_SHIPPED")altertableorders

dropconstraintFK_ORDERS_REFERENCE_SHIPPEDgo

ifexists(select1

fromsys.sysreferencesrjoinsys.sysobjectsoon(o.id=r.constidando.type="F")

wherer.fkeyid=object_id("orders")ando.name="FK_ORDERS_REFERENCE_BOOKS")altertableorders

dropconstraintFK_ORDERS_REFERENCE_BOOKSgo

ifexists(select1

fromsys.sysreferencesrjoinsys.sysobjectsoon(o.id=r.constidando.type="F")

wherer.fkeyid=object_id("orders")ando.name="FK_ORDERS_REFERENCE_USERS")altertableorders

dropconstraintFK_ORDERS_REFERENCE_USERSgoifexists(select1

fromsys.sysreferencesrjoinsys.sysobjectsoon(o.id=r.constidando.type="F")

wherer.fkeyid=object_id("sales")ando.name="FK_SALES_REFERENCE_ORDERS")altertablesales

dropconstraintFK_SALES_REFERENCE_ORDERSgo

ifexists(select1

fromsys.sysreferencesrjoinsys.sysobjectsoon(o.id=r.constidando.type="F")

wherer.fkeyid=object_id("shipped")ando.name="FK_SHIPPED_REFERENCE_SALES")altertableshipped

dropconstraintFK_SHIPPED_REFERENCE_SALESgo

ifexists(select1

fromsys.sysreferencesrjoinsys.sysobjectsoon(o.id=r.constidando.type="F")wherer.fkeyid=object_id("shoppingcar")ando.name="FK_SHOPPING_REFERENCE_BOOKTYPE")altertableshoppingcar

dropconstraintFK_SHOPPING_REFERENCE_BOOKTYPEgo

ifexists(select1

fromsys.sysreferencesrjoinsys.sysobjectsoon(o.id=r.constidando.type="F")wherer.fkeyid=object_id("shoppingcar")ando.name="FK_SHOPPING_REFERENCE_BOOKS")altertableshoppingcar

dropconstraintFK_SHOPPING_REFERENCE_BOOKSgo

ifexists(select1

fromsys.sysreferencesrjoinsys.sysobjectsoon(o.id=r.constidando.type="F")wherer.fkeyid=object_id("shoppingcar")ando.name="FK_SHOPPING_REFERENCE_USERS")altertableshoppingcar

dropconstraintFK_SHOPPING_REFERENCE_USERSgo

ifexists(select1

fromsys.sysreferencesrjoinsys.sysobjectsoon(o.id=r.constidando.type="F")

wherer.fkeyid=object_id("users")ando.name="FK_USERS_REFERENCE_LIMITE")altertableusers

dropconstraintFK_USERS_REFERENCE_LIMITEgo

ifexists(select1

fromsysobjects

whereid=object_id("Administrators")andtype="U")droptableAdministratorsgo

ifexists(select1

fromsysobjects

whereid=object_id("Re_status")andtype="U")droptableRe_statusgo

ifexists(select1

fromsysobjects

whereid=object_id("books")andtype="U")droptablebooksgo

ifexists(select1

fromsysobjects

whereid=object_id("booktype")andtype="U")droptablebooktypego

ifexists(select1

fromsysobjects

whereid=object_id("booktype2")andtype="U")droptablebooktype2go

ifexists(select1

fromsysobjects

whereid=object_id("discount")andtype="U")droptablediscountgo

ifexists(selectfromsysobjects

whereid=object_id("leaveWords")andtype="U")droptableleaveWordsgo

ifexists(select1

fromsysobjects

whereid=object_id("limite")andtype="U")droptablelimitego

ifexists(select1

fromsysobjects

whereid=object_id("model")andtype="U")droptablemodelgo

ifexists(select1

fromsysobjects

whereid=object_id("orders")andtype="U")droptableordersgo

ifexists(select1

fromsysobjects

whereid=object_id("publish")andtype="U")droptablepublishgo

ifexists(select1

fromsysobjects

whereid=object_id("sales")andtype="U")droptablesalesgo

ifexists(select1

fromsysobjects

whereid=object_id("shipped")andtype="U")droptableshippedgo

ifexists(select1

fromsysobjects

whereid=object_id("shoppingcar")andtype="U")droptableshoppingcargo

ifexists(select1

fromsysobjects

whereid=object_id("users")andtype="U")droptableusersgo

/*==============================================================*//*Table:Administrators*/

/*==============================================================*/createtableAdministrators(

Administrator_idvarchar(50)notnull,Usernamevarchar(20)null,Administrator_namevarchar(20)notnull,Administrator_passwordvarchar(50)notnull,"Administrator_e-mall"varchar(30)null,

constraintPK_ADMINISTRATORSprimarykey(Administrator_id))go

/*==============================================================*//*Table:Re_status*/

/*==============================================================*/createtableRe_status(

Administrator_idvarchar(50)notnull,Usernamevarchar(10)notnull,Re_status_datedatetimenotnull,Subjectvarchar(10)notnull,re_ststus_texevarchar(201*)null,

Re_statusvarchar(2)notnull,constraintPK_RE_STATUSprimarykey(Administrator_id))go

/*==============================================================*//*Table:books*/

/*==============================================================*/createtablebooks(

bookIDvarchar(50)notnull,Smalltype_idvarchar(50)null,Pub_idvarchar(50)null,titlevarchar(80)notnull,pricedoubleprecisionnotnull,authorvarchar(10)notnull,Versionvarchar(20)null,Publishdatedatetimenull,introductionvarchar(201*)null,

typevarchar(50)notnull,stock_qtyintnull,constraintPK_BOOKSprimarykey(bookID))go

/*==============================================================*//*Table:booktype*/

/*==============================================================*/createtablebooktype(

Smalltype_idvarchar(50)notnull,Bigtype_idvarchar(50)notnull,Bigtype_namevarchar(50)notnull,constraintPK_BOOKTYPEprimarykey(Smalltype_id))go

/*==============================================================*//*Table:booktype2*/

/*==============================================================*/createtablebooktype2(

Smalltype_idvarchar(50)notnull,Smalltype_namevarchar(50)notnull,Bigtype_idvarchar(50)notnull,constraintPK_BOOKTYPE2primarykey(Smalltype_id))go

/*==============================================================*//*Table:discount*//*==============================================================*/createtablediscount(

datetimevarchar(10)notnull,discountdoubleprecisionnotnull,remarkdatetimenotnull,constraintPK_DISCOUNTprimarykey(datetime))go

/*==============================================================*//*Table:leaveWords*/

/*==============================================================*/createtableleaveWords(

Lword_idvarchar(50)notnull,use_Usernamevarchar(20)null,Usernamevarchar(6)notnull,Subjectvarchar(6)notnull,Submit_datedatetimenull,Lword_texevarchar(4000)null,Re_statusvarchar(10)null,constraintPK_LEAVEWORDSprimarykey(Lword_id))go

/*==============================================================*//*Table:limite*/

/*==============================================================*/createtablelimite(

usernamevarchar(20)notnull,Administrator_idvarchar(50)null,user_limitevarchar(2)notnull,constraintPK_LIMITEprimarykey(username))go

/*==============================================================*//*Table:model*/

/*==============================================================*/createtablemodel(

model_idvarchar(10)notnull,usernamevarchar(20)null,modelnamevarchar(20)notnull,remarkvarchar(20)notnull,constraintPK_MODELprimarykey(model_id))go

/*==============================================================*//*Table:orders*/

/*==============================================================*/createtableorders(

Order_idvarchar(50)notnull,bookIDvarchar(50)null,Usernamevarchar(20)null,Ship_idvarchar(50)null,shipaddressvarchar(50)notnull,Order_datedatetimenotnull,Book_idvarchar(50)notnull,quantityintnotnull,statusvarchar(2)notnull,constraintPK_ORDERSprimarykey(Order_id))go

/*==============================================================*//*Table:publish*/

/*==============================================================*/createtablepublish(

Pub_idvarchar(50)notnull,Pub_namevarchar(50)notnull,Pub_phonevarchar(15)notnull,Pub_addvarchar(50)notnull,constraintPK_PUBLISHprimarykey(Pub_id))go

/*==============================================================*//*Table:sales*/

/*==============================================================*/createtablesales(

Sale_idvarchar(50)notnull,Order_idvarchar(50)null,Sale_datedatetimenull,Salervarchar(20)notnull,Sale_statusvarchar(2)null,constraintPK_SALESprimarykey(Sale_id))go

/*==============================================================*//*Table:shipped*/

/*==============================================================*/createtableshipped(

Ship_idvarchar(50)notnull,Sale_idvarchar(50)null,receive_namevarchar(10)notnull,receive_addressvarchar(50)notnull,Ship_datedatetimenotnull,Ship_manvarchar(10)notnull,receive_postcodevarchar(6)notnull,receive_telephonevarchar(20)notnull,constraintPK_SHIPPEDprimarykey(Ship_id))go

/*==============================================================*//*Table:shoppingcar*/

/*==============================================================*/createtableshoppingcar(

shoppingcaridvarchar(10)notnull,Smalltype_idvarchar(50)null,bookIDvarchar(50)null,Usernamevarchar(20)null,totalpricedoubleprecisionnotnull,

constraintPK_SHOPPINGCARprimarykey(shoppingcarid))go

/*==============================================================*//*Table:users*/

/*==============================================================*/createtableusers(

Usernamevarchar(20)notnull,lim_usernamevarchar(20)null,Passwordvarchar(10)notnull,degreevarchar(2)notnull,Phonevarchar(15)null,"E-mall"varchar(30)null,Addressvarchar(100)notnull,True_namevarchar(10)notnull,Postcodevarchar(6)notnull,constraintPK_USERSprimarykey(Username))go

altertableAdministrators

addconstraintFK_ADMINIST_REFERENCE_USERSforeignkey(Username)referencesusers(Username)go

altertableRe_status

addconstraintFK_RE_STATU_REFERENCE_ADMINISTforeignkey(Administrator_id)referencesAdministrators(Administrator_id)go

altertablebooks

addconstraintFK_BOOKS_REFERENCE_BOOKTYPEforeignkey(Smalltype_id)referencesbooktype(Smalltype_id)go

altertablebooks

addconstraintFK_BOOKS_REFERENCE_PUBLISHforeignkey(Pub_id)referencespublish(Pub_id)go

altertablebooktype

addconstraintFK_BOOKTYPE_REFERENCE_BOOKTYPEforeignkey(Smalltype_id)referencesbooktype2(Smalltype_id)go

altertableleaveWords

addconstraintFK_LEAVEWOR_REFERENCE_USERSforeignkey(use_Username)referencesusers(Username)go

altertablelimite

addconstraintFK_LIMITE_REFERENCE_ADMINISTforeignkey(Administrator_id)referencesAdministrators(Administrator_id)go

altertablemodel

addconstraintFK_MODEL_REFERENCE_LIMITEforeignkey(username)referenceslimite(username)go

altertableordersaddconstraintFK_ORDERS_REFERENCE_SHIPPEDforeignkey(Ship_id)referencesshipped(Ship_id)go

altertableorders

addconstraintFK_ORDERS_REFERENCE_BOOKSforeignkey(bookID)referencesbooks(bookID)go

altertableorders

addconstraintFK_ORDERS_REFERENCE_USERSforeignkey(Username)referencesusers(Username)go

altertablesales

addconstraintFK_SALES_REFERENCE_ORDERSforeignkey(Order_id)referencesorders(Order_id)go

altertableshipped

addconstraintFK_SHIPPED_REFERENCE_SALESforeignkey(Sale_id)referencessales(Sale_id)go

altertableshoppingcar

addconstraintFK_SHOPPING_REFERENCE_BOOKTYPEforeignkey(Smalltype_id)referencesbooktype2(Smalltype_id)go

altertableshoppingcar

addconstraintFK_SHOPPING_REFERENCE_BOOKSforeignkey(bookID)referencesbooks(bookID)go

altertableshoppingcar

addconstraintFK_SHOPPING_REFERENCE_USERSforeignkey(Username)referencesusers(Username)go

altertableusers

addconstraintFK_USERS_REFERENCE_LIMITEforeignkey(lim_username)referenceslimite(username)go

DB类:

usingSystem;

usingSystem.Collections.Generic;usingSystem.Text;

namespaceDBLib{

//////DB类的摘要说明。

///提供访问SQLServer的基本方法

///publicclassDB{

publicDB(){}

//connStr为访问SQLServer201*的连接字符串

//下面是临时调试使用的方法,直接设置联接字符串。

stringconnStr="server=.;database=bookstore;integratedsecurity=SSPI";

#region获取查询结果,DataSetGetSqlDataSet(stringsqlString)///

///获取查询结果。返回类型为DataSet///sqlString参数为查询的SQL语句///

publicDataSetGetSqlDataSet(stringsqlString){

//定义返回变量

//实例化数据集DataSet,对象名为dsDataSetds=newDataSet();try{

//实例化连接对象SqlConnection,对象名为sqlConnSqlConnectionsqlConn=newSqlConnection(connStr);

//用查询的SQL(sqlString)语句和连接对象sqlConn实例化数据接口SqlDataAdapter//对象名为da

SqlDataAdapterda=newSqlDataAdapter(sqlString,sqlConn);

//da.Fill(ds)是数据接口(SqlDataAdapter)提供的方法//具体作用为://打开与数据库的连接

//将查询的SQL语句发送到数据库服务器//接受返回的查询结果

//并将结果填充到数据集对象ds中//关闭与数据库的连接da.Fill(ds);}

catch(Exceptione){

//抛出捕捉到的异常throw(e);}

//返回查询到的结果returnds;}

#endregion

#region执行增、删或改的SQL语句intExecuteSql(stringsqlString)///

///执行增、删或改的SQL语句///返回值为受影响的行数(记录数)///sqlString参数为增、删或改的SQL语句///

publicintExecuteSql(stringsqlString){

inti=0;try{

////实例化连接对象SqlConnection,对象名为sqlConnSqlConnectionsqlConn=newSqlConnection(connStr);

//用查询的SQL(sqlString)语句和连接对象sqlConn实例化SqlCommand//对象名为sqlCmd

SqlCommandsqlCmd=newSqlCommand(sqlString,sqlConn);

//打开与数据库的连接sqlConn.Open();

//将增、删或改的SQL语句发送到数据库服务器

//并接受返回的结果,返回的结果为受影响的行数(记录数)i=sqlCmd.ExecuteNonQuery();

//关闭与数据库的连接sqlConn.Close();}

catch(Exceptione){

Exceptionee=newException(sqlString+e.Message);throw(ee);}

returni;}

#endregion}}

Administrators类:usingSystem;

usingSystem.Collections.Generic;usingSystem.Text;

namespaceDBlib{

classAdministrators{

stringAdministrator_id;publicstringAdministrator_Id{

get{returnAdministrator_id;}set{Administrator_id=value;}}

stringUsername;publicstringUserName{

get{returnUsername;}set{Username=value;}}

stringAdministrator_name;publicstringAdministrator_Name{

get{returnAdministrator_name;}set{Administrator_name=value;}}

stringAdministrator_password;publicstringAdministrator_Password{

get{returnAdministrator_password;}set{Administrator_password=value;}}

stringAdministrator_e_mall;publicstringAdministrator_E_Mall{

get{returnAdministrator_e_mall;}set{Administrator_e_mall=value;}}

DBdb=newDB();publicboolInsert(){try{

stringsql="insertinto

Administrators(Administrator_id,Username,Administrator_name,Administrator_password,Administrator_e_mall)values(""

+this.Administrator_id+"",""+this.Username+"",""

+this.Administrator_name+"",""+this.Administrator_password+"",""+this.Administrator_e_mall+"")";db.ExecuteSql(sql);returntrue;}catch{

returnfalse;}}

publicboolDelete(){try{

stringsql="deletefromAdministratorswhereAdministrator_id=""+this.Administrator_id+""";db.ExecuteSql(sql);returntrue;}catch{

returnfalse;}}

publicboolUpdate(){try{

stringsql="updateAdministratorssetAdministrator_id=""+this.Administrator_id+"",Username=""+this.Username+"",Administrator_name=""

+this.Administrator_name+"",Administrator_password=""+this.Administrator_password+"",Administrator_e_mall=""+this.Administrator_e_mall+""";db.ExecuteSql(sql);returntrue;}catch{

returnfalse;}}

publicDataSetSelectAll(){

stringsql="select*fromAdministrators";DataSetds=db.GetSqlDataSet(sql);returnds;}

publicDataSetSelect(){

stringsql="select*fromAdministratorswhereAdministrator_namelike"%"+this.Administrator_name+"%"";

DataSetds=db.GetSqlDataSet(sql);returnds;}

publicboolIsExist(){

stringsql="select*fromAdministratorswhereAdministrator_id=""+this.Administrator_id+""";

DataSetds=db.GetSqlDataSet(sql);if(ds.Tables[0].Rows.Count==1){

returntrue;}else{

returnfalse;}}}}

友情提示:本文中关于《B2C校园网上书店需求分析 课程设计总结报告》给出的范例仅供您参考拓展思维使用,B2C校园网上书店需求分析 课程设计总结报告:该篇文章建议您自主创作。

来源:网络整理 免责声明:本文仅限学习分享,如产生版权问题,请联系我们及时删除。


B2C校园网上书店需求分析 课程设计总结报告》由互联网用户整理提供,转载分享请保留原作者信息,谢谢!
链接地址:http://www.bsmz.net/gongwen/708873.html