健身中心会员管理系统毕业设计(论文)

健身中心会员管理系统毕业设计(论文)
健身中心会员管理系统毕业设计(论文)

大连交通大学信息工程学院

毕业设计(论文)任务书题目健身中心会员管理系统

大连交通大学信息工程学院

毕业设计(论文)进度计划与考核表

指导教师签字:年月日注:“计划完成内容”由学生本人认真填写,其它由指导教师考核时填写。

大连交通大学信息工程学院

毕业设计(论文)外文翻译

学生姓名张瑜专业班级网络工程08-1班

指导教师赵凌云郭杨职称高工讲师

所在单位信息科学系计算机教研室

教研室主任宋丽芳

完成日期 2012 年 4 月 13 日

Database connection based on JSP technology

Compared based on the traditional Client / Server model database system, Web database

system uses three browser / server architecture (ie web browser / Web server / database server architecture), has great advantages. Web database system into full play the DBMS and efficient data storage and management capabilities to B / S model as a platform, the unified Web client browser to provide users with easy to use, content-rich database services, has been providing Internet and Intranet core services for electronic commerce on the Internet to provide technical support. Web database system is a key technology of Web and database connectivity and access optimization.

Web database connection technology

Common Web database connection technologies: CGI, WebAPI, RAD technology and JDBC technology. First appeared in the CGI technology has been almost all of the Web server support, but there are serious shortcomings, such as slow performance, development difficulties and poor portability. WebAPI speed the emergence of problems to overcome, but the development more difficult. A variety of API are not compatible, use of extremely limited. RAD technology (rapid development of technology) has changed radically in the development of a difficult situation, but it and the specific Web server depends heavily on the lack of versatility.

JDBC (Java Database Connectivity) technology's biggest advantage is that it for all the database management system provides a standard interface, can provide unified access to multiple relational database can be divided into three parts:

◆JDBC API is one of the main characteristics of simple and easy to grasp. It is mainly composed by the interface rather than the integrated class, be included in the java.sql and javax.sql two packages. These interfaces provide JDBC driver from the vendor to complete.

◆ JDBC driver manager's role is to run the JDBC structure, the guidelines provide the most basic function, that is, when a database program called JDBC API, it will choose a correct JDBC driver to connect.

◆ JDBC Driver JDBC API is the role of making the program when data calls, connect to the database and the corresponding actual treatment. JDBC driver provides JDBC API interface classes.

JSP technique

Features of JSP technology

Java Server Page (JSP) is the use of Java code dynamically generated Web pages Moban HTML document. JSP running on the server side component, called the JSP container, it transformed into an equivalent JSP Java Servlet. Because of this, Servlet and JSP page is ultimately related. JSP pages have all the advantages of a Servlet, such as good performance and scalability, providing embedded on the HTTP session support. At the same time JSP page also has its own advantages, such as the need to automatically re-compile and Web development tools and greater compatibility.

JSP container automatically based on time stamp of each file management JSP page. When a JSP page request is issued, the judge and the first container. JSP file corresponds to the name of the

class.

If the class does not exist or over. JSP files in the old, and then an equivalent Servlet container to create Java source code and compile it. If the Servlet instance is not running, load the Servlet container and create an instance of the class. Finally, the container sends a thread to handle the load of the instance of the current HTTP request. Therefore, the existence of a JSP page, there are three forms, namely, JSP source code, Java source code and the compiled Java classes.

JSP elements can be divided into three types: directives, scripting elements (including expression, Script and statements) and action. Among them, the directive is to indicate what the code generated JSP container order; in the expression and Script can be used in nine implicit objects; behavior is to create, modify, or high-level JSP using the object element, using strict XML syntax for encoding.

Using JSP Web connection to the database to achieve

Java using the JDBC database is a comprehensive technical treatment, general way, to achieve connection to the database, perform operations such as query and extract data. Many relational database management systems with a JDBC driver. Specific steps are as follows:

1, complete the environmental setting, import java.sql package, the command is as follows: # Import java.sql .*

2, load drive

JDBC driver specification structure based on the drive into JDBC-ODBC bridge, pure Java and pure Java middleware to the database directly to the database types. In this, the use of Java native API with some type of drive, as explicitly create an instance of the drive and use the drive manager up:

DriverManager.registerDriver (new oracle.jdbc.driver.OracleDriver ());

3, connect to the database

Driver manager keeps a list of registered drivers, call the getConnection () method get Connection object. One getConnection () the parameters are the database server IP address, port number, bank name and account number required for login and password database, the sample is as follows: Connection conn = DirverManager.getConnection (

"Jdbc: oracle: thin: @ localhost: 1521: demo", "username", "password");

4, Statement Interface

SQL language consists of a relational database created from that and extract the data statements. JDBC provides the SQL statements used to encapsulate the object-oriented representation of the text, implementation status and results. This indicated called the java.sql.Statement https://www.360docs.net/doc/6517756488.html,e pre-compiled SQL-PreparedStatement and CallableStatement to call a stored procedure extends the Statement interface, the two sub-functions, the sample is as follows:

Statement stmt = conn.createStatement ();

5, to obtain the result set

A result set is ordered list of table rows, the use of JDBC in the java.sql.ResultSet interface presentation. The result set from the Statement interface executeQuery () method or some method calls generated metadata, the sample is as follows:

ResultSet rs = stmt.executeQuery (sql);

Access to efficient use of connection pooling optimization

In this instance, the application layer using WebLogic 6.1, the database layer using Oracle8.1.6, Navigate the browser client.

Example

In this instance, create a connection pool named ConnectionPool. ConnectionPool the basic properties of the following:

m_ConnectionPoolSize minimum number of connections the connection pool;

m_ConnectionPoolMax maximum number of connections the connection pool;

m_ConnectionUseCount a connection the maximum frequency of use;

m_ConnectionTimeout a connection to the longest idle time;

m_MaxConnections = -1 at the same time the maximum number of connections; m_timer timer.

These attributes define the connection pool with which status values for each valid connection.

Self-managed connection pool, in fact, by periodically on the status of each connection and the number of connections carried out to determine the appropriate action.

Here you can define ConnectionPool management needs to complete the basic interface, the concrete below:

public class ConnectionPool implements TimerListener {

public boolean initialize () / / initialize the connection pool

public void destroy () / / destroy the connection pool

public synchronized java.sql.Connection getConnection () / / get a connection

public synchronized void close () / / Close a connection

private synchronized void removeFromPool () / / to delete a connection from the connection pool

private synchronized void fillPool () / / maintain the connection pool size

public synchronized void TimerEvent () / / timer event handler

}

Through these interfaces, they can already completed the basic management connection pool. In TimeEvent () function to complete the state inspection of the connection pool, fillPool () when the connection pool for at least the minimum number of connections. Because users want to save

the state of each connection, so it requires a database connection object below:

class ConnectionObject {

public java.sql.Connection con; public boolean inUse; / / if flag is used

public long lastAccess; / / recently started using the time

public int useCount; / / is the frequency of use

}

Joined ConnectionObject object, operating in the ConnectionPool should only ConnectionObject, and other processes need is ConnectionObject the con attributes. So here then add as a class, as other processes to obtain and return the connection interface:

CLASS Conn {

GetConnection (); / / removed from the connection pool of an effective connection

CloseConnection (); / / return connection, then do not close the connection, but back in the connection pool

DestroyPool (); / / destroy the connection pool }

JSP technology to build the current use of B / S structure of the more popular Web database system is the way, while using the database connection pool in the efficiency and stability of the system on a way other than using the traditional system is much better. Database connection pool is a kind of the whole system more complicated issue of a viable solution. However, in practical applications, JDBC connection of large Web applications is a small part of the database connection pool manager and Web server, JSP engine, and RDBMS engine management strategies are likely to conflict. Users should fully consider the various parts of the system, so as to give full play to its efficiency.

基于JSP技术的数据库连接

相对于基于传统的Client/Server模式的数据库系统,Web数据库系统采用三层浏览器/服务器结构(即网络浏览器/Web服务器/数据库服务器结构),具有极大的优势。Web数据库系统充分发挥了DBMS高效的数据存储与管理能力,以B/S模式为平台,将客户端统一为Web浏览器,为用户提供使用简便、内容丰富的数据库服务,已经成为Internet和Intranet提供的核心服务,为Internet上的电子商务提供技术支持。Web数据库系统的关键技术是Web 与数据库的连接和访问优化。

Web数据库连接技术

常见的Web数据库连接技术有:CGI技术、WebAPI技术、RAD技术和JDBC技术等。最早出现的CGI技术得到了几乎所有的Web服务器的支持,但是存在着严重的缺陷,例如运行速度慢、开发困难和可移植性差等。WebAPI的出现克服了速度问题,但是开发更加困难。各种不同的API互不兼容,使用范围极其受限。RAD技术(快速开发技术)从根本上该改变了开发困难的现状,但是它和特定的Web服务器的依赖性很强,缺乏通用性。

JDBC(Java Database Connectivity)技术的最大优势是它为所有数据库管理系统提供一种标准接口,可以为多种关系数据库提供统一访问,大致可以分为以下三个部分:

◆JDBC API的主要特点之一是简单且容易掌握。它主要由接口组成而不是集成类,被包含在java.sql和javax.sql两个包中。这些接口由提供JDBC驱动的软件商来完成。

◆JDBC驱动管理器的作用是在JDBC运行结构上,提供最基础的指引功能,即当一个JDBC API程序进行数据库调用时,它会选择一个正确的JDBC驱动程序进行连接。

◆ JDBC驱动的作用是当JDBC API制作的程序进行数据调用时,实际连接数据库并进行相应的处理。JDBC驱动提供JDBC API的接口类。

JSP技术

JSP技术的特点

Java Server Page(JSP)是使用Java代码动态生成HTML文档的Web页面摸板。JSP运行于服务器端组件,称为JSP容器,它将JSP转化成等价的Java Servlet。正因为如此,Servlet 和JSP页面最终是相关的。JSP页面具有了Servlet的所有优点,如良好的性能和扩展性,对HTTP会话提供嵌入式支持等。同时JSP页面还具有自身的优点,如需要时自动重新编译和与Web开发工具具有更大的兼容性。

JSP容器基于每个文件的时间戳自动管理JSP页面。当对一个JSP页面的请求发出后,容器首先判断与.JSP文件对应的类的名字。

如果该类不存在或比.JSP文件的老,然后容器为一个等价的Servlet创建Java源码并编译它。如果Servlet实例并未运行,容器载入该Servlet类并创建一个实例。最后,容器发送一个线程在载入的实例中处理当前的HTTP请求。所以,一个JSP页面有三种存在形式,即JSP 源码、Java源码和已编译的Java类。

JSP元素可以分为三种:伪指令、脚本元素(包含表达式、Script和声明)和动作。其中,伪指令是指示JSP容器生成什么代码的命令;在表达式和Script中可以使用9个隐含对象;行为是创建、修改或使用对象的高层JSP元素,使用严格的XML语法编码。

利用JSP实现Web与数据库的连接

Java使用JDBC技术处理数据库是一种综合、通用方式,实现与数据库的连接,执行查询和提取数据等操作。很多关系数据库管理系统都带有JDBC驱动程序。具体步骤如下:1.完成环境设置,导入java.sql包,命令如下:

#import java.sql.*

2.载入驱动器

JDBC规范依据驱动器结构将驱动器划分为JDBC-ODBC桥、纯Java到数据库中间件和纯Java直接到数据库几种类型。在此,采用本地API与部分Java类型驱动器,显式创建一个如下的驱动器实例并用驱动器管理器注册:

DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());

3.连接到数据库

驱动器管理器保留已注册驱动器列表,调用其getConnection()方法得到Connection对象。其中getConnection()的参数分别是数据库服务器的IP地址、端口号、库名和登录数据库所需的账号与密码,示例如下:Connection conn= DirverManager.getConnection(

"jdbc:oracle:thin:@localhost:1521:demo","username","password");

4.语句接口

SQL语言由从一个关系数据库中创建、表示和抽取数据的语句组成。JDBC提供的这些SQL语句的面向对象的表示用以封装其文本、执行状态和结果。这种表示称为java.sql.Statement接口。使用预编译SQL的PreparedStatement和调用存储过程的CallableStatement这两个子接口扩展了Statement的功能,示例如下:

Statement stmt=conn.createStatement();

5.获得结果集

一个结果集是表格行的排序列表,使用JDBC中的java.sql.ResultSet接口表示。结果集由Statement接口的executeQuery()方法或一些元数据方法调用产生,示例如下:

ResultSet rs=stmt.executeQuery(sql);

利用连接池优化访问效率

在本实例中,应用层使用WebLogic 6.1,数据库层采用Oracle8.1.6,客户端使用Navigate 浏览器。

实例

在本实例中建立一个命名为ConnectionPool的连接池。ConnectionPool的基本属性如下:m_ConnectionPoolSize 连接池中连接数量下限;

m_ConnectionPoolMax 连接池中连接数量上限;

m_ConnectionUseCount 一个连接的最大使用次数;m_ConnectionTimeout 一个连接的

最长空闲时间;

m_MaxConnections = -1 同一时间的最大连接数;m_timer 定时器。

这些属性定义了连接池与其中的每个连接的有效状态值。

连接池的自我管理,实际上就是通过定时地对每个连接的状态和连接的数量进行判断而进行相应操作。

这里可以定义出ConnectionPool要完成管理所需要的基本接口,具体见下:

public class ConnectionPool implements TimerListener{

public boolean initialize() //连接池初始化

public void destroy() //连接池的销毁

public synchronized java.sql.Connection getConnection() //取一个连接

public synchronized void close() //关闭一个连接

private synchronized void removeFromPool() //把一个连接从连接池中删除

private synchronized void fillPool() //维护连接池大小

public synchronized void TimerEvent() //定时器事件处理函数

}

通过这几个接口,已经可以完成连接池的基本管理。在TimeEvent()函数中完成连接池的状态检验工作,fillPool()时连接池至少保持最小连接数。因为用户要保存每一个连接的状态,所以还需要一个数据库连接对象见下:

class ConnectionObject{

public java.sql.Connection con; public boolean inUse; //是否被使用标志

public long lastAccess; //最近一次开始使用时间

public int useCount; //被使用次数

}

加入了ConnectionObject对象后,在ConnectionPool中操作的应该只是ConnectionObject,而其它进程需要的只是ConnectionObject的con属性。因此这里再加入如下一个类,作为其它进程获得与返回连接的接口:

CLASS Conn{

GetConnection(); //从连接池中取出一个有效连接

CloseConnection(); //返回连接,此时并没有关闭连接,只是放回了连接池

DestroyPool(); //销毁连接池

}

目前采用JSP技术构建B/S结构的Web数据库系统是比较流行的方式,同时采用数据库连接池的系统在效率和稳定性上比采用传统的其它方式的系统要好得多。数据库连接池是一种对整个系统中比较复杂的问题的一种可行的解决办法。但在实际应用中,JDBC连接只是大型Web应用系统的一小部分,数据库连接池管理程序与Web服务器、JSP引擎和RDBMS引擎的管理策略都有可能发生冲突。用户应该全面考虑系统中的各个部分,这样才能充分发挥其

高效性。

大连交通大学信息工程学院毕业设计(论文)调研报告

学生姓名张瑜专业班级网络工程08-1班指导教师赵凌云郭杨职称高工讲师

所在单位信息科学系计算机教研室

教研室主任宋丽芳

完成日期 2012 年 4 月 6 日

实习报告

1 课题来源及意义

在越来越追求健康生活品质生活的时代,保健健身日益成为人们在日常生活中不可缺少的重要活动之一。然而面对着大量人员的加入,健身行业中传统健身场所对大量会员的人工管理也愈来愈繁琐,耗费了大量的人力物力。在这个竞争激烈的健身行业中为会员提供更加优质的服务,对会员进行更加有效的管理也成为一个亟待解决的问题。

健身俱乐部随着internet技术的发展人们的日常生活已经离不开网络。未来社会人们的生活和工作将越来越依赖于数字技术的发展,越来越数字化、网络化、虚拟化。

当今社会为信息社会,世界已进入在计算机信息管理领域中激烈竞争的时代。信息已成为继劳动力、土地、资本之后的又一大资源,谁控制的信息越多,谁利用信息资源的效率越高,谁就会在各方面的竞争中,占有一席之地,谁就会更有优势,这一点已得到举世公认。由于计算机具有运算速度快,处理能力强等特点,很自然地进入到这一领域中,用计算机对健身会员中心进行管理能快速的得到满足约束条件的可行结果正好满足人们的这种需求。并且一个好的管理系统将会使管理更加规范化,具有时间短、省人力和质量高,不但使工作人员从复杂的任务中解脱出来,同时减少了人力资源的浪费,最大限度的实现了资源的合理利用,提高了工作人员的工作效率,也使客户办理健身手续更加方便。所以说用计算机对健身会员中心进行管理是最好的选择。

2 国内外的现状

近年来,随着人民的生活水平的不断提高,人们越来越注重养生保健,保健健身行业的消费持续增长,竞争愈来愈激烈。然而,传统健身房的日常运作还是靠人工管理,从服务项目到会员管理,再到记录数据基本上由人工完成记录,这样做不仅耗费大量人力而且容易导致记录丢失或重复等错误,这就迫切需要标准的、高效率的计算机管理方式引导其发展,通过计算机管理该企业的日常运作,给管理者以决策参考的模型,来不断完善管理水平,提高工作效率。

在国内,健身娱乐市场呈现出多样化的特点,主要包括全民健身体育活动场所、专项休闲运动俱乐部、有氧运动健身中心和综合健康恢复中心等。在一些经济较发达的城市和地区,出现了一批以高级技术人员、高级管理人员、私营企业经营者为代表的高收入阶层。这一阶层成为中国健身娱乐市场不断前进的主要推动力量。

利用微观市场经济的分析方法,从量的方面来看,由于人民群众对于健身消费需求的剧烈膨胀,市场处于供不应求的情况,这将刺激这一产业市场的壮大和发展;从质的方面上来看,对于健身娱乐市场服务能力和效果的要求上越来越高,多样性、专业性、全面的服务市场会逐步扩大,服务内容的比重日益增加。

从政策角度出发,由于健身娱乐市场可以有效地拉动居民的消费,符合国家拉动内需、刺激经济发展的政策,有望得到政府的进一步支持。同时,一个需要特别注意的发展倾向是

从人们对于健身娱乐的消费趋势上来看,人们健康的需求也正逐步从被动的治疗型向主动的预防保健型转换,这也预示未来的健身娱乐市场必然向科学保健、运动和娱乐合理搭配的方式发展。总之,体育健身行业在我国还属于处在成长初期的新兴产业,它是一项前景广大的朝阳产业,具有巨大的市场潜力。

在国外,健身行业已经发展的比较成熟,经历了近半个世纪的发展,国外的健身俱乐部呈现出了连锁经营呈现出了规模经济的优势,种类较多以满足不同健身人群的健身需要,如美国的24小时健身俱乐部,现在已经在美国拥有了约50个的连锁俱乐部,并且计划在未来的3-5年内增加到120的规模,同时他拥有青少年俱乐部,商业俱乐部等不同的种类模式在健身俱乐部的经营的各个方面形成了系统的管理和规划预测。从人力资源的开发和管理,市场销售,广告的制作投放计划到健身项目的开发,国外的健身俱乐部都有一整套完整的测评开发系统。比如美国的健身俱乐部很重视人力资源的开发,为他们的员工提供在线的培训和不同的实践机会,培养优秀的员工,同时通过员工的股权福利计划,留住优秀的员工。在市场销售方面也开发了面对面的客户服务系统,通过一定的步骤确认客户的需要留住客户。

3 本课题的研究目标

越来越多的人追求健康的生活,所以更多的人选择了健身来提高自己的身体素质,以前人工的记录健身人员的信息是比较复杂和浪费时间的,同时健身人员的信息也不易保存,所以利用网络组建了一个健身会员管理系统,这样有利于提高工作效率,同时也方便了查询健身会员的信息。

本系统将提供给管理层如老板、经理(副经理)、各组长等管理人员使用,完成对会员及员工的日常管理。

系统需要以下几个功能:

(1)对会员信息进行有效的管理。

(2)对健身中心员工的信息进行统一的汇总。

(3)能够反映会员对健身中的各方面设施及服务方面的意见,以便提供更加优质的服务。

(4)实现不同管理阶层,对系统的操作权限不同。

(5)页面友好,功能完善。

4 研究内容

系统主要用于对会员信息的管理,使得这些信息安全且有效的进行查阅。整个系统将分为5个基本模块分别为

(1)实现会员信息

(2)会员服务

(3)健身中心课时安排

(4)系统管理

相关文档
最新文档