资源描述
(word完整版)物业管理系统数据库设计
数据库设计
一、 表设计概述
数据库将针对物业管理系统,配合SQL server2005数据库系统中提供的数据管理功能,实现楼栋管理,房间管理,业主管理,收费管理,物资设备管理,用户管理等功能。
二、表设计
(1)业主表 tb_ower:用于记录业主信息
字段
类型
可否为空
备注
owerId
int
否
业主编号(P)
owerName
varchar(50)
否
业主姓名
owerLoginname
varchar(50)
否
业主登录名
owerPassword
varchar(50)
否
业主登录密码
owerSex
varchar(50)
否
业主的性别
owerAge
int
否
业主的年龄
houseId
int
否
业主所属楼栋
(F表示tb_house(houseId)的外键)
roomId
int
否
业主房间号
(F表示tb_room(roomId)的外键)
owerIDcard
varchar(50)
否
业主身份证号
owerTel
varchar(50)
否
业主联系电话
owerHomeplace
varchar(50)
否
业主籍贯
owerWorkplace
varchar(50)
否
业主工作地
roleId
int
否
角色ID
(F表示tb_role(roleId)的外键)
(2)业主成员表 tb_ower_family:用于记录业主成员信息
字段
类型
可否为空
备注
ofId
int
否
业主成员编号(p)
ofName
varchar(50)
否
成员姓名
ofSex
varchar(50)
否
成员性别
ofHomeplace
varchar(50)
否
成员籍贯
ofTel
varchar(50)
否
成员电话
ofWorkplace
varchar(50)
否
成员工作地
owerId
int
否
业主ID
(F表示tb_ower(owerId)的外键,业主只能增删自己ID对应的业主成员)
(3)楼栋信息表tb_house:用于记录楼栋信息
字段
类型
是否为空
备注
houseId
int
否
楼栋编号ID(P)
houseName
varchar(50)
否
楼栋名
buildStarttime
datetime
否
开工时间
buildEndtime
datetime
否
竣工时间
houseBug
varchar(500)
否
漏洞信息
houseArea
float
否
建筑面积
(4)房间信息表tb_room:用于记录房间信息
字段
类型
是否为空
备注
roomId
int
否
房间编号ID(P)
roomName
varchar(50)
否
房间名
houseId
int
否
所属楼栋ID
(F表示tb_house(houseId)的外键)
owerId
int
否
业主ID
(F表示tb_ower(owerId)的外键)
enterTime
datetime
否
入住时间
roomType
varchar(50)
否
房型
roomArea
float
否
建筑面积
roomPurpose
varchar(50)
否
房间用途
(管理员不能添加房间用途,默认为居住
管理员不能修改房间用途,只能由业主自己修改用途)
(5)收费项目表tb_charge:用于显示收费标准
字段
类型
是否为空
备注
chargeId
int
否
收费项目ID(P)
chargeName
varchar(50)
否
收费项目名
chargeStandard
float
否
收费标准
(6)业主缴费表tb_pay:用于管理业主缴费信息
字段
类型
是否为空
备注
payId
int
否
缴费编号ID
chargeName
varchar(50)
否
收费项目名
chargeStandard
float
否
应收金额
payReal
float
否
实收金额
payBalance
float
否
欠费金额
chargeTime
datetime
否
收费时间
owerName
varchar(50)
否
业主名
payState
int
否
缴费状态
(1已缴费,0未缴费)
payMonth
varchar(50)
否
缴费月份
(7)物资设备管理表tb_matter:用于物资设备管理
字段
类型
是否为空
备注
matterId
int
否
物质ID(P)
matterName
Varchar(50)
否
物资名称
matterNum
int
否
物质数量
matterPrice
float
否
物质价格
matterSort
Varchar(50)
否
物资类别名称
(F表示tb_matter_sort(matterSort)的外键)
inStoretime
datetime
否
入库时间
outStoretime
datetime
否
出库时间
matterState
varchar(50)
否
物资状态
(8)物资设备类别管理表tb_matter_sort:显示物资设备类别
字段
类型
是否为空
备注
matterSortId
int
否
物质类别ID
matterSort
varchar(50)
否
物资类别名称(P)
(9)用户角色表tb_role:用于分配各用户的角色
字段
类型
是否为空
备注
roleId
int
否
角色ID(P)
roleName
varchar(50)
否
角色名
三、 数据库安全性设计
1) 概述
基于项目特点,项目的安全控制主要由程序代码控制。SQL Server 端没有特殊地设定安全设置和检查。项目的用户身份验证、用户授权管理都由应用程序代码实现。
2) 数据库验证方式
应用程序端连接数据库时使用的数据库验证方式为SQL Server验证。
四、数据库备份恢复策略
1)数据库的大小和数据修改的频率决定了采用何种数据库备份恢复策略。如果数据库较小或修改的频度非常低,则可以只实施完全数据库备份,不过此时要定期清理数据库的事务日志,防止数据库的事务日志被填满。其他情况则需要使用差异备份.由于本案例教学涉及的数据库规模较小,建议每周做一次完全备份,中间间隔两天做一次差异备份。
2)数据库运行日常维护
SQL Server 的一个优势就是对日常维护的要求比较低,但为了追求更高的可用性和安全性,建议每周做备份,同时注意将备份放在不同的备份媒体中,如多个硬盘。
五、建表语句
业主表 tb_ower
create table tb_ower(
owerId int identity primary key,
owerName varchar(50) ,
owerLoginname varchar(50) ,
owerPassword varchar(50) ,
owerSex varchar(50) ,
owerAge int ,
houseId int ,
roomId int ,
owerIDcard varchar(50) ,
owerTel varchar(50) ,
owerHomeplace varchar(50) ,
owerWorkplace varchar(50) ,
roleId int
)
业主成员表 tb_ower_family
create table tb_ower_family(
ofId int identity primary key,
ofName varchar(50) ,
ofSex varchar(50) ,
ofHouseplace varchar(50) ,
ofTel varchar(50) ,
ofWorkplace varchar(50) ,
owerId int
)
楼栋信息表tb_house
create table tb_house(
houseId int identity primary key,
houseName varchar(50) ,
bulidStarttime datetime ,
bulidEndtime datetime ,
houseBug varchar(50) ,
houseArea float ,
)
房间信息表tb_room
create table tb_room(
roomId int identity primary key,
roomName varchar(50) ,
houseId int ,
owerId int ,
enterTime datetime ,
roomType varchar(50) ,
roomArea float ,
roomPurpose varchar(50)
)
收费项目表tb_charge
create table tb_charge(
chargeId int identity primary key,
chargeName varchar(50) ,
chargeStandard float
)
业主缴费表tb_pay
create table tb_pay(
payId int identity primary key,
chargeName varchar(50) ,
chargeStandard float ,
payReal float ,
payBalance float ,
chargeTime dateTime ,
owerName varchar(50) ,
payState int ,
payMonth varchar(50)
)
物资设备管理表tb_matter
create table tb_matter(
matterId int identity primary key,
matterName varchar(50) ,
matterNum int ,
matterPrice float ,
matterSort varchar(50) ,
inStoretime datetime ,
outStoretime datetime ,
matterstate varchar(50)
)
物资设备类别管理表tb_matter_sort
create table tb_matter_sort(
matterSortId int identity,
matterSort varchar(50) primary key
)
用户角色表tb_role
create table tb_role (
roleId int identity primary key,
roleName varchar(50)
)
表关联:
(1)外键名为fk_houseId:tb_ower中的外键houseId对应tb_house中的主键houseId
alter table tb_ower add constraint fk_houseId foreign key (houseId)
references tb_house(houseId)
(2)外键名为fk_roomId:tb_ower中的外键roomId对应tb_room中的主键roomId
alter table tb_ower add constraint fk_roomId foreign key (roomId)
references tb_room(roomId)
(3)外键名为fk_roleId:tb_ower中的外键roleId对应tb_role中的主键roleId
alter table tb_ower add constraint fk_roleId foreign key (roleId)
references tb_role(roleId)
(4)外键名为fk_owerId:tb_ower_family中的外键owerId对应tb_ower中的主键owerId
alter table tb_ower_family add constraint fk_owerId foreign key (owerId)
references tb_ower(owerId)
(5)外键名为fk_room_houseId:tb_room中的外键houseId对应tb_house中的主键houseId
alter table tb_room add constraint fk_room_houseId foreign key (houseId)
references tb_house(houseId)
(6)外键名为fk_matter:tb_matter中的外键matterSort对应tb_matter_sort中的主键matterSort
alter table tb_matter add constraint fk_matter foreign key (matterSort)
references tb_matter_sort(matterSort)
在本省行政区域内从事草原保护、管理、建设和利用以及承包经营等活动,适用本条例。本条例所称草原,是指具有草原生态功能或者适用于畜牧业生产的天然草原和人工草地。天然草原包括草地、草山和草坡,人工草地包括改良草地和退耕还草地。appearance of the weld appearance quality technical requirements of the project must not have a molten metal stream does not melt the base metal to weld, weld seam and heat-affected zone surface must not have cracks, pores, defects such as crater and ash, surface smoothing, weld and base metal should be evenly smooth transition. Width 2-3 mm from the edge of weld Groove. Surface reinforcement should be less than or equal to 1 + 0.2 times the slope edge width, and should not be greater than 4 mm. Depth of undercut should be less than or equal to 0.5 mm, total length of the welds on both sides undercut not exceed 10% of the weld length, and long continuous should not be greater than 100 mm. Wrong side should be less than or at 0.2T, and should not be greater than 2 mm (wall thickness mm t) incomplete or not allow 7.5 7.5.1 installation quality process standards of the electrical enclosure Cabinet surface is clean, neat, no significant phenomenon of convex, close to nature, close the door. 7.5.2 Cabinet Cabinet face paints no paint, returned to rusted, consistent color. 7.5.3 uniform indirect gap from top to bottom, slot width <1.5mm 7.5.4 adjacent Cabinet surface roughness is 0. 7.5.5 the cabinets firmly fixed, crafts beautiful. 7.5.6 Cabinet surface gauge, switch cabinet mark clear, neat, firm paste. 7.5.7 Terminal row of neat, is reliable, the appearance is clean and not damaged. 7.5.8 cables neat and clean, solid binding, binding process in appearance. 7.5.9 the first cable production firm, crafts beautiful, clear signage does not fade. 7.5.10 fireproof plugging tight, no cracks and pores. 7.6 7.6.1 of the standard electrical wiring quality technology cable a, the multi-core wire bunch arrangement should be parallel to each other, horizontal wire harness or wire should be perpendicular to the longitudinal multi-core wire bunch. The distance between the wire harness and wire harness symmetry, and as close as possible. B-core wiring harness into round, multi-core wire bunch used g wire binding, fastening
展开阅读全文