Система управления базой данных объектов Гражданской Обороны для принятия решений в чрезвычайных ситуациях
Страница 30
последствий чрезвычайных ситуаций, возникающих в результате
аварий, катастроф и стихийных бедствий.
Снижение уровня техногенной нагрузки города Москвы.
который неоправданно велик, является одной из важнейших задач
перспективного генерального плана развития Москвы.
ПРИЛОЖЕНИЕ 3
spool build.log
connect internal
startup nomount pfile=STAS:ORANW722\DATABASE\initorcl.ora
create database gobase
controlfile reuse
logfile 'STAS:ORANW722\DATABASE\log1orcl.ora' size 200K reuse,
'STAS:ORANW722\DATABASE\log2orcl.ora' size 200K reuse
datafile 'STAS:ORANW722\DATABASE\sys1orcl.ora' size 100M reuse autoextend on
next 100M maxsize 2000M
character set CL8MSWIN1251;
create rollback segment rb_temp;
alter rollback segment rb_temp online;
@build_db.sql
@STAS:ORANW722\RDBMS72\admin\catalog.sql
@STAS:ORANW722\RDBMS72\admin\catalog6.sql
@STAS:ORANW722\RDBMS72\admin\catproc.sql
connect system/manager
@STAS:ORANW722\RDBMS72\admin\catdbsyn.sql
@pupbld.sql
connect internal
alter rollback segment rb_temp offline;
shutdown;
spool off
ПРИЛОЖЕНИЕ 4
CREATE TABLE ACTIVITY
(ACTIVITY_ID NUMBER(7) NOT NULL,
ACTIVITY_CHAR VARCHAR2(50) NULL
);
CREATE UNIQUE INDEX IPKACTIVITY
ON ACTIVITY
(
ACTIVITY_ID ASC
);
ALTER TABLE ACTIVITY
ADD ( PRIMARY KEY (ACTIVITY_ID) ) ;
CREATE TABLE BUILDING
(BUILDING_ID NUMBER(7) NOT NULL,
BUILDING_CHAR VARCHAR2(50) NULL
);
CREATE UNIQUE INDEX IPKBUILDING
ON BUILDING
(
BUILDING_ID ASC
);
ALTER TABLE BUILDING
ADD ( PRIMARY KEY (BUILDING_ID) ) ;
CREATE TABLE BUILDINGOB
(OBJECT_ID NUMBER(9) NOT NULL,
BUILDING_ID NUMBER(7) NOT NULL,
BUILDINGNUM NUMBER(9) NULL,
NAMEADD_ID NUMBER(7) NOT NULL,
DATEADD DATE NOT NULL,
NAMEINS_ID NUMBER(7) NOT NULL,
DATEINS DATE NOT NULL,
PRIM VARCHAR2(100) NULL
);
CREATE UNIQUE INDEX IPKBUILDINGOB
ON BUILDINGOB
(
OBJECT_ID ASC,
BUILDING_ID ASC
);
CREATE INDEX IFKOBBUILDINGOB
ON BUILDINGOB
(
OBJECT_ID ASC
);
CREATE INDEX IFKBUBUILDINGOB
ON BUILDINGOB
(
BUILDING_ID ASC
);
ALTER TABLE BUILDINGOB
ADD ( PRIMARY KEY (OBJECT_ID, BUILDING_ID) ) ;
CREATE TABLE CATEGORY
(CATEGORY_ID NUMBER(7) NOT NULL,
CATEGORY_TYPE NUMBER(1) NOT NULL,
CATEGORY_CHAR VARCHAR2(50) NULL
);
CREATE UNIQUE INDEX IPKCATEGORY
ON CATEGORY
(
CATEGORY_ID ASC
);
ALTER TABLE CATEGORY
ADD ( PRIMARY KEY (CATEGORY_ID) ) ;
CREATE TABLE CATTEMA
(TEMA_ID NUMBER(7) NOT NULL,
CATEGORY_ID NUMBER(7) NOT NULL,
CATTEMANUM NUMBER(4) NULL,
NAMEADD_ID NUMBER(7) NOT NULL,
DATEADD DATE NOT NULL,
NAMEINS_ID NUMBER(7) NOT NULL,
DATEINS DATE NOT NULL,
PRIM VARCHAR2(100) NULL
);
CREATE UNIQUE INDEX IPKCATTEMA
ON CATTEMA
(
TEMA_ID ASC,
CATEGORY_ID ASC
);
CREATE INDEX IFKTECATTEMA
ON CATTEMA
(
TEMA_ID ASC
);
CREATE INDEX IFKCACATTEMA
ON CATTEMA
(
CATEGORY_ID ASC
);
ALTER TABLE CATTEMA
ADD ( PRIMARY KEY (TEMA_ID, CATEGORY_ID) ) ;
CREATE TABLE DEPARTAMENT
(DEPARTAMENT_ID NUMBER(7) NOT NULL,
DEPARTAMENT_CHAR VARCHAR2(50) NULL
);
CREATE UNIQUE INDEX IPKDEPARTAMENT
ON DEPARTAMENT
(
DEPARTAMENT_ID ASC
);
ALTER TABLE DEPARTAMENT
ADD ( PRIMARY KEY (DEPARTAMENT_ID) ) ;
CREATE TABLE FORMIROV
(FORMIROV_ID NUMBER(7) NOT NULL,
FORMIROV_CHAR VARCHAR2(50) NULL
);
CREATE UNIQUE INDEX IPKFORMIROV
ON FORMIROV
(
FORMIROV_ID ASC
);
ALTER TABLE FORMIROV
ADD ( PRIMARY KEY (FORMIROV_ID) ) ;
CREATE TABLE FORMIROVOB
(FORMIROV_ID NUMBER(7) NOT NULL,
OBJECT_ID NUMBER(9) NOT NULL,
READY_ID NUMBER(7) NOT NULL,
FORMIROVNUM NUMBER(9) NULL,
PEOPLENUM NUMBER(9) NULL,
NAMEADD_ID NUMBER(7) NOT NULL,
DATEADD DATE NOT NULL,
NAMEINS_ID NUMBER(7) NOT NULL,
DATEINS DATE NOT NULL,
PRIM VARCHAR2(100) NULL
);
CREATE UNIQUE INDEX IPKFORMIROVOB
ON FORMIROVOB
(
FORMIROV_ID ASC,
OBJECT_ID ASC
);
CREATE INDEX IFKFOFORMIROVOB
ON FORMIROVOB
(
FORMIROV_ID ASC
);
CREATE INDEX IFKOBFORMIROVOB
ON FORMIROVOB
(
OBJECT_ID ASC
);
CREATE INDEX IFKREFORMIROVOB
ON FORMIROVOB
(
READY_ID ASC
);
ALTER TABLE FORMIROVOB
ADD ( PRIMARY KEY (FORMIROV_ID, OBJECT_ID) ) ;
CREATE TABLE GOBASEUSER
(GOBASEUSER_ID NUMBER(7) NOT NULL,
NAME VARCHAR2(50) NULL
);
CREATE UNIQUE INDEX IPKGOBASEUSER
ON GOBASEUSER
(
GOBASEUSER_ID ASC
);
ALTER TABLE GOBASEUSER
ADD ( PRIMARY KEY (GOBASEUSER_ID) ) ;
CREATE TABLE MATERIAL
(MATERIAL_ID NUMBER(7) NOT NULL,
MATERIAL_CHAR VARCHAR2(50) NULL
);
CREATE UNIQUE INDEX IPKMATERIAL
ON MATERIAL
(
MATERIAL_ID ASC
);
ALTER TABLE MATERIAL
ADD ( PRIMARY KEY (MATERIAL_ID) ) ;
CREATE TABLE MATERIALOB
(OBJECT_ID NUMBER(9) NOT NULL,
MATERIAL_ID NUMBER(7) NOT NULL,
MATERIALNUM NUMBER(9) NULL,
NAMEADD_ID NUMBER(7) NOT NULL,
DATEADD DATE NOT NULL,
NAMEINS_ID NUMBER(7) NOT NULL,
DATEINS DATE NOT NULL,
PRIM VARCHAR2(100) NULL
);
CREATE UNIQUE INDEX IPKMATERIALOB
ON MATERIALOB
(
OBJECT_ID ASC,
MATERIAL_ID ASC
);
CREATE INDEX IFKOBMATERIALOB
ON MATERIALOB
(
OBJECT_ID ASC
);
CREATE INDEX IFKMAMATERIALOB
ON MATERIALOB
(
MATERIAL_ID ASC
);
ALTER TABLE MATERIALOB
ADD ( PRIMARY KEY (OBJECT_ID, MATERIAL_ID) ) ;
CREATE TABLE MATTEH
(MATTEH_ID NUMBER(7) NOT NULL,
SERVIS_ID NUMBER(7) NOT NULL,
MATTEH_CHAR VARCHAR2(50) NULL
);
CREATE UNIQUE INDEX IPKMATTEH
ON MATTEH
(
MATTEH_ID ASC
);
CREATE INDEX IFKSEMATTEH
ON MATTEH
(
SERVIS_ID ASC
);
ALTER TABLE MATTEH
ADD ( PRIMARY KEY (MATTEH_ID) ) ;
CREATE TABLE MATTEHOB
(OBJECT_ID NUMBER(9) NOT NULL,
MATTEH_ID NUMBER(7) NOT NULL,
MATTEHNUM NUMBER(9) NULL,
NAMEADD_ID NUMBER(7) NOT NULL,
DATEADD DATE NOT NULL,
NAMEINS_ID NUMBER(7) NOT NULL,
DATEINS DATE NOT NULL,
PRIM VARCHAR2(100) NULL
);
CREATE UNIQUE INDEX IPKMATTEHOB
ON MATTEHOB
(
OBJECT_ID ASC,
MATTEH_ID ASC
);
CREATE INDEX IFKMAMATTEHOB
ON MATTEHOB
(
MATTEH_ID ASC
);
CREATE INDEX IFKOBMATTEHOB
ON MATTEHOB
(
OBJECT_ID ASC
);
ALTER TABLE MATTEHOB
ADD ( PRIMARY KEY (OBJECT_ID, MATTEH_ID) ) ;
CREATE TABLE OBECONOM
(OBJECT_ID NUMBER(9) NOT NULL,
OBJECTNO NUMBER(7) NOT NULL,
POSTGO_ID NUMBER(7) NOT NULL,
POST_ID NUMBER(7) NOT NULL,
DEPARTAMENT_ID NUMBER(7) NOT NULL,
RISK_ID NUMBER(7) NOT NULL,
PROPERTY_ID NUMBER(7) NOT NULL,
ACTIVITY_ID NUMBER(7) NOT NULL,
REGION_ID NUMBER(7) NOT NULL,
PECULIAR_ID NUMBER(7) NOT NULL,
GLAVOBJECT_ID NUMBER(7) NOT NULL,
OBJECTNAME VARCHAR2(100) NULL,
ADDRESS_IND CHAR(6) NULL,
TOWN_ID NUMBER(9) NULL,
ADDRESS_CHAR VARCHAR2(150) NULL,
WORKNUMBER NUMBER(7) NULL,
NRSM NUMBER(7) NULL,
NRSV NUMBER(7) NULL,
DIRECTIONNAME VARCHAR2(50) NULL,
DIRECTIONWTEL CHAR(7) NULL,
DIRECTIONHTEL CHAR(7) NULL,
ZAMNAME VARCHAR2(50) NULL,
ZAMWTEL CHAR(7) NULL,
ZAMHTEL CHAR(7) NULL,
COMANDGONAME VARCHAR2(50) NULL,
COMANDGOWTEL CHAR(7) NULL,
COMANDGOHTEL CHAR(7) NULL,
P1NAME VARCHAR2(50) NULL,
P1WTEL CHAR(7) NULL,
P1HTEL CHAR(7) NULL,
P2NAME VARCHAR2(50) NULL,
P2WTEL CHAR(7) NULL,
P2HTEL CHAR(7) NULL,
P3NAME VARCHAR2(50) NULL,
P3WTEL CHAR(7) NULL,
P3HTEL CHAR(7) NULL,
DUTYTEL CHAR(7) NULL,
DUTY2TEL CHAR(7) NULL,