数据库代码实例

create table Employee(
EMP_ID int(12) not null auto_increment primary key,
EMP_NAME varchar(64) not null,
EMP_PWD varchar(64) not null,
POWER_ID int(12) not null,
EMP_SEX char(4) not null,
EMP_PHONE varchar(32) not null,
DEPT_ID int(12) not null);

create table Dept(
DEPT_ID int(12) not null auto_increment primary key,
DEPT_NAME varchar(32) not null);


create table P(
POWER_ID int(12) not null auto_increment primary key,
POWER_NAME varchar(32) not null,
POWER_ADDRESS varchar(128) not null);

create table Document(
DOC_ID int(12) not null auto_increment primary key,
DOC_NAME varchar(64) not null,
DOC_CODE int(12) not null,
DOC_CONTENT text not null,
DOC_ISAGREE Boolean not null default false);


create table Flow(
FLOW_ID int(12) not null auto_increment primary key,
DOC_ID int(12) not null,
FLOW_SEND int(12) not null,
FLOW_GETTING int(12) not null,
FLOW_GETTED int(12) not null);

create table Model(
MODEL_ID int(12) not null auto_increment primary key,
MODEL_NAME varchar(32) not null,
MODEL_CONTENT text not null);

create table gongwen(
GW_ID int(12) not null auto_increment primary key,
GW_QCY text not null,
GW_ZZ text not null,
GW_SM text not null,
GW_NB text not null);

相关文档
最新文档