1、本数据库是实验机房管理数据库,主要有管理员信息表,机房表,机房机器表三张表
组成,机房表中存有管理员编号信息可以得知管理员管理的机房有哪几间,机器表中存有
机房表 id 信息,可以得知机器隶属于哪个机房。
2、
CREATE TABLE `t_admin_info` (
`admin_no` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT
NULL COMMENT '编号',
`admin_name` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci
DEFAULT '' COMMENT '名称',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT
'创建时间',
`create_user` char(8) CHARACTER SET utf8 COLLATE utf8_general_ci NOT
NULL DEFAULT 'sysadmin' COMMENT '创建人',
PRIMARY KEY (`admin_no`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='机房管理员信息表'
CREATE TABLE `t_classroom_info` (
`id` int(10) NOT NULL AUTO_INCREMENT COMMENT 'id',
`build_address` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci
DEFAULT NULL COMMENT '建筑名称',
`apartment` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci
DEFAULT '' COMMENT '教室地址',
`admin_no` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT
NULL COMMENT '编号',
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT
'创建时间',
`create_user` char(8) CHARACTER SET utf8 COLLATE utf8_general_ci NOT
NULL DEFAULT 'sysadmin' COMMENT '创建人',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8
COMMENT='机房位置信息表'
CREATE TABLE `t_machine_info` (
`id` int(10) NOT NULL AUTO_INCREMENT COMMENT 'id',
`machine_no` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci
DEFAULT NULL COMMENT '机器编码',
`classroom_id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci
NOT NULL COMMENT '机房 id',
`system` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci
DEFAULT NULL COMMENT '操作系统名称',
`cpu` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT
NULL COMMENT 'cpu 信息',
`ram` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT
NULL COMMENT '内存信息',