数据库原理课程设计-房屋租赁管理系统Word文件下载.docx
《数据库原理课程设计-房屋租赁管理系统Word文件下载.docx》由会员分享,可在线阅读,更多相关《数据库原理课程设计-房屋租赁管理系统Word文件下载.docx(34页珍藏版)》请在冰点文库上搜索。
租
房
赁
主
屋
者
房屋租赁管理系统
显
示申请看房记录
变
更房屋状态
赁房屋的客户
待
租赁的房屋列表
1.3数据流图
房主
租赁者
添加新房屋
添加房屋
新房主
登记
租赁者的信息
房屋资料
房屋状态
更新房屋信息
修改房屋
状态
查看房屋信息
查询房屋
可租用房屋
房主会面通知
安排会面
租房请求
1.4数据字典
库表登记
表名
中文名
handingcharges
手续费登记表
houseowner
房主信息表
该数据库字典如下表:
houses
房屋信息表
renter
租赁者信息表
rentered
已出租的房屋表
seehistory
看房记录表
手续费登记表handingcharges
houseower_name
房主的名字
houseid
房屋的编号
house_address
房屋的地址
rent_value
房屋的租金
handlingcharge
房屋的手续费
房主信息表houseowner
houseower_address
房主的地址
houseower_phone
房主的电话
房屋信息表houses
租金
people_number
容纳最大的人数
house_type
房屋的类型
house_state
房屋的状态
租赁者信息表renter
renter_id
租赁者的编号
renter_name
租赁者的姓名
renter_sex
租赁者的性别
renter_address
租赁则的地址
renter_phone
租赁者的电话
identity_card
租赁者的身份证
已出租的房屋表rentered
rentered_name
看房记录表seehistory
rentername
看房的租赁者
房屋编号
2.概念模型设计
姓名
房主
电话号码
地址
图1房主的E-R实体图
类型
状态
容纳人数
编号
房屋
房主姓名
图2房屋的E-R实体图
电话
性别
租赁者
身份证
图3租赁者的E-R实体图
1
n
拥有
看房或租赁 手续费
m
图3实体及其联系的E-R图
3.逻辑结构设计
由图1转换为关系模型:
房主(姓名,地址,电话)
由图2转换为关系模型:
房屋(编号,房主名字,地址,租金,容纳人数,类型,状态)
由图3转换为关系模型:
租赁者(编号,名字,性别,地址,电话,身份证)
由图4转换为关系模型:
看房记录(租赁者的姓名,房屋的编号)
手续费(房屋编号,手续费)
已租赁房屋(租赁者,房屋的编号)
4.功能设计
图5功能结构图
5.功能模块的实现
5.1系统界面
图6系统登录界面
图7系统主界面
图8登记房屋
图8租赁者申请看房记录
图9更变房屋状态
图10查看租房记录
图11手续费
图12待租赁房屋
图13查看个人信息
图14修改个人信息
图14修改密码
图15注册页面
5.2主要源代码
(1)index.jsp
<
%@pagecontentType="
text/html;
charset=GBK"
language="
java"
import="
java.util.*"
%>
!
DOCTYPEHTMLPUBLIC"
-//W3C//DTDHTML4.01Transitional//EN"
>
html>
head>
title>
房屋租赁系统<
/title>
/head>
framesetrows="
210,*"
cols="
*"
frameborder="
No"
border="
0"
framespacing="
>
framesrc="
jsp/top.jsp"
name="
top"
scrolling="
no"
norresize>
jsp/first.jsp"
main"
yes"
/frameset>
noframes>
body>
/body>
/noframes>
/html>
(2)first.jsp
%
Stringpath=request.getContextPath();
StringbasePath=
request.getScheme()+"
:
//"
+request.getServerName()+"
"
+request.getServerPort()+path+"
/"
;
%>
欢迎光临<
tablealign="
center"
width="
579"
height="
300"
border="
celpadding="
tr>
tdalign="
valign="
bgcolor="
#FFFFFF"
p>
&
nbsp;
/p>
tablewidth="
568"
178"
cellpadding="
cellspacing="
background="
../images/background.gif"
>
td>
/td>
/tr>
/table>
(3)top.jsp
%@pagelanguage="
import="
pageEncoding="
GBK"
%>
Datedate=newDate();
divalign="
class="
style1"
753"
193"
tdwidth="
166"
150"
colspan="
8"
background="
../images/banner.jpg"
120"
20"
background="
../images/date.jpg"
spanclass="
style6"
%=date.getYear()+1900%>
年<
%=date.getMonth()+1%>
月
%=date.getDate()%>
日
/span>
92"
align="
../images/bar.jpg"
ahref="
information/houseowner.jsp"
target="
登记房主<
/a>
information/house.jsp"
登记房屋<
information/Renter.jsp"
登记租赁者<
information/userchat.jsp"
用户论坛<
/div>
(4)house.jsp
htmlxmlns="
http:
//www.w3.org/1999/xhtml"
metahttp-equiv="
Content-Type"
content="
charset=GBK"
/>
scripttype="
text/javascript"
function bt_submit_onclick()
{
location.replace('
./SurWetland.jsp'
);
}
function checkForm(){
varsubform=document.form_s;
varhouseower_name=subform.houseower_name.value;
varhouse_address=subform.house_address.value;
if(monitor_units=="
||monitor_units.replace(/(^\s*)|(\s*$)/g,"
)=
="
){
alert("
房主姓名不能为空!
subform.monitor_units.focus();
return false ;
if(farmername=="
||farmername.replace(/(^\s*)|(\s*$)/g,"
)=="
人工湿地名称不能为空!
subform.farmername.focus();
subform.action="
bb"
function file_check(){
varsubform=document.form_uqfile;
varfile=subform.file1.value;
if(file=="
){
alert( '
请选择要上传的文件'
} else{
subform.action= "
/iep/afile.do?
files="
+file;
subform.submit();
//弹出选择历史
function LineQueryOpen()
varmonitor_units=subform.monitor_units.value;
varfarmername=subform.farmername.value;
检测单位不能为空!
window.showModalDialog('
/iep/SurWetland.do?
method=findEvents&
farmername='
+farmername,'
'
'
dialogWidth:
1000px;
dialogHeight:
420px;
/script>
styletype="
text/css"
/style>
cellspacing="
formname="
form_s"
action="
method="
post"
br/>
table>
value="
${houseower_name}"
type="
text"
5px;
height:
20px;
font-size:
12px;
<
房主姓名:
inputname="
houseower_name"
onfocus="
this.value='
style="
width:
90px;
margin-left:
onblur="
if(this.value.replace(/^
+|+$/g,'
)=='
)alert('
请输入房主姓名!
)"
房屋地址:
${house_address}"
house_address"
请输入房屋地址!
房屋租金:
${rent_value}"
rent_value"
type="
onfocus="
请输入房屋租金!
最多能容纳的房客数:
people_number"
${people_number}"
请输入最多能容纳的房客数!
房屋类型:
selectname="
house_type"
size=1>
optionvalue="
平房"
平房<
/option>
带阳台的楼房"
带阳台的
楼房<
独立式住宅"
独立式住宅
&
房屋状态:
house_state"
待租赁"
待租赁
已出租"
已出租
br>
提交"
450"
&
submit"
style="
80px;
25px;
重置"
button"
onClick="
document.form_s.reset();
INPUTtype="
value="
历史数据"
accessKey="
btnQuery"
onclick="
LineQueryOpen()"
/form>
(5)houseinfo.jsp
%@pageimport="
java.sql.ResultSet"
java.sql.ResultSe