Sqlserver数据库课程设计图书馆管理系统.docx

上传人:b****1 文档编号:14984040 上传时间:2023-06-29 格式:DOCX 页数:13 大小:162.01KB
下载 相关 举报
Sqlserver数据库课程设计图书馆管理系统.docx_第1页
第1页 / 共13页
Sqlserver数据库课程设计图书馆管理系统.docx_第2页
第2页 / 共13页
Sqlserver数据库课程设计图书馆管理系统.docx_第3页
第3页 / 共13页
Sqlserver数据库课程设计图书馆管理系统.docx_第4页
第4页 / 共13页
Sqlserver数据库课程设计图书馆管理系统.docx_第5页
第5页 / 共13页
Sqlserver数据库课程设计图书馆管理系统.docx_第6页
第6页 / 共13页
Sqlserver数据库课程设计图书馆管理系统.docx_第7页
第7页 / 共13页
Sqlserver数据库课程设计图书馆管理系统.docx_第8页
第8页 / 共13页
Sqlserver数据库课程设计图书馆管理系统.docx_第9页
第9页 / 共13页
Sqlserver数据库课程设计图书馆管理系统.docx_第10页
第10页 / 共13页
Sqlserver数据库课程设计图书馆管理系统.docx_第11页
第11页 / 共13页
Sqlserver数据库课程设计图书馆管理系统.docx_第12页
第12页 / 共13页
Sqlserver数据库课程设计图书馆管理系统.docx_第13页
第13页 / 共13页
亲,该文档总共13页,全部预览完了,如果喜欢就下载吧!
下载资源
资源描述

Sqlserver数据库课程设计图书馆管理系统.docx

《Sqlserver数据库课程设计图书馆管理系统.docx》由会员分享,可在线阅读,更多相关《Sqlserver数据库课程设计图书馆管理系统.docx(13页珍藏版)》请在冰点文库上搜索。

Sqlserver数据库课程设计图书馆管理系统.docx

Sqlserver数据库课程设计图书馆管理系统

 

数据库课程设计

设计选题:

图书管理系统

系别信息工程系

专业计算机网络技术

班级2010022201

姓名马斌龙

学号201002220137

姓名王贤宽

学号201002220137

姓名黄晓辉

学号201002220140

指导老师

2011年12月29日

一.系统需求分析

图书管理工作繁琐,借阅频繁,包含大量的信息数据,因此

就需要一个完善的图书管理系统来实现对这些数据的有效管理。

本系统主要任务就是对图书、读者、借阅信息、查询进行

统一管理,满足各类用户的需求。

本系统在功能上要实现借阅图

书、续借图书、归还图书、催还图书、信息查询等功能。

二.数据库分析

图书管理系统就是要求图书管理人员通过该系统对图书、读

者、借阅信息等进行统一管理,从而实现功能上的借阅图书、

续借图书、归还图书、催还图书以及信息查询。

这就要求管理人员

能够对数据库进行熟练操作而简单的表查询、触发器的建立、存储

过程的建立以及用户自定义函数的建立等等这些管理数据库的方法

都能对图书馆里系统的管理起到事半功倍的效果。

三、图书馆管理系统E-R图

 

 

 

四、前后与后台连接示意图

 

 

五、图书馆管理系统功能算法实现

5.1前台算法实现

5.1.1主界面

DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN""http:

//www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

//www.w3.org/1999/xhtml">

欢迎使用图书管理系统

center">

24pt">




图书信息查询


读者信息查询


借还信息记录

5.1.2图书信息

DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN""http:

//www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

//www.w3.org/1999/xhtml">

无标题页

center">

LabelID="Label1"runat="server"Text="书名">

Label>

TextBoxID="TextBox1"runat="server">

TextBox>


ButtonID="Button1"runat="server"OnClick="Button1_Click1"Text="查询"/>

GridViewID="GridView1"runat="server"OnSelectedIndexChanged="GridView1_SelectedIndexChanged">

GridView>

5.1.3读者信息

DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN""http:

//www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

//www.w3.org/1999/xhtml">

无标题页

center">

LabelID="Label1"runat="server"Text="姓名">

Label>

TextBoxID="TextBox1"runat="server">

TextBox>


ButtonID="Button1"runat="server"OnClick="Button1_Click1"Text="查询"/>

GridViewID="GridView1"runat="server"OnSelectedIndexChanged="GridView1_SelectedIndexChanged">

GridView>

5.1.4借还信息表

DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN""http:

//www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

//www.w3.org/1999/xhtml">

无标题页

5.1.5添加图书

usingSystem;

usingSystem.Data;

usingSystem.Data.SqlClient;

usingSystem.Configuration;

usingSystem.Web;

usingSystem.Web.Security;

usingSystem.Web.UI;

usingSystem.Web.UI.WebControls;

usingSystem.Web.UI.WebControls.WebParts;

usingSystem.Web.UI.HtmlControls;

publicpartialclassadd:

System.Web.UI.Page

{

protectedvoidButton1_Click1(objectsender,EventArgse)

{

strings1,s2,s3;

s1=TextBox1.Text;

s2=TextBox2.Text;

s3=TextBox3.Text;

stringstr="server=WINKS80;database=图书管理系统;integratedsecurity=true";

SqlConnectioncon=newSqlConnection(str);

SqlCommandcom=newSqlCommand();

try

{

com.Connection=con;

com.CommandText="insert图书信息表values('"+s1+"','"+s2+"','"+s3+"')";

con.Open();

com.ExecuteNonQuery();

con.Close();

Response.Write("插入成功");

}

catch(Exceptiona1)

{

Response.Write("插入失败");

}

finally

{

con.Close();

}

}

5.1.6删除图书

protectedvoidButton3_Click(objectsender,EventArgse)

{

strings4;

s4=TextBox4.Text;

stringstr="server=WINKS80;database=图书管理系统;integratedsecurity=true";

SqlConnectioncon=newSqlConnection(str);

SqlCommandcom=newSqlCommand();

try

{

com.Connection=con;

com.CommandText="delete图书信息表wherebname='"+s4+"'";

con.Open();

com.ExecuteNonQuery();

con.Close();

Response.Write("删除成功");

}

catch(Exceptiona1)

{

Response.Write("删除失败");

}

finally

{

con.Close();

}

}

}

5.1.7添加读者

usingSystem.Web.UI;

usingSystem.Web.UI.WebControls;

usingSystem.Web.UI.WebControls.WebParts;

usingSystem.Web.UI.HtmlControls;

publicpartialclassmanger:

System.Web.UI.Page

{

protectedvoidButton1_Click(objectsender,EventArgse)

{

strings1,s2,s3;

s1=TextBox1.Text;

s2=TextBox2.Text;

s3=TextBox3.Text;

stringstr="server=WINKS80;database=图书管理系统;integratedsecurity=true";

SqlConnectioncon=newSqlConnection(str);

SqlCommandcom=newSqlCommand();

try

{

com.Connection=con;

com.CommandText="insert读者信息表values('"+s1+"','"+s2+"','"+s3+"')";

con.Open();

com.ExecuteNonQuery();

con.Close();

Response.Write("添加成功");

}

catch(Exceptiona1)

{

Response.Write("添加失败");

}

finally

{

con.Close();

}

}

5.1.7删除读者、

usingSystem;

usingSystem.Data;

usingSystem.Data.SqlClient;

usingSystem.Configuration;

usingSystem.Web;

usingSystem.Web.Security;

usingSystem.Web.UI;

usingSystem.Web.UI.WebControls;

usingSystem.Web.UI.WebControls.WebParts;

usingSystem.Web.UI.HtmlControls;

protectedvoidButton2_Click(objectsender,EventArgse)

{

strings4;

s4=TextBox4.Text;

stringstr="server=WINKS80;database=图书管理系统;integratedsecurity=true";

SqlConnectioncon=newSqlConnection(str);

SqlCommandcom=newSqlCommand();

try

{

com.Connection=con;

com.CommandText="delete读者信息表wherername='"+s4+"'";

con.Open();

com.ExecuteNonQuery();

con.Close();

Response.Write("删除成功");

}

catch(Exceptiona1)

{

Response.Write("删除失败");

}

finally

{

con.Close();

}

}

}

5.2后台算法实现

5.2.1创建数据库(图书管理系统)

createdatabase图书管理系统

5.2.2创建图书信息表

createtable图书信息表

(bidchar(10)notnullprimarykey,

bnamenvarchar(15)notnull,

bkindvarchar(8)notnull

5.2.3创建读者信息表

createtable读者信息表

(ridchar(10)notnullprimarykey,

rnamenvarchar(15)notnull,

rkindvarchar(8)notnull

5.2.4创建借还书信息表

createtable借还书信息表

(recordidbigintidentity(1,1)notnullprimarykey,

bidchar(10)foreignkeyreferences图书信息表(bid),

btimesbigintnotnull,

retimesmalldatetimenotnull,

bstatbitnotnull

六.实训心得

通过本次的课程设计,我清楚的感觉SQL的重要性。

在生活或工作中有很大的实用性。

而本次实训又让我从新认识到了SQL模型的创建、应用、完整的数据库管理系统。

现在我正在努力掌握SQL数据库管理系统及其应用开发技术。

这次的试训让我更好的掌握SQL打好了坚实的基础。

我相信我以后会制作出很好的数据库系统。

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

当前位置:首页 > 自然科学 > 生物学

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2