--------------------------------------------------
-- Export file for user GJUTIS                  --
-- Created by OpenValue on 2014-07-16, 11:02:29 --
--------------------------------------------------

spool avi.log

prompt
prompt Creating table TB_AVI_SECT_MSTR
prompt ===============================
prompt
create table GJUTIS.TB_AVI_SECT_MSTR
(
  avi_sect_nmbr  VARCHAR2(10) not null,
  strt_spot_nm   VARCHAR2(60),
  end_spot_nm    VARCHAR2(60),
  avi_sect_nm    VARCHAR2(60),
  avi_sect_dstc  NUMBER(6) default 0,
  shrt_pass_hh   NUMBER(6) default 0,
  lnst_pass_hh   NUMBER(6) default 0,
  spot_num       NUMBER(3) default 0,
  stnd_drft_val  NUMBER(9),
  min_sped       NUMBER(3) default 0,
  max_sped       NUMBER(3) default 0,
  smth_fctr      NUMBER(5,2) default 0,
  del_yn         CHAR(1) default 'N',
  frst_regr_nmbr VARCHAR2(20),
  frst_rgst_dt   VARCHAR2(14),
  last_crpr_nmbr VARCHAR2(20),
  last_crct_dt   VARCHAR2(14)
)
tablespace ITS_HIST_DATA
  pctfree 10
  initrans 1
  maxtrans 255
nologging;
comment on table GJUTIS.TB_AVI_SECT_MSTR
  is 'AVI 구간 마스터';
comment on column GJUTIS.TB_AVI_SECT_MSTR.avi_sect_nmbr
  is 'AVI 구간 번호';
comment on column GJUTIS.TB_AVI_SECT_MSTR.strt_spot_nm
  is '시작 지점 명';
comment on column GJUTIS.TB_AVI_SECT_MSTR.end_spot_nm
  is '종료 지점 명';
comment on column GJUTIS.TB_AVI_SECT_MSTR.avi_sect_nm
  is 'AVI 구간 명';
comment on column GJUTIS.TB_AVI_SECT_MSTR.avi_sect_dstc
  is 'AVI 구간 거리';
comment on column GJUTIS.TB_AVI_SECT_MSTR.shrt_pass_hh
  is '최단 통과 시간';
comment on column GJUTIS.TB_AVI_SECT_MSTR.lnst_pass_hh
  is '최장 통과 시간';
comment on column GJUTIS.TB_AVI_SECT_MSTR.spot_num
  is '지점 개수';
comment on column GJUTIS.TB_AVI_SECT_MSTR.stnd_drft_val
  is '표준 편차 값';
comment on column GJUTIS.TB_AVI_SECT_MSTR.min_sped
  is '최소 속도';
comment on column GJUTIS.TB_AVI_SECT_MSTR.max_sped
  is '최대 속도';
comment on column GJUTIS.TB_AVI_SECT_MSTR.smth_fctr
  is '평활화 계수';
comment on column GJUTIS.TB_AVI_SECT_MSTR.del_yn
  is '삭제 여부';
comment on column GJUTIS.TB_AVI_SECT_MSTR.frst_regr_nmbr
  is '최초 등록자 번호';
comment on column GJUTIS.TB_AVI_SECT_MSTR.frst_rgst_dt
  is '최초 등록 일시';
comment on column GJUTIS.TB_AVI_SECT_MSTR.last_crpr_nmbr
  is '최종 수정자 번호';
comment on column GJUTIS.TB_AVI_SECT_MSTR.last_crct_dt
  is '최종 수정 일시';
alter table GJUTIS.TB_AVI_SECT_MSTR
  add constraint IX_AVI_SECT_MSTR_PK primary key (AVI_SECT_NMBR)
  using index 
  tablespace ITS_HIST_DATA
  pctfree 10
  initrans 2
  maxtrans 255;

prompt
prompt Creating table TB_AVI_15M_STAT
prompt ==============================
prompt
create table GJUTIS.TB_AVI_15M_STAT
(
  avi_sect_nmbr VARCHAR2(10) not null,
  stat_dt       VARCHAR2(14) not null,
  stat_yy       VARCHAR2(4) not null,
  stat_mn       VARCHAR2(2) not null,
  stat_dd       VARCHAR2(2) not null,
  stat_hm       VARCHAR2(4) not null,
  day_type_cd   VARCHAR2(7),
  tfvl          NUMBER(6) default 0,
  trvl_sped     NUMBER(3) default 0,
  data_num      NUMBER(3) default 0,
  mtch_rate     NUMBER(3)
)
tablespace ITS_HIST_DATA
  pctfree 10
  initrans 1
  maxtrans 255
nologging;
comment on table GJUTIS.TB_AVI_15M_STAT
  is 'AVI 15분 통계';
comment on column GJUTIS.TB_AVI_15M_STAT.avi_sect_nmbr
  is 'AVI 구간 번호';
comment on column GJUTIS.TB_AVI_15M_STAT.stat_dt
  is '통계 일시';
comment on column GJUTIS.TB_AVI_15M_STAT.stat_yy
  is '통계 년';
comment on column GJUTIS.TB_AVI_15M_STAT.stat_mn
  is '통계 월';
comment on column GJUTIS.TB_AVI_15M_STAT.stat_dd
  is '통계 일';
comment on column GJUTIS.TB_AVI_15M_STAT.stat_hm
  is '통계 시분';
comment on column GJUTIS.TB_AVI_15M_STAT.day_type_cd
  is '요일 유형 코드';
comment on column GJUTIS.TB_AVI_15M_STAT.tfvl
  is '교통량';
comment on column GJUTIS.TB_AVI_15M_STAT.trvl_sped
  is '통행 속도';
comment on column GJUTIS.TB_AVI_15M_STAT.data_num
  is '데이터 개수';
comment on column GJUTIS.TB_AVI_15M_STAT.mtch_rate
  is '매칭 율';
alter table GJUTIS.TB_AVI_15M_STAT
  add constraint IX_AVI_15M_STAT_PK primary key (AVI_SECT_NMBR, STAT_DT)
  using index 
  tablespace ITS_HIST_DATA
  pctfree 10
  initrans 2
  maxtrans 255;
alter table GJUTIS.TB_AVI_15M_STAT
  add constraint FK_AVI_15M_STAT__AVI_SECT_NMBR foreign key (AVI_SECT_NMBR)
  references GJUTIS.TB_AVI_SECT_MSTR (AVI_SECT_NMBR)
  disable;

prompt
prompt Creating table TB_AVI_5M_STAT
prompt =============================
prompt
create table GJUTIS.TB_AVI_5M_STAT
(
  avi_sect_nmbr VARCHAR2(10) not null,
  stat_dt       VARCHAR2(14) not null,
  stat_ymd      VARCHAR2(8) not null,
  stat_hm       VARCHAR2(4) not null,
  day_type_cd   VARCHAR2(7),
  tfvl          NUMBER(6) default 0,
  trvl_sped     NUMBER(3) default 0,
  data_num      NUMBER(3) default 0,
  mtch_rate     NUMBER(3)
)
tablespace ITS_HIST_DATA
  pctfree 10
  initrans 1
  maxtrans 255
nologging;
comment on table GJUTIS.TB_AVI_5M_STAT
  is 'AVI 5분 통계';
comment on column GJUTIS.TB_AVI_5M_STAT.avi_sect_nmbr
  is 'AVI 구간 번호';
comment on column GJUTIS.TB_AVI_5M_STAT.stat_dt
  is '통계 일시';
comment on column GJUTIS.TB_AVI_5M_STAT.stat_ymd
  is '통계 일자';
comment on column GJUTIS.TB_AVI_5M_STAT.stat_hm
  is '통계 시분';
comment on column GJUTIS.TB_AVI_5M_STAT.day_type_cd
  is '요일 유형 코드';
comment on column GJUTIS.TB_AVI_5M_STAT.tfvl
  is '교통량';
comment on column GJUTIS.TB_AVI_5M_STAT.trvl_sped
  is '통행 속도';
comment on column GJUTIS.TB_AVI_5M_STAT.data_num
  is '데이터 개수';
comment on column GJUTIS.TB_AVI_5M_STAT.mtch_rate
  is '매칭 율';
alter table GJUTIS.TB_AVI_5M_STAT
  add constraint IX_AVI_5M_STAT_PK primary key (AVI_SECT_NMBR, STAT_DT)
  using index 
  tablespace ITS_HIST_DATA
  pctfree 10
  initrans 2
  maxtrans 255;
alter table GJUTIS.TB_AVI_5M_STAT
  add constraint FK_TB_AVI_5M_STAT_01 foreign key (AVI_SECT_NMBR)
  references GJUTIS.TB_AVI_SECT_MSTR (AVI_SECT_NMBR)
  disable;

prompt
prompt Creating table TB_AVI_CTLR
prompt ==========================
prompt
create table GJUTIS.TB_AVI_CTLR
(
  avi_ctlr_mngm_nmbr VARCHAR2(20) not null,
  avi_id             VARCHAR2(10),
  link_id            NUMBER(10),
  avi_lctn_nm        VARCHAR2(60),
  avi_vald_yn        CHAR(1) default 'N',
  avi_ctlr_ip        VARCHAR2(20),
  avi_ctlr_cmnc_port VARCHAR2(5),
  avi_main_ctlr_yn   CHAR(1) default 'N',
  avi_mngm_lane_num  NUMBER(2),
  avi_cmra_num       NUMBER(2),
  avi_dtct_num       NUMBER(2),
  avi_dtct_nm        VARCHAR2(60),
  avi_clct_cycl      NUMBER(3),
  avi_lamp_auto_yn   CHAR(1) default 'N',
  avi_lamp_on_hms    VARCHAR2(6),
  avi_lamp_off_hms   VARCHAR2(6),
  avi_lamp_on_yn     CHAR(1) default 'N',
  x_crdn             NUMBER(11,8),
  y_crdn             NUMBER(10,8),
  rmrk               VARCHAR2(600),
  del_yn             CHAR(1) default 'N',
  frst_regr_nmbr     VARCHAR2(20),
  frst_rgst_dt       VARCHAR2(14),
  last_crpr_nmbr     VARCHAR2(20),
  last_crct_dt       VARCHAR2(14)
)
tablespace ITS_HIST_DATA
  pctfree 10
  initrans 1
  maxtrans 255
nologging;
comment on table GJUTIS.TB_AVI_CTLR
  is 'AVI 제어기';
comment on column GJUTIS.TB_AVI_CTLR.avi_ctlr_mngm_nmbr
  is 'AVI 제어기 관리 번호';
comment on column GJUTIS.TB_AVI_CTLR.avi_id
  is 'AVI ID';
comment on column GJUTIS.TB_AVI_CTLR.link_id
  is '링크 ID';
comment on column GJUTIS.TB_AVI_CTLR.avi_lctn_nm
  is 'AVI 위치 명';
comment on column GJUTIS.TB_AVI_CTLR.avi_vald_yn
  is 'AVI 유효 여부';
comment on column GJUTIS.TB_AVI_CTLR.avi_ctlr_ip
  is 'AVI 제어기 아이피';
comment on column GJUTIS.TB_AVI_CTLR.avi_ctlr_cmnc_port
  is 'AVI 제어기 통신 포트';
comment on column GJUTIS.TB_AVI_CTLR.avi_main_ctlr_yn
  is 'AVI 주 제어기 여부';
comment on column GJUTIS.TB_AVI_CTLR.avi_mngm_lane_num
  is 'AVI 관리 차로 개수';
comment on column GJUTIS.TB_AVI_CTLR.avi_cmra_num
  is 'AVI 카메라 개수';
comment on column GJUTIS.TB_AVI_CTLR.avi_dtct_num
  is 'AVI 검지기 개수';
comment on column GJUTIS.TB_AVI_CTLR.avi_dtct_nm
  is 'AVI 검지기 명';
comment on column GJUTIS.TB_AVI_CTLR.avi_clct_cycl
  is 'AVI 수집 주기';
comment on column GJUTIS.TB_AVI_CTLR.avi_lamp_auto_yn
  is 'AVI 조명장치 자동 여부';
comment on column GJUTIS.TB_AVI_CTLR.avi_lamp_on_hms
  is 'AVI 조명장치 ON 시각';
comment on column GJUTIS.TB_AVI_CTLR.avi_lamp_off_hms
  is 'AVI 조명장치 OFF 시각';
comment on column GJUTIS.TB_AVI_CTLR.avi_lamp_on_yn
  is 'AVI 조명장치 ON 여부';
comment on column GJUTIS.TB_AVI_CTLR.x_crdn
  is 'X 좌표';
comment on column GJUTIS.TB_AVI_CTLR.y_crdn
  is 'Y 좌표';
comment on column GJUTIS.TB_AVI_CTLR.rmrk
  is '비고';
comment on column GJUTIS.TB_AVI_CTLR.del_yn
  is '삭제 여부';
comment on column GJUTIS.TB_AVI_CTLR.frst_regr_nmbr
  is '최초 등록자 번호';
comment on column GJUTIS.TB_AVI_CTLR.frst_rgst_dt
  is '최초 등록 일시';
comment on column GJUTIS.TB_AVI_CTLR.last_crpr_nmbr
  is '최종 수정자 번호';
comment on column GJUTIS.TB_AVI_CTLR.last_crct_dt
  is '최종 수정 일시';
alter table GJUTIS.TB_AVI_CTLR
  add constraint IX_AVI_CTLR_PK primary key (AVI_CTLR_MNGM_NMBR)
  using index 
  tablespace ITS_HIST_DATA
  pctfree 10
  initrans 2
  maxtrans 255;

prompt
prompt Creating table TB_AVI_CMRA
prompt ==========================
prompt
create table GJUTIS.TB_AVI_CMRA
(
  avi_ctlr_mngm_nmbr VARCHAR2(20) not null,
  avi_cmra_id        VARCHAR2(20) not null,
  pcpn_lane          NUMBER(2),
  avi_cmra_drct_cd   VARCHAR2(7),
  updt_dt            VARCHAR2(14),
  del_yn             CHAR(1) default 'N',
  fan_val            NUMBER(4),
  tilt_val           NUMBER(4),
  zoom_val           NUMBER(4),
  focs_val           NUMBER(4),
  frst_regr_nmbr     VARCHAR2(20),
  frst_rgst_dt       VARCHAR2(14),
  last_crpr_nmbr     VARCHAR2(20),
  last_crct_dt       VARCHAR2(14)
)
tablespace ITS_HIST_DATA
  pctfree 10
  initrans 1
  maxtrans 255
nologging;
comment on table GJUTIS.TB_AVI_CMRA
  is 'AVI 카메라';
comment on column GJUTIS.TB_AVI_CMRA.avi_ctlr_mngm_nmbr
  is 'AVI 제어기 관리 번호';
comment on column GJUTIS.TB_AVI_CMRA.avi_cmra_id
  is 'AVI 카메라 아이디';
comment on column GJUTIS.TB_AVI_CMRA.pcpn_lane
  is '감지 차로';
comment on column GJUTIS.TB_AVI_CMRA.avi_cmra_drct_cd
  is 'AVI 카메라 방향 코드';
comment on column GJUTIS.TB_AVI_CMRA.updt_dt
  is '갱신 일시';
comment on column GJUTIS.TB_AVI_CMRA.del_yn
  is '삭제 여부';
comment on column GJUTIS.TB_AVI_CMRA.fan_val
  is '팬 값';
comment on column GJUTIS.TB_AVI_CMRA.tilt_val
  is '틸트 값';
comment on column GJUTIS.TB_AVI_CMRA.zoom_val
  is '줌 값';
comment on column GJUTIS.TB_AVI_CMRA.focs_val
  is '초점 값';
comment on column GJUTIS.TB_AVI_CMRA.frst_regr_nmbr
  is '최초 등록자 번호';
comment on column GJUTIS.TB_AVI_CMRA.frst_rgst_dt
  is '최초 등록 일시';
comment on column GJUTIS.TB_AVI_CMRA.last_crpr_nmbr
  is '최종 수정자 번호';
comment on column GJUTIS.TB_AVI_CMRA.last_crct_dt
  is '최종 수정 일시';
alter table GJUTIS.TB_AVI_CMRA
  add constraint IX_AVI_CMRA_PK primary key (AVI_CTLR_MNGM_NMBR, AVI_CMRA_ID)
  using index 
  tablespace ITS_HIST_DATA
  pctfree 10
  initrans 2
  maxtrans 255;
alter table GJUTIS.TB_AVI_CMRA
  add constraint FK_AVI_CMRA__AVI_CTLR_MNGM_NMB foreign key (AVI_CTLR_MNGM_NMBR)
  references GJUTIS.TB_AVI_CTLR (AVI_CTLR_MNGM_NMBR)
  disable;

prompt
prompt Creating table TB_AVI_CMRA_LANE
prompt ===============================
prompt
create table GJUTIS.TB_AVI_CMRA_LANE
(
  avi_ctlr_mngm_nmbr VARCHAR2(20) not null,
  avi_cmra_id        VARCHAR2(20) not null,
  lane_nmbr          NUMBER(2) not null,
  fan_val            NUMBER(4),
  tilt_val           NUMBER(4),
  zoom_val           NUMBER(4),
  focs_val           NUMBER(4),
  pcpn_lane_yn       CHAR(1) default 'N',
  frst_regr_nmbr     VARCHAR2(20),
  frst_rgst_dt       VARCHAR2(14),
  last_crpr_nmbr     VARCHAR2(20),
  last_crct_dt       VARCHAR2(14)
)
tablespace ITS_HIST_DATA
  pctfree 10
  initrans 1
  maxtrans 255
nologging;
comment on table GJUTIS.TB_AVI_CMRA_LANE
  is 'AVI 카메라 차로';
comment on column GJUTIS.TB_AVI_CMRA_LANE.avi_ctlr_mngm_nmbr
  is 'AVI 제어기 관리 번호';
comment on column GJUTIS.TB_AVI_CMRA_LANE.avi_cmra_id
  is 'AVI 카메라 아이디';
comment on column GJUTIS.TB_AVI_CMRA_LANE.lane_nmbr
  is '차로 번호';
comment on column GJUTIS.TB_AVI_CMRA_LANE.fan_val
  is '팬 값';
comment on column GJUTIS.TB_AVI_CMRA_LANE.tilt_val
  is '틸트 값';
comment on column GJUTIS.TB_AVI_CMRA_LANE.zoom_val
  is '줌 값';
comment on column GJUTIS.TB_AVI_CMRA_LANE.focs_val
  is '초점 값';
comment on column GJUTIS.TB_AVI_CMRA_LANE.pcpn_lane_yn
  is '감지 차로 여부';
comment on column GJUTIS.TB_AVI_CMRA_LANE.frst_regr_nmbr
  is '최초 등록자 번호';
comment on column GJUTIS.TB_AVI_CMRA_LANE.frst_rgst_dt
  is '최초 등록 일시';
comment on column GJUTIS.TB_AVI_CMRA_LANE.last_crpr_nmbr
  is '최종 수정자 번호';
comment on column GJUTIS.TB_AVI_CMRA_LANE.last_crct_dt
  is '최종 수정 일시';
alter table GJUTIS.TB_AVI_CMRA_LANE
  add constraint IX_AVI_CMRA_LANE_PK primary key (AVI_CTLR_MNGM_NMBR, AVI_CMRA_ID, LANE_NMBR)
  using index 
  tablespace ITS_HIST_DATA
  pctfree 10
  initrans 2
  maxtrans 255;
alter table GJUTIS.TB_AVI_CMRA_LANE
  add constraint FK_AVI_CMRA_LANE__AVI_CTLR_MNG foreign key (AVI_CTLR_MNGM_NMBR, AVI_CMRA_ID)
  references GJUTIS.TB_AVI_CMRA (AVI_CTLR_MNGM_NMBR, AVI_CMRA_ID)
  disable;

prompt
prompt Creating table TB_AVI_CTLR_IDNT
prompt ===============================
prompt
create table GJUTIS.TB_AVI_CTLR_IDNT
(
  avi_ctlr_mngm_nmbr VARCHAR2(20) not null,
  avi_dtct_nmbr      VARCHAR2(2) not null,
  crtn_dt            VARCHAR2(14) not null,
  crtn_ymd           VARCHAR2(8) not null,
  crtn_hms           VARCHAR2(6) not null,
  tot_data_num       NUMBER(6) default 0,
  idnt_data_num      NUMBER(6) default 0,
  nidn_data_num      NUMBER(6) default 0,
  idnt_rate          NUMBER(3)
)
tablespace ITS_HIST_DATA
  pctfree 10
  initrans 1
  maxtrans 255
nologging;
comment on table GJUTIS.TB_AVI_CTLR_IDNT
  is 'AVI 제어기 인식';
comment on column GJUTIS.TB_AVI_CTLR_IDNT.avi_ctlr_mngm_nmbr
  is 'AVI 제어기 관리 번호';
comment on column GJUTIS.TB_AVI_CTLR_IDNT.avi_dtct_nmbr
  is 'AVI 검지기 번호';
comment on column GJUTIS.TB_AVI_CTLR_IDNT.crtn_dt
  is '생성 일시';
comment on column GJUTIS.TB_AVI_CTLR_IDNT.crtn_ymd
  is '생성 일자';
comment on column GJUTIS.TB_AVI_CTLR_IDNT.crtn_hms
  is '생성 시각';
comment on column GJUTIS.TB_AVI_CTLR_IDNT.tot_data_num
  is '총 데이터 개수';
comment on column GJUTIS.TB_AVI_CTLR_IDNT.idnt_data_num
  is '인식 데이터 개수';
comment on column GJUTIS.TB_AVI_CTLR_IDNT.nidn_data_num
  is '미인식 데이터 개수';
comment on column GJUTIS.TB_AVI_CTLR_IDNT.idnt_rate
  is '인식 율';
alter table GJUTIS.TB_AVI_CTLR_IDNT
  add constraint IX_AVI_CTLR_IDNT_PK primary key (AVI_CTLR_MNGM_NMBR, AVI_DTCT_NMBR, CRTN_DT)
  using index 
  tablespace ITS_HIST_DATA
  pctfree 10
  initrans 2
  maxtrans 255;
alter table GJUTIS.TB_AVI_CTLR_IDNT
  add constraint FK_AVI_CTLR_IDNT__AVI_CTLR_MNG foreign key (AVI_CTLR_MNGM_NMBR)
  references GJUTIS.TB_AVI_CTLR (AVI_CTLR_MNGM_NMBR)
  disable;

prompt
prompt Creating table TB_AVI_CTLR_STTS
prompt ===============================
prompt
create table GJUTIS.TB_AVI_CTLR_STTS
(
  avi_ctlr_mngm_nmbr VARCHAR2(20) not null,
  cmnc_stts_cd       VARCHAR2(7),
  cbox_door_stts_cd  VARCHAR2(7),
  fan_stts_cd        VARCHAR2(7),
  hetr_stts_cd       VARCHAR2(7),
  tmpr               NUMBER(6,3),
  cmra_mtns_stts_cd  VARCHAR2(7),
  volt_stts_cd       VARCHAR2(7),
  lamp_stts_cd       VARCHAR2(7),
  updt_dt            VARCHAR2(14)
)
tablespace ITS_HIST_DATA
  pctfree 10
  initrans 1
  maxtrans 255
nologging;
comment on table GJUTIS.TB_AVI_CTLR_STTS
  is 'AVI 제어기 상태';
comment on column GJUTIS.TB_AVI_CTLR_STTS.avi_ctlr_mngm_nmbr
  is 'AVI 제어기 관리 번호';
comment on column GJUTIS.TB_AVI_CTLR_STTS.cmnc_stts_cd
  is '통신 상태 코드';
comment on column GJUTIS.TB_AVI_CTLR_STTS.cbox_door_stts_cd
  is '함체 문 상태 코드';
comment on column GJUTIS.TB_AVI_CTLR_STTS.fan_stts_cd
  is '팬 상태 코드';
comment on column GJUTIS.TB_AVI_CTLR_STTS.hetr_stts_cd
  is '히터 상태 코드';
comment on column GJUTIS.TB_AVI_CTLR_STTS.tmpr
  is '온도';
comment on column GJUTIS.TB_AVI_CTLR_STTS.cmra_mtns_stts_cd
  is '카메라 동작 상태 코드';
comment on column GJUTIS.TB_AVI_CTLR_STTS.volt_stts_cd
  is '전압 상태 코드';
comment on column GJUTIS.TB_AVI_CTLR_STTS.lamp_stts_cd
  is '조명장치 상태 코드';
comment on column GJUTIS.TB_AVI_CTLR_STTS.updt_dt
  is '갱신 일시';
alter table GJUTIS.TB_AVI_CTLR_STTS
  add constraint IX_AVI_CTLR_STTS_PK primary key (AVI_CTLR_MNGM_NMBR)
  using index 
  tablespace ITS_HIST_DATA
  pctfree 10
  initrans 2
  maxtrans 255;
alter table GJUTIS.TB_AVI_CTLR_STTS
  add constraint FK_AVI_CTLR_STTS__AVI_CTLR_MNG foreign key (AVI_CTLR_MNGM_NMBR)
  references GJUTIS.TB_AVI_CTLR (AVI_CTLR_MNGM_NMBR)
  disable;

prompt
prompt Creating table TB_AVI_CTLR_STTS_HS
prompt ==================================
prompt
create table GJUTIS.TB_AVI_CTLR_STTS_HS
(
  avi_ctlr_mngm_nmbr VARCHAR2(20) not null,
  crtn_dt            VARCHAR2(14) not null,
  cmnc_stts_cd       VARCHAR2(7),
  cbox_door_stts_cd  VARCHAR2(7),
  fan_stts_cd        VARCHAR2(7),
  hetr_stts_cd       VARCHAR2(7),
  tmpr               NUMBER(6,3),
  cmra_mtns_stts_cd  VARCHAR2(7),
  volt_stts_cd       VARCHAR2(7),
  lamp_stts_cd       VARCHAR2(7)
)
tablespace ITS_HIST_DATA
  pctfree 10
  initrans 1
  maxtrans 255
nologging;
comment on table GJUTIS.TB_AVI_CTLR_STTS_HS
  is 'AVI 제어기 상태 이력';
comment on column GJUTIS.TB_AVI_CTLR_STTS_HS.avi_ctlr_mngm_nmbr
  is 'AVI 제어기 관리 번호';
comment on column GJUTIS.TB_AVI_CTLR_STTS_HS.crtn_dt
  is '생성 일시';
comment on column GJUTIS.TB_AVI_CTLR_STTS_HS.cmnc_stts_cd
  is '통신 상태 코드';
comment on column GJUTIS.TB_AVI_CTLR_STTS_HS.cbox_door_stts_cd
  is '함체 문 상태 코드';
comment on column GJUTIS.TB_AVI_CTLR_STTS_HS.fan_stts_cd
  is '팬 상태 코드';
comment on column GJUTIS.TB_AVI_CTLR_STTS_HS.hetr_stts_cd
  is '히터 상태 코드';
comment on column GJUTIS.TB_AVI_CTLR_STTS_HS.tmpr
  is '온도';
comment on column GJUTIS.TB_AVI_CTLR_STTS_HS.cmra_mtns_stts_cd
  is '카메라 동작 상태 코드';
comment on column GJUTIS.TB_AVI_CTLR_STTS_HS.volt_stts_cd
  is '전압 상태 코드';
comment on column GJUTIS.TB_AVI_CTLR_STTS_HS.lamp_stts_cd
  is '조명장치 상태 코드';
alter table GJUTIS.TB_AVI_CTLR_STTS_HS
  add constraint IX_AVI_CTLR_STTS_HS_PK primary key (AVI_CTLR_MNGM_NMBR, CRTN_DT)
  using index 
  tablespace ITS_HIST_DATA
  pctfree 10
  initrans 2
  maxtrans 255;
alter table GJUTIS.TB_AVI_CTLR_STTS_HS
  add constraint FK_AVI_CTLR_STTS_HS__AVI_CTLR_ foreign key (AVI_CTLR_MNGM_NMBR)
  references GJUTIS.TB_AVI_CTLR (AVI_CTLR_MNGM_NMBR)
  disable;

prompt
prompt Creating table TB_AVI_CTLR_TRFC
prompt ===============================
prompt
create table GJUTIS.TB_AVI_CTLR_TRFC
(
  avi_ctlr_mngm_nmbr VARCHAR2(20) not null,
  avi_dtct_chnl_nmbr VARCHAR2(2) not null,
  crtn_dt            VARCHAR2(14) not null,
  crtn_ymd           VARCHAR2(8) not null,
  crtn_hms           VARCHAR2(6) not null,
  tfvl               NUMBER(6) default 0,
  ocpy_rate          NUMBER(5,2) default 0,
  spot_sped          NUMBER(3) default 0
)
tablespace ITS_HIST_DATA
  pctfree 10
  initrans 1
  maxtrans 255
nologging;
comment on table GJUTIS.TB_AVI_CTLR_TRFC
  is 'AVI 제어기 교통';
comment on column GJUTIS.TB_AVI_CTLR_TRFC.avi_ctlr_mngm_nmbr
  is 'AVI 제어기 관리 번호';
comment on column GJUTIS.TB_AVI_CTLR_TRFC.avi_dtct_chnl_nmbr
  is 'AVI 검지기 채널 번호';
comment on column GJUTIS.TB_AVI_CTLR_TRFC.crtn_dt
  is '생성 일시';
comment on column GJUTIS.TB_AVI_CTLR_TRFC.crtn_ymd
  is '생성 일자';
comment on column GJUTIS.TB_AVI_CTLR_TRFC.crtn_hms
  is '생성 시각';
comment on column GJUTIS.TB_AVI_CTLR_TRFC.tfvl
  is '교통량';
comment on column GJUTIS.TB_AVI_CTLR_TRFC.ocpy_rate
  is '점유 율';
comment on column GJUTIS.TB_AVI_CTLR_TRFC.spot_sped
  is '지점 속도';
alter table GJUTIS.TB_AVI_CTLR_TRFC
  add constraint IX_AVI_CTLR_TRFC_PK primary key (AVI_CTLR_MNGM_NMBR, AVI_DTCT_CHNL_NMBR, CRTN_DT)
  using index 
  tablespace ITS_HIST_DATA
  pctfree 10
  initrans 2
  maxtrans 255;
alter table GJUTIS.TB_AVI_CTLR_TRFC
  add constraint FK_AVI_CTLR_TRFC__AVI_CTLR_MNG foreign key (AVI_CTLR_MNGM_NMBR)
  references GJUTIS.TB_AVI_CTLR (AVI_CTLR_MNGM_NMBR)
  disable;

prompt
prompt Creating table TB_AVI_DD_STAT
prompt =============================
prompt
create table GJUTIS.TB_AVI_DD_STAT
(
  avi_sect_nmbr VARCHAR2(10) not null,
  stat_dt       VARCHAR2(14) not null,
  stat_yy       VARCHAR2(4) not null,
  stat_mn       VARCHAR2(2) not null,
  stat_dd       VARCHAR2(2) not null,
  day_type_cd   VARCHAR2(7),
  tfvl          NUMBER(6) default 0,
  trvl_sped     NUMBER(3) default 0,
  data_num      NUMBER(3) default 0,
  mtch_rate     NUMBER(3)
)
tablespace ITS_HIST_DATA
  pctfree 10
  initrans 1
  maxtrans 255
nologging;
comment on table GJUTIS.TB_AVI_DD_STAT
  is 'AVI 일 통계';
comment on column GJUTIS.TB_AVI_DD_STAT.avi_sect_nmbr
  is 'AVI 구간 번호';
comment on column GJUTIS.TB_AVI_DD_STAT.stat_dt
  is '통계 일시';
comment on column GJUTIS.TB_AVI_DD_STAT.stat_yy
  is '통계 년';
comment on column GJUTIS.TB_AVI_DD_STAT.stat_mn
  is '통계 월';
comment on column GJUTIS.TB_AVI_DD_STAT.stat_dd
  is '통계 일';
comment on column GJUTIS.TB_AVI_DD_STAT.day_type_cd
  is '요일 유형 코드';
comment on column GJUTIS.TB_AVI_DD_STAT.tfvl
  is '교통량';
comment on column GJUTIS.TB_AVI_DD_STAT.trvl_sped
  is '통행 속도';
comment on column GJUTIS.TB_AVI_DD_STAT.data_num
  is '데이터 개수';
comment on column GJUTIS.TB_AVI_DD_STAT.mtch_rate
  is '매칭 율';
alter table GJUTIS.TB_AVI_DD_STAT
  add constraint IX_AVI_DD_STAT_PK primary key (AVI_SECT_NMBR, STAT_DT)
  using index 
  tablespace ITS_HIST_DATA
  pctfree 10
  initrans 2
  maxtrans 255;
alter table GJUTIS.TB_AVI_DD_STAT
  add constraint FK_AVI_DD_STAT__AVI_SECT_NMBR foreign key (AVI_SECT_NMBR)
  references GJUTIS.TB_AVI_SECT_MSTR (AVI_SECT_NMBR)
  disable;

prompt
prompt Creating table TB_AVI_HH_STAT
prompt =============================
prompt
create table GJUTIS.TB_AVI_HH_STAT
(
  avi_sect_nmbr VARCHAR2(10) not null,
  stat_dt       VARCHAR2(14) not null,
  stat_yy       VARCHAR2(4) not null,
  stat_mn       VARCHAR2(2) not null,
  stat_dd       VARCHAR2(2) not null,
  stat_hm       VARCHAR2(4) not null,
  day_type_cd   VARCHAR2(7),
  tfvl          NUMBER(6) default 0,
  trvl_sped     NUMBER(3) default 0,
  data_num      NUMBER(3) default 0,
  mtch_rate     NUMBER(3)
)
tablespace ITS_HIST_DATA
  pctfree 10
  initrans 1
  maxtrans 255
nologging;
comment on table GJUTIS.TB_AVI_HH_STAT
  is 'AVI 시간 통계';
comment on column GJUTIS.TB_AVI_HH_STAT.avi_sect_nmbr
  is 'AVI 구간 번호';
comment on column GJUTIS.TB_AVI_HH_STAT.stat_dt
  is '통계 일시';
comment on column GJUTIS.TB_AVI_HH_STAT.stat_yy
  is '통계 년';
comment on column GJUTIS.TB_AVI_HH_STAT.stat_mn
  is '통계 월';
comment on column GJUTIS.TB_AVI_HH_STAT.stat_dd
  is '통계 일';
comment on column GJUTIS.TB_AVI_HH_STAT.stat_hm
  is '통계 시분';
comment on column GJUTIS.TB_AVI_HH_STAT.day_type_cd
  is '요일 유형 코드';
comment on column GJUTIS.TB_AVI_HH_STAT.tfvl
  is '교통량';
comment on column GJUTIS.TB_AVI_HH_STAT.trvl_sped
  is '통행 속도';
comment on column GJUTIS.TB_AVI_HH_STAT.data_num
  is '데이터 개수';
comment on column GJUTIS.TB_AVI_HH_STAT.mtch_rate
  is '매칭 율';
alter table GJUTIS.TB_AVI_HH_STAT
  add constraint IX_AVI_HH_STAT_PK primary key (AVI_SECT_NMBR, STAT_DT)
  using index 
  tablespace ITS_HIST_DATA
  pctfree 10
  initrans 2
  maxtrans 255;
alter table GJUTIS.TB_AVI_HH_STAT
  add constraint FK_AVI_HH_STAT__AVI_SECT_NMBR foreign key (AVI_SECT_NMBR)
  references GJUTIS.TB_AVI_SECT_MSTR (AVI_SECT_NMBR)
  disable;

prompt
prompt Creating table TB_AVI_PASS_VHCL
prompt ===============================
prompt
create table GJUTIS.TB_AVI_PASS_VHCL
(
  avi_ctlr_mngm_nmbr VARCHAR2(20) not null,
  whol_vhcl_nmbr     VARCHAR2(15) not null,
  crtn_dt            VARCHAR2(14) not null,
  vhcl_nmbr          VARCHAR2(15),
  lane_nmbr          NUMBER(2),
  lane_drct          VARCHAR2(7),
  vhcl_kind_cd       VARCHAR2(7)
)
tablespace ITS_HIST_DATA
  pctfree 10
  initrans 1
  maxtrans 255
nologging;
comment on table GJUTIS.TB_AVI_PASS_VHCL
  is 'AVI 통과 차량';
comment on column GJUTIS.TB_AVI_PASS_VHCL.avi_ctlr_mngm_nmbr
  is 'AVI 제어기 관리 번호';
comment on column GJUTIS.TB_AVI_PASS_VHCL.whol_vhcl_nmbr
  is '전체 차량 번호';
comment on column GJUTIS.TB_AVI_PASS_VHCL.crtn_dt
  is '생성 일시';
comment on column GJUTIS.TB_AVI_PASS_VHCL.vhcl_nmbr
  is '차량 번호';
comment on column GJUTIS.TB_AVI_PASS_VHCL.lane_nmbr
  is '차로 번호';
comment on column GJUTIS.TB_AVI_PASS_VHCL.lane_drct
  is '차로 방향';
comment on column GJUTIS.TB_AVI_PASS_VHCL.vhcl_kind_cd
  is '차량 종류 코드';
alter table GJUTIS.TB_AVI_PASS_VHCL
  add constraint IX_AVI_PASS_VHCL_PK primary key (AVI_CTLR_MNGM_NMBR, WHOL_VHCL_NMBR, CRTN_DT)
  using index 
  tablespace ITS_HIST_DATA
  pctfree 10
  initrans 2
  maxtrans 255;
alter table GJUTIS.TB_AVI_PASS_VHCL
  add constraint FK_AVI_PASS_VHCL__AVI_CTLR_MNG foreign key (AVI_CTLR_MNGM_NMBR)
  references GJUTIS.TB_AVI_CTLR (AVI_CTLR_MNGM_NMBR)
  disable;

prompt
prompt Creating table TB_AVI_IMGN_DATA
prompt ===============================
prompt
create table GJUTIS.TB_AVI_IMGN_DATA
(
  avi_ctlr_mngm_nmbr VARCHAR2(20) not null,
  whol_vhcl_nmbr     VARCHAR2(15) not null,
  crtn_dt            VARCHAR2(14) not null,
  idnt_rslt_yn       CHAR(1) default 'N',
  data_size          NUMBER(14),
  stor_path          VARCHAR2(200),
  file_nm            VARCHAR2(100)
)
tablespace ITS_HIST_DATA
  pctfree 10
  initrans 1
  maxtrans 255
nologging;
comment on table GJUTIS.TB_AVI_IMGN_DATA
  is 'AVI 영상 데이터';
comment on column GJUTIS.TB_AVI_IMGN_DATA.avi_ctlr_mngm_nmbr
  is 'AVI 제어기 관리 번호';
comment on column GJUTIS.TB_AVI_IMGN_DATA.whol_vhcl_nmbr
  is '전체 차량 번호';
comment on column GJUTIS.TB_AVI_IMGN_DATA.crtn_dt
  is '생성 일시';
comment on column GJUTIS.TB_AVI_IMGN_DATA.idnt_rslt_yn
  is '인식 결과 여부';
comment on column GJUTIS.TB_AVI_IMGN_DATA.data_size
  is '데이터 크기';
comment on column GJUTIS.TB_AVI_IMGN_DATA.stor_path
  is '저장 경로';
comment on column GJUTIS.TB_AVI_IMGN_DATA.file_nm
  is '파일 명';
alter table GJUTIS.TB_AVI_IMGN_DATA
  add constraint IX_AVI_IMGN_DATA_PK primary key (AVI_CTLR_MNGM_NMBR, WHOL_VHCL_NMBR, CRTN_DT)
  using index 
  tablespace ITS_HIST_DATA
  pctfree 10
  initrans 2
  maxtrans 255;
alter table GJUTIS.TB_AVI_IMGN_DATA
  add constraint FK_AVI_IMGN_DATA__AVI_CTLR_MNG foreign key (AVI_CTLR_MNGM_NMBR, WHOL_VHCL_NMBR, CRTN_DT)
  references GJUTIS.TB_AVI_PASS_VHCL (AVI_CTLR_MNGM_NMBR, WHOL_VHCL_NMBR, CRTN_DT)
  disable;

prompt
prompt Creating table TB_AVI_LMP_MTNS_RECL
prompt ===================================
prompt
create table GJUTIS.TB_AVI_LMP_MTNS_RECL
(
  avi_ctlr_mngm_nmbr VARCHAR2(20) not null,
  avi_cmra_id        VARCHAR2(20) not null,
  lmp_nmbr           NUMBER(2),
  mtns_recl          NUMBER(9),
  rgst_dt            VARCHAR2(14)
)
tablespace ITS_HIST_DATA
  pctfree 10
  initrans 1
  maxtrans 255
nologging;
comment on table GJUTIS.TB_AVI_LMP_MTNS_RECL
  is 'AVI 램프 동작 회수';
comment on column GJUTIS.TB_AVI_LMP_MTNS_RECL.avi_ctlr_mngm_nmbr
  is 'AVI 제어기 관리 번호';
comment on column GJUTIS.TB_AVI_LMP_MTNS_RECL.avi_cmra_id
  is 'AVI 카메라 아이디';
comment on column GJUTIS.TB_AVI_LMP_MTNS_RECL.lmp_nmbr
  is '램프 번호';
comment on column GJUTIS.TB_AVI_LMP_MTNS_RECL.mtns_recl
  is '동작 회수';
comment on column GJUTIS.TB_AVI_LMP_MTNS_RECL.rgst_dt
  is '등록 일시';
alter table GJUTIS.TB_AVI_LMP_MTNS_RECL
  add constraint IX_AVI_LMP_MTNS_RECL_PK primary key (AVI_CTLR_MNGM_NMBR, AVI_CMRA_ID)
  using index 
  tablespace ITS_HIST_DATA
  pctfree 10
  initrans 2
  maxtrans 255;
alter table GJUTIS.TB_AVI_LMP_MTNS_RECL
  add constraint FK_AVI_LMP_MTNS_RECL__AVI_CTLR foreign key (AVI_CTLR_MNGM_NMBR, AVI_CMRA_ID)
  references GJUTIS.TB_AVI_CMRA (AVI_CTLR_MNGM_NMBR, AVI_CMRA_ID)
  disable;

prompt
prompt Creating table TB_AVI_MN_STAT
prompt =============================
prompt
create table GJUTIS.TB_AVI_MN_STAT
(
  avi_sect_nmbr VARCHAR2(10) not null,
  stat_dt       VARCHAR2(14) not null,
  stat_yy       VARCHAR2(4) not null,
  stat_mn       VARCHAR2(2) not null,
  tfvl          NUMBER(6) default 0,
  trvl_sped     NUMBER(3) default 0,
  data_num      NUMBER(3) default 0,
  mtch_rate     NUMBER(3)
)
tablespace ITS_HIST_DATA
  pctfree 10
  initrans 1
  maxtrans 255
nologging;
comment on table GJUTIS.TB_AVI_MN_STAT
  is 'AVI 월 통계';
comment on column GJUTIS.TB_AVI_MN_STAT.avi_sect_nmbr
  is 'AVI 구간 번호';
comment on column GJUTIS.TB_AVI_MN_STAT.stat_dt
  is '통계 일시';
comment on column GJUTIS.TB_AVI_MN_STAT.stat_yy
  is '통계 년';
comment on column GJUTIS.TB_AVI_MN_STAT.stat_mn
  is '통계 월';
comment on column GJUTIS.TB_AVI_MN_STAT.tfvl
  is '교통량';
comment on column GJUTIS.TB_AVI_MN_STAT.trvl_sped
  is '통행 속도';
comment on column GJUTIS.TB_AVI_MN_STAT.data_num
  is '데이터 개수';
comment on column GJUTIS.TB_AVI_MN_STAT.mtch_rate
  is '매칭 율';
alter table GJUTIS.TB_AVI_MN_STAT
  add constraint IX_AVI_MN_STAT_PK primary key (AVI_SECT_NMBR, STAT_DT)
  using index 
  tablespace ITS_HIST_DATA
  pctfree 10
  initrans 2
  maxtrans 255;
alter table GJUTIS.TB_AVI_MN_STAT
  add constraint FK_AVI_MN_STAT__AVI_SECT_NMBR foreign key (AVI_SECT_NMBR)
  references GJUTIS.TB_AVI_SECT_MSTR (AVI_SECT_NMBR)
  disable;

prompt
prompt Creating table TB_AVI_SECT_CNFG
prompt ===============================
prompt
create table GJUTIS.TB_AVI_SECT_CNFG
(
  avi_ctlr_mngm_nmbr VARCHAR2(20) not null,
  avi_sect_nmbr      VARCHAR2(10) not null,
  ord                NUMBER(3) default 0,
  frst_regr_nmbr     VARCHAR2(20),
  frst_rgst_dt       VARCHAR2(14),
  last_crpr_nmbr     VARCHAR2(20),
  last_crct_dt       VARCHAR2(14)
)
tablespace ITS_HIST_DATA
  pctfree 10
  initrans 1
  maxtrans 255
nologging;
comment on table GJUTIS.TB_AVI_SECT_CNFG
  is 'AVI 구간 구성';
comment on column GJUTIS.TB_AVI_SECT_CNFG.avi_ctlr_mngm_nmbr
  is 'AVI 제어기 관리 번호';
comment on column GJUTIS.TB_AVI_SECT_CNFG.avi_sect_nmbr
  is 'AVI 구간 번호';
comment on column GJUTIS.TB_AVI_SECT_CNFG.ord
  is '순서';
comment on column GJUTIS.TB_AVI_SECT_CNFG.frst_regr_nmbr
  is '최초 등록자 번호';
comment on column GJUTIS.TB_AVI_SECT_CNFG.frst_rgst_dt
  is '최초 등록 일시';
comment on column GJUTIS.TB_AVI_SECT_CNFG.last_crpr_nmbr
  is '최종 수정자 번호';
comment on column GJUTIS.TB_AVI_SECT_CNFG.last_crct_dt
  is '최종 수정 일시';
alter table GJUTIS.TB_AVI_SECT_CNFG
  add constraint IX_AVI_SECT_CNFG_PK primary key (AVI_CTLR_MNGM_NMBR, AVI_SECT_NMBR)
  using index 
  tablespace ITS_HIST_DATA
  pctfree 10
  initrans 2
  maxtrans 255;
alter table GJUTIS.TB_AVI_SECT_CNFG
  add constraint FK_AVI_SECT_CNFG_02 foreign key (AVI_SECT_NMBR)
  references GJUTIS.TB_AVI_SECT_MSTR (AVI_SECT_NMBR)
  disable;
alter table GJUTIS.TB_AVI_SECT_CNFG
  add constraint FK_AVI_SECT_CNFG__AVI_CTLR_MNG foreign key (AVI_CTLR_MNGM_NMBR)
  references GJUTIS.TB_AVI_CTLR (AVI_CTLR_MNGM_NMBR)
  disable;

prompt
prompt Creating table TB_AVI_SECT_LINK
prompt ===============================
prompt
create table GJUTIS.TB_AVI_SECT_LINK
(
  avi_sect_nmbr VARCHAR2(10) not null,
  link_id       NUMBER(10) not null,
  ord           NUMBER(3) default 0
)
tablespace ITS_HIST_DATA
  pctfree 10
  initrans 1
  maxtrans 255
nologging;
comment on table GJUTIS.TB_AVI_SECT_LINK
  is 'AVI 구간_링크';
comment on column GJUTIS.TB_AVI_SECT_LINK.avi_sect_nmbr
  is 'AVI 구간 번호';
comment on column GJUTIS.TB_AVI_SECT_LINK.link_id
  is '링크 ID';
comment on column GJUTIS.TB_AVI_SECT_LINK.ord
  is '순서';
alter table GJUTIS.TB_AVI_SECT_LINK
  add constraint IX_AVI_SECT_LINK_PK primary key (AVI_SECT_NMBR, LINK_ID)
  using index 
  tablespace ITS_HIST_DATA
  pctfree 10
  initrans 2
  maxtrans 255;
alter table GJUTIS.TB_AVI_SECT_LINK
  add constraint FK_AVI_SECT_LINK__AVI_SECT_NMB foreign key (AVI_SECT_NMBR)
  references GJUTIS.TB_AVI_SECT_MSTR (AVI_SECT_NMBR)
  disable;

prompt
prompt Creating table TB_AVI_SECT_MTCH
prompt ===============================
prompt
create table GJUTIS.TB_AVI_SECT_MTCH
(
  avi_sect_nmbr VARCHAR2(10) not null,
  crtn_dt       VARCHAR2(14) not null,
  strt_spot_cnt NUMBER(6) default 0,
  end_spot_cnt  NUMBER(6) default 0,
  tot_mtch_cnt  NUMBER(6) default 0,
  mtch_rate     NUMBER(3)
)
tablespace ITS_HIST_DATA
  pctfree 10
  initrans 1
  maxtrans 255
nologging;
comment on table GJUTIS.TB_AVI_SECT_MTCH
  is 'AVI 구간 매칭';
comment on column GJUTIS.TB_AVI_SECT_MTCH.avi_sect_nmbr
  is 'AVI 구간 번호';
comment on column GJUTIS.TB_AVI_SECT_MTCH.crtn_dt
  is '생성 일시';
comment on column GJUTIS.TB_AVI_SECT_MTCH.strt_spot_cnt
  is '시작 지점 건수';
comment on column GJUTIS.TB_AVI_SECT_MTCH.end_spot_cnt
  is '종료 지점 건수';
comment on column GJUTIS.TB_AVI_SECT_MTCH.tot_mtch_cnt
  is '총 매칭 건수';
comment on column GJUTIS.TB_AVI_SECT_MTCH.mtch_rate
  is '매칭 율';
alter table GJUTIS.TB_AVI_SECT_MTCH
  add constraint IX_AVI_SECT_MTCH_PK primary key (AVI_SECT_NMBR, CRTN_DT)
  using index 
  tablespace ITS_HIST_DATA
  pctfree 10
  initrans 2
  maxtrans 255;
alter table GJUTIS.TB_AVI_SECT_MTCH
  add constraint FK_AVI_SECT_MTCH__AVI_SECT_NMB foreign key (AVI_SECT_NMBR)
  references GJUTIS.TB_AVI_SECT_MSTR (AVI_SECT_NMBR)
  disable;

prompt
prompt Creating table TB_AVI_SECT_RAW
prompt ==============================
prompt
create table GJUTIS.TB_AVI_SECT_RAW
(
  avi_sect_nmbr    VARCHAR2(10) not null,
  crtn_dt          VARCHAR2(14) not null,
  crtn_ord         NUMBER(6) default 0 not null,
  vhcl_nmbr        VARCHAR2(15),
  trvl_hh          NUMBER(6) default 0,
  strt_avi_pass_dt VARCHAR2(14),
  end_avi_pass_dt  VARCHAR2(14),
  trvl_sped        NUMBER(3) default 0,
  vhcl_kind_cd     VARCHAR2(7)
)
tablespace ITS_HIST_DATA
  pctfree 10
  initrans 1
  maxtrans 255
nologging;
comment on table GJUTIS.TB_AVI_SECT_RAW
  is 'AVI 구간 원시';
comment on column GJUTIS.TB_AVI_SECT_RAW.avi_sect_nmbr
  is 'AVI 구간 번호';
comment on column GJUTIS.TB_AVI_SECT_RAW.crtn_dt
  is '생성 일시';
comment on column GJUTIS.TB_AVI_SECT_RAW.crtn_ord
  is '생성 순서';
comment on column GJUTIS.TB_AVI_SECT_RAW.vhcl_nmbr
  is '차량 번호';
comment on column GJUTIS.TB_AVI_SECT_RAW.trvl_hh
  is '통행 시간';
comment on column GJUTIS.TB_AVI_SECT_RAW.strt_avi_pass_dt
  is '시작 AVI 통과 일시';
comment on column GJUTIS.TB_AVI_SECT_RAW.end_avi_pass_dt
  is '종료 AVI 통과 일시';
comment on column GJUTIS.TB_AVI_SECT_RAW.trvl_sped
  is '통행 속도';
comment on column GJUTIS.TB_AVI_SECT_RAW.vhcl_kind_cd
  is '차량 종류 코드';
alter table GJUTIS.TB_AVI_SECT_RAW
  add constraint IX_AVI_SECT_RAW_PK primary key (AVI_SECT_NMBR, CRTN_DT, CRTN_ORD)
  using index 
  tablespace ITS_HIST_DATA
  pctfree 10
  initrans 2
  maxtrans 255;
alter table GJUTIS.TB_AVI_SECT_RAW
  add constraint FK_AVI_SECT_RAW__AVI_SECT_NMBR foreign key (AVI_SECT_NMBR)
  references GJUTIS.TB_AVI_SECT_MSTR (AVI_SECT_NMBR)
  disable;

prompt
prompt Creating table TB_AVI_SECT_TRAF
prompt ===============================
prompt
create table GJUTIS.TB_AVI_SECT_TRAF
(
  avi_sect_nmbr VARCHAR2(10) not null,
  crtn_dt       VARCHAR2(14) not null,
  tfvl          NUMBER(6) default 0,
  trvl_sped     NUMBER(3) default 0,
  data_num      NUMBER(3) default 0,
  mtch_rate     NUMBER(3)
)
tablespace ITS_HIST_DATA
  pctfree 10
  initrans 1
  maxtrans 255
nologging;
comment on table GJUTIS.TB_AVI_SECT_TRAF
  is 'AVI 구간 소통상황';
comment on column GJUTIS.TB_AVI_SECT_TRAF.avi_sect_nmbr
  is 'AVI 구간 번호';
comment on column GJUTIS.TB_AVI_SECT_TRAF.crtn_dt
  is '생성 일시';
comment on column GJUTIS.TB_AVI_SECT_TRAF.tfvl
  is '교통량';
comment on column GJUTIS.TB_AVI_SECT_TRAF.trvl_sped
  is '통행 속도';
comment on column GJUTIS.TB_AVI_SECT_TRAF.data_num
  is '데이터 개수';
comment on column GJUTIS.TB_AVI_SECT_TRAF.mtch_rate
  is '매칭 율';
alter table GJUTIS.TB_AVI_SECT_TRAF
  add constraint IX_AVI_SECT_TRAF_PK primary key (AVI_SECT_NMBR, CRTN_DT)
  using index 
  tablespace ITS_HIST_DATA
  pctfree 10
  initrans 2
  maxtrans 255;
alter table GJUTIS.TB_AVI_SECT_TRAF
  add constraint FK_AVI_SECT_TRAF__AVI_SECT_NMB foreign key (AVI_SECT_NMBR)
  references GJUTIS.TB_AVI_SECT_MSTR (AVI_SECT_NMBR)
  disable;


spool off
