📄 crebas.sql
字号:
媒体调查是否合格 SMALLINT not null,
实地调查是否合格 SMALLINT not null,
整体观察是否合格 SMALLINT not null,
问卷调查是否合格 SMALLINT not null,
此项标准是否合格 SMALLINT not null,
constraint PK_测评标准是否合格信息表 primary key (测评项目编号, 测评指标标号, 测评标准编号, 测评单位编号)
);
/*==============================================================*/
/* Index: "Relationship_16_FK" */
/*==============================================================*/
create index "Relationship_16_FK" on 测评标准是否合格信息表 (
测评项目编号 ASC,
测评指标标号 ASC,
测评标准编号 ASC
);
/*==============================================================*/
/* Index: "Relationship_17_FK" */
/*==============================================================*/
create index "Relationship_17_FK" on 测评标准是否合格信息表 (
测评单位编号 ASC
);
/*==============================================================*/
/* Table: 测评标准详细表 */
/*==============================================================*/
create table 测评标准详细表 (
测评项目编号 VARCHAR2(50) not null,
测评指标标号 VARCHAR2(50) not null,
测评标准编号 VARCHAR2(50) not null,
测评标准内容 CLOB not null,
是否采用材料审核 SMALLINT not null,
是否采用媒体 SMALLINT not null,
是否采用实地 SMALLINT not null,
是否采用整体观察 SMALLINT not null,
是否采用问卷调查 SMALLINT not null,
constraint PK_测评标准详细表 primary key (测评项目编号, 测评指标标号, 测评标准编号)
);
/*==============================================================*/
/* Index: "Relationship_20_FK" */
/*==============================================================*/
create index "Relationship_20_FK" on 测评标准详细表 (
测评项目编号 ASC,
测评指标标号 ASC
);
/*==============================================================*/
/* Table: 测评项目得分表 */
/*==============================================================*/
create table 测评项目得分表 (
测评单位编号 VARCHAR2(7) not null,
测评项目编号 VARCHAR2(50) not null,
测评项目得分 FLOAT not null,
constraint PK_测评项目得分表 primary key (测评单位编号, 测评项目编号)
);
/*==============================================================*/
/* Index: "Relationship_8_FK" */
/*==============================================================*/
create index "Relationship_8_FK" on 测评项目得分表 (
测评单位编号 ASC
);
/*==============================================================*/
/* Index: "Relationship_9_FK" */
/*==============================================================*/
create index "Relationship_9_FK" on 测评项目得分表 (
测评项目编号 ASC
);
/*==============================================================*/
/* Table: 测评项目的分 */
/*==============================================================*/
create table 测评项目的分 (
测评项目编号 VARCHAR2(50) not null,
测评项目内容 CLOB not null,
constraint PK_测评项目的分 primary key (测评项目编号)
);
/*==============================================================*/
/* Table: 浮动指标信息表 */
/*==============================================================*/
create table 浮动指标信息表 (
浮动指标编号 VARCHAR2(50) not null,
浮动指标内容 CLOB not null,
constraint PK_浮动指标信息表 primary key (浮动指标编号)
);
/*==============================================================*/
/* Table: 浮动指标得分表 */
/*==============================================================*/
create table 浮动指标得分表 (
测评单位编号 VARCHAR2(7) not null,
浮动指标编号 VARCHAR2(50) not null,
浮动指标得分 FLOAT not null,
constraint PK_浮动指标得分表 primary key (测评单位编号, 浮动指标编号)
);
/*==============================================================*/
/* Index: "Relationship_15_FK" */
/*==============================================================*/
create index "Relationship_15_FK" on 浮动指标得分表 (
测评单位编号 ASC
);
/*==============================================================*/
/* Index: "Relationship_21_FK" */
/*==============================================================*/
create index "Relationship_21_FK" on 浮动指标得分表 (
浮动指标编号 ASC
);
/*==============================================================*/
/* Table: 用户信息表 */
/*==============================================================*/
create table 用户信息表 (
角色编号 VARCHAR2(20) not null,
用户名称 VARCHAR2(1024) not null,
用户密码 VARCHAR2(50) not null,
用户备注 CLOB,
constraint PK_用户信息表 primary key (角色编号, 用户名称)
);
/*==============================================================*/
/* Index: "Relationship_5_FK" */
/*==============================================================*/
create index "Relationship_5_FK" on 用户信息表 (
角色编号 ASC
);
/*==============================================================*/
/* Table: 用户角色信息表 */
/*==============================================================*/
create table 用户角色信息表 (
角色编号 VARCHAR2(20) not null,
角色名称 VARCHAR2(1024) not null,
角色备注 CLOB,
constraint PK_用户角色信息表 primary key (角色编号)
);
/*==============================================================*/
/* Table: 选项信息表 */
/*==============================================================*/
create table 选项信息表 (
问卷编号 NUMBER not null,
问卷题号 VARCHAR2(10) not null,
选项标号 VARCHAR2(20) not null,
选项内容 CLOB not null,
constraint PK_选项信息表 primary key (问卷编号, 问卷题号, 选项标号)
);
/*==============================================================*/
/* Index: "Relationship_7_FK" */
/*==============================================================*/
create index "Relationship_7_FK" on 选项信息表 (
问卷编号 ASC,
问卷题号 ASC
);
/*==============================================================*/
/* Table: 问卷信息表 */
/*==============================================================*/
create table 问卷信息表 (
问卷编号 NUMBER not null,
问卷类型 VARCHAR2(40) not null,
constraint PK_问卷信息表 primary key (问卷编号)
);
/*==============================================================*/
/* Table: 问卷统计信息表 */
/*==============================================================*/
create table 问卷统计信息表 (
测评项目编号 VARCHAR2(50) not null,
测评指标标号 VARCHAR2(50) not null,
测评标准编号 VARCHAR2(50) not null,
测评单位编号 VARCHAR2(7) not null,
问卷统计编号 VARCHAR2(50) not null,
问卷类型编号 VARCHAR2(50) not null,
测评标准 CLOB not null,
统计结果 NUMBER not null,
是否合格 SMALLINT not null,
constraint PK_问卷统计信息表 primary key (测评项目编号, 测评指标标号, 测评标准编号, 测评单位编号, 问卷统计编号)
);
/*==============================================================*/
/* Index: "Relationship_22_FK" */
/*==============================================================*/
create index "Relationship_22_FK" on 问卷统计信息表 (
测评项目编号 ASC,
测评指标标号 ASC,
测评标准编号 ASC,
测评单位编号 ASC
);
/*==============================================================*/
/* Table: 问卷试题信息表 */
/*==============================================================*/
create table 问卷试题信息表 (
问卷编号 NUMBER not null,
问卷题号 VARCHAR2(10) not null,
选项数目 NUMBER not null,
constraint PK_问卷试题信息表 primary key (问卷编号, 问卷题号)
);
/*==============================================================*/
/* Index: "Relationship_6_FK" */
/*==============================================================*/
create index "Relationship_6_FK" on 问卷试题信息表 (
问卷编号 ASC
);
alter table "Entity_4"
add constraint FK_ENTITY_4_REL foreign key (问卷编号)
references 问卷信息表 (问卷编号);
alter table "Entity_4"
add constraint FK_ENTITY_4_RE2 foreign key (测评单位编号)
references 测评单位信息表 (测评单位编号);
alter table "Entity_5"
add constraint FK_ENTITY_5_REL foreign key (问卷编号, 问卷题号)
references 问卷试题信息表 (问卷编号, 问卷题号);
alter table "Entity_5"
add constraint FK_ENTITY_5_RE2 foreign key (测评单位编号)
references 测评单位信息表 (测评单位编号);
alter table 测评内容信息表
add constraint FK_测评内容信息表_RELA foreign key (测评项目编号, 测评指标标号)
references 测评指标信息表 (测评项目编号, 测评指标标号);
alter table 测评内容得分表
add constraint FK_测评内容得分表_RELA foreign key (测评单位编号)
references 测评单位信息表 (测评单位编号);
alter table 测评内容得分表
add constraint FK_测评内容得分表_REL2 foreign key (测评项目编号, 测评指标标号)
references 测评内容信息表 (测评项目编号, 测评指标标号);
alter table 测评指标信息表
add constraint FK_测评指标信息表_RELA foreign key (测评项目编号)
references 测评项目的分 (测评项目编号);
alter table 测评指标得分表
add constraint FK_测评指标得分表_RELA foreign key (测评单位编号)
references 测评单位信息表 (测评单位编号);
alter table 测评指标得分表
add constraint FK_测评指标得分表_REL2 foreign key (测评项目编号, 测评指标标号)
references 测评指标信息表 (测评项目编号, 测评指标标号);
alter table 测评标准是否合格信息表
add constraint FK_测评标准是否合格_REL foreign key (测评项目编号, 测评指标标号, 测评标准编号)
references 测评标准详细表 (测评项目编号, 测评指标标号, 测评标准编号);
alter table 测评标准是否合格信息表
add constraint FK_测评标准是否合格_RE2 foreign key (测评单位编号)
references 测评单位信息表 (测评单位编号);
alter table 测评标准详细表
add constraint FK_测评标准详细表_RELA foreign key (测评项目编号, 测评指标标号)
references 测评内容信息表 (测评项目编号, 测评指标标号);
alter table 测评项目得分表
add constraint FK_测评项目得分表_RELA foreign key (测评单位编号)
references 测评单位信息表 (测评单位编号);
alter table 测评项目得分表
add constraint FK_测评项目得分表_REL2 foreign key (测评项目编号)
references 测评项目的分 (测评项目编号);
alter table 浮动指标得分表
add constraint FK_浮动指标得分表_RELA foreign key (测评单位编号)
references 测评单位信息表 (测评单位编号);
alter table 浮动指标得分表
add constraint FK_浮动指标得分表_REL2 foreign key (浮动指标编号)
references 浮动指标信息表 (浮动指标编号);
alter table 用户信息表
add constraint FK_用户信息表_RELATI foreign key (角色编号)
references 用户角色信息表 (角色编号);
alter table 选项信息表
add constraint FK_选项信息表_RELATI foreign key (问卷编号, 问卷题号)
references 问卷试题信息表 (问卷编号, 问卷题号);
alter table 问卷统计信息表
add constraint FK_问卷统计信息表_RELA foreign key (测评项目编号, 测评指标标号, 测评标准编号, 测评单位编号)
references 测评标准是否合格信息表 (测评项目编号, 测评指标标号, 测评标准编号, 测评单位编号);
alter table 问卷试题信息表
add constraint FK_问卷试题信息表_RELA foreign key (问卷编号)
references 问卷信息表 (问卷编号);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -