数据库表设计
/*==============================================================*/
/* Table: 历史曲线表 */
/*==============================================================*/
create table 历史曲线表
(
线号 int,
工位号 int,
型号 varchar(20),
日期 datetime,
起停次数 bigint,
工作系数 double,
制冷速度 bigint,
标准1 float(10),
标准2 float(10),
标准3 float(10),
D1 double,
.
.
D180 double
);
/*==============================================================*/
/* Table: 测试状态参数设定数 */
/*==============================================================*/
create table 测试状态参数设定数
(
TestID int not null,
工位号 int,
型号 varchar(20),
编号 int,
测试时间 int,
日期 datetime,
primary key (TestID)
);
/*==============================================================*/
/* Table: 环境温度表 */
/*==============================================================*/
create table 环境温度表
(
TemID bigint not null,
日期 datetime,
环温1 smallint,
环温2 smallint,
环温3 smallint,
primary key (TemID)
);
/*==============================================================*/
/* Table: 用户表 */
/*==============================================================*/
create table 用户表
(
UserID int not null,
姓名 varchar(20) not null,
密码 varchar(20) not null,
类型 tinyint,
primary key (UserID)
);
/*==============================================================*/
/* Table: 设备型号表 */
/*==============================================================*/
create table 设备型号表
(
设备条码 longtext not null,
设备类型 varchar(20),
标准1 float(10),
标准2 float(10),
标准3 float(10),
工作系数 double,
起停次数 bigint,
制冷速度 bigint,
primary key (设备条码)
);
/*==============================================================*/
/* Table: 通信参数设定表 */
/*==============================================================*/
create table 通信参数设定表
(
线数 int,
通信口 varchar(20),
波特率 bigint,
机器起址 int,
机器末址 int,
环温点起址 int,
环温点末址 int
);
请大哥,大姐们帮帮了,怎么找出他们的关系,及怎样优化他们的关系,怎么样去重新设计他们才最好呢,有什么好的原则没有啊,我刚学数据库,还请多帮帮我啊