CREATE TABLE `account` (
`userid` INT(11) NOT NULL AUTO_INCREMENT,
`username` VARCHAR(80) NULL DEFAULT NULL,
`password` VARCHAR(60) NULL DEFAULT NULL,
`email` VARCHAR(80) NULL DEFAULT NULL,
`xm` VARCHAR(80) NULL DEFAULT NULL,
`address` VARCHAR(40) NULL DEFAULT NULL,
PRIMARY KEY (`userid`)
)
COLLATE='utf8_general_ci'
ENGINE=InnoDB
;
create table profile(
userid int(11) primary key,
lang varchar(80),
catid int(11),
constraint fk_1 foreign key(userid) references account(userid),
constraint fk_2 foreign key(catid) references category(catid)
)
create table category(
catid int(11) primary key,
catno varchar(10),
name varchar(80),
descn varchar(255)
)