小区物业管理系统-分析设计
Posted CaoPengCheng&
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了小区物业管理系统-分析设计相关的知识,希望对你有一定的参考价值。
需求分析
- 需要物业管理人员和业主两个用户
- 需要做楼房管理,住户管理,水电气费缴纳,管理等
功能设计
添加系统管理员,设置物业管理人员和业主功能权限
数据库设计
物业管理人员(人员号,姓名,性别,年龄,学历,籍贯,职位,上级,入职时间)
楼房(楼房号,区域,楼号,单元,房间号)
车库(车库号,地址)
业主(业主号,姓名,楼房号,车库号,性别,年龄,籍贯,入职时间)
费用(楼房号,车库号,水费,电费,天然气费,物业管理费)
用户(用户名,密码)
建表语句
/* 物业管理人员 */
create table PropetyManager
(
PMno char(7) primary key,
PMname char(8) not null,
PMsex char(2) check(PMsex in('男','女')) not null,
PMage smallint check(PMage between 18 and 60) not null,
PMedu char(4) check(PMedu in('小学','初中','高中','专科','本科','硕士','博士')) not null ,
PMnative char(10),
PMdept char(4) check(PMdept in('经理','清洁','会计','维修','绿化','安保')) not null ,
PM_Leader char(7),
PMtime date,
foreign key(PM_Leader)references PropetyManager(PMno)
)
insert into PropetyManager values ('W002','尼古拉斯','男',22,'博士','曹县','安保','W001','2080/8/5');
insert into PropetyManager values ('W003','石榴','女',25,'本科','上海','清洁','W001','2085/5/1');
insert into PropetyManager values ('W004','翠花','女',33,'小学','甘肃','会计','W001','2078/4/18');
insert into PropetyManager values ('W005','狗剩','男',56,'初中','庆阳','维修','W001','2069/9/25');
insert into PropetyManager values ('W006','大脚','女',45,'高中','兰州','绿化','W001','2066/12/5');
/* 楼房 */
create table Building
(
Bno char(7) primary key ,
Barea char(2) check(Barea>='A' and Barea<='Z') not null,
Blouno smallint check(Blouno>=1 and Blouno<=20) not null,
Bapartment smallint check(Bapartment>=1 and Bapartment<=3) not null,
BRoomNo smallint not null
)
insert into Building values ('A11101','A',1,1,101);
insert into Building values ('A11102','A',1,1,102);
insert into Building values ('A11201','A',1,1,201);
insert into Building values ('A11202','A',1,1,202);
insert into Building values ('A11301','A',1,1,301);
insert into Building values ('A11302','A',1,1,302);
insert into Building values ('B11101','B',1,1,101);
insert into Building values ('B11102','B',1,1,102);
insert into Building values ('B11201','B',1,1,201);
insert into Building values ('B11202','B',1,1,202);
insert into Building values ('B11301','B',1,1,301);
insert into Building values ('B11302','B',1,1,302);
/* 车库garage */
create table Garage
(
Gno char(7) primary key,
Gaddress char(30)
)
insert into Garage values ('GA001','A区1号库');
insert into Garage values ('GA002','A区2号库');
insert into Garage values ('GA003','A区3号库');
insert into Garage values ('GA004','A区4号库');
insert into Garage values ('GB001','B区1号库');
insert into Garage values ('GB002','B区2号库');
insert into Garage values ('GB003','B区3号库');
insert into Garage values ('GB004','B区4号库');
/* 业主 */
create table Proprietor
(
Pno char(7) primary key ,
Pname char(10) not null,
P_Bno char(7),
P_Gno char(7),
Psex char(2) check(Psex in('男','女')) not null,
Page smallint check(Page between 0 and 150) not null,
Pnative char(10),
Ptime date,
foreign key(P_Bno)references Building(Bno),
foreign key(P_Gno)references Garage(Gno)
)
insert into Proprietor values ('Y001','杰克','A11101','GA001','男',88,'曹县','2066/3/27');
insert into Proprietor values ('Y002','柔丝','A11102','GA002','女',8,'北京','2078/9/22');
insert into Proprietor values ('Y003','杰伦','B11101','GB001','男',32,'深圳','2056/3/2');
insert into Proprietor values ('Y004','俊杰','B11102','GB002','男',46,'纽约','2064/8/8');
/* 费用 */
create table Cost
(
C_Pno char(7),
C_Bno char(7),
Cwater money check(Cwater>-100 and Cwater<=99999) not null,
Celectricity money check(Celectricity>-100 and Celectricity<=99999) not null,
Cgas money check(Cgas>-100 and Cgas<=99999) not null,
Cproperty money check(Cproperty>-100 and Cproperty<=99999) not null,
primary key(C_Pno,C_Bno),
foreign key(C_Pno)references Proprietor(Pno),
foreign key(C_Bno)references Building(Bno)
)
insert into Cost values ('Y001','A11101',0,0,0,0);
insert into Cost values ('Y002','A11102',0,0,0,0);
insert into Cost values ('Y003','B11101',0,0,0,0);
insert into Cost values ('Y004','B11102',0,0,0,0);
/* 物业管理人员Login*/
create table User_PropetyManager
(
username char(7) primary key,
password char(8) not null,
foreign key(username)references PropetyManager(PMno)
)
insert User_PropetyManager values ('W001',123);
insert User_PropetyManager values ('W002',123);
insert User_PropetyManager values ('W003',123);
insert User_PropetyManager values ('W004',123);
insert User_PropetyManager values ('W005',123);
insert User_PropetyManager values ('W006',123);
/* 系统管理人员Login */
create table User_System
(
username char(7) primary key,
password char(8) not null
)
insert User_System values ('cao',123);
/* 业主Login */
create table User_Proprietor
(
username char(7) primary key,
password char(8) not null,
foreign key(username)references Proprietor(Pno)
)
insert User_Proprietor values ('Y001',123);
insert User_Proprietor values ('Y002',123);
insert User_Proprietor values ('Y003',123);
insert User_Proprietor values ('Y004',123);
以上是关于小区物业管理系统-分析设计的主要内容,如果未能解决你的问题,请参考以下文章
javaweb小区物业管理系统设计与实现(毕业论文+程序设计+数据库文件)
javaweb小区物业管理系统设计与实现.rar(论文+项目源码+使用说明)
计算机毕业设计-物业管理系统代码-基于SSM的智能小区物业系统代码-java社区物业水电缴费系统代码