#菜单表 create table menu ( id int auto_increment,#自增主键 href varchar(32) not null,#菜单超链接 menu_name varchar(10) not null,#菜单名 icon varchar(20) null,#菜单图标 parent_id int not null,#父菜单id menu_level int not null,#菜单树深度 sort int not null,#排序 constraint menu_href_uindex unique (href) ) ; alter table menu add primary key(id); #thrift服务器表 create table thrift ( ip varchar(15), port int not null, timeout int default 3000 ); ALTER TABLE thrift ADD PRIMARY KEY (ip, port ); #数据源表 create table datasource ( db_id varchar(32) not null, hostname varchar(32) not null, db_port int(5) not null, username varchar(10) not null, db_password varchar(10) not null, db_name varchar(10) not null, annotation varchar(32) not null, db_desc varchar(20) null ) ; ALTER TABLE datasource ADD PRIMARY KEY (db_id);