
小区物业管理系统已得到完善。
5星
- 浏览量: 0
- 大小:None
- 文件类型:None
简介:
1、用于构建数据库的T-SQL语句如下:`create database Community`。
2、同时,可以同时在创建数据库时,定义与数据表相关的各种约束条件。以下是创建`household`表的T-SQL语句:`create table household(--住户信息 fno char(2), hno char(4), area int not null, pmfee int not null, name varchar(8)not null, tel varchar(11) not null, work_unit varchar(40), fsize int not null, repair_fund int not null, primary key(fno,hno));`
3、此外,还提供创建`property_management_fee`表的T-SQL语句:`create table property_management_fee(--物业缴费信息 fno char(2), hno char(4), year_date char(4), month_date char(2), rpmfee int check(rpmfee>0) not null, ispay char(2) check(ispay like 是 or ispay like 否)not null, pay_date datetime default getdate(), handler varchar(8), pay_no char(12), primary key(fno,hno,year_date,month_date), foreign key(fno,hno)references household(fno,hno) );`
4、最后,是创建`parking_space`表的T-SQL语句: `create table parking_space(--停车位信息 pno char(4)primary key, fno char(2), hno char(4), carno char(8), park_fee int check(park_fee>0) not null, foreign key(fno,hno)references household(fno,hno), );`
全部评论 (0)


