
create database household_Exam
use household_Exam

create table userTable(
	userid varchar(50) primary key,
	userpass varchar(50),
	username nvarchar(50),
	householdType char(5) ,
	createdate datetime
)

create table categoryTable(
	idx bigint primary key identity(1,1),
	type char(1),
	categoryname nvarchar(50),
	state char(1),
	householdtype char(5)
)

create table householdTable(
	idx bigint primary key identity(1,1),
	householdtype char(5),
	categorytype bigint,
	householddate datetime,
	type char(1),
	content nvarchar(200),
	money decimal(20,0),
	other nvarchar(200),
	createdate datetime,
	creater varchar(50),
	state char(1)	
)