erd

Tables (13)

code_cause_group

  • code — character varying(20) — NOT NULL
  • label — character varying(30) — NOT NULL

code_cause_secondary

  • cause_type_code — character varying(50) — Primary key — NOT NULL
  • code — character varying(60) — Primary key — NOT NULL
  • label — character varying(60) — NOT NULL
  • sort_order — integer

code_event_category

  • code — character varying(30) — Primary key — NOT NULL
  • label — character varying(50) — NOT NULL
  • definition — text
  • legal_basis — text

code_event_subcategory

  • code — character varying(50) — Primary key — NOT NULL
  • category_code — character varying(30) — Foreign key → code_event_category.code — NOT NULL
  • label — character varying(60) — NOT NULL
  • description — text

code_line

  • code — character varying(50) — Primary key — NOT NULL
  • label — character varying(60) — NOT NULL

code_location_type

  • code — character varying(20) — Primary key — NOT NULL
  • label — character varying(30) — NOT NULL
  • definition — text
  • sublocation_example — text
  • legal_basis — text

code_operation_impact

  • code — character varying(20) — Primary key — NOT NULL
  • label — character varying(30) — NOT NULL
  • definition — text

code_railway_type

  • code — character varying(20) — Primary key — NOT NULL
  • label — character varying(50) — NOT NULL
  • description — text
  • speed_std — character varying(50)
  • example — text

code_signal_system

  • code — character varying(20) — Primary key — NOT NULL
  • label — character varying(30) — NOT NULL
  • definition — text
  • applicable_line — text

code_track_type

  • code — character varying(20) — Primary key — NOT NULL
  • label — character varying(30) — NOT NULL
  • definition — text

code_train_type

  • code — character varying(30) — Primary key — NOT NULL
  • label — character varying(40) — NOT NULL
  • definition — text
  • sub_types — text

collection_logs

  • id — uuid — Primary key — NOT NULL
  • session_id — text
  • agency — text
  • filename — text
  • file_size — bigint
  • file_type — text
  • status — text
  • error_msg — text
  • collected_at — timestamp with time zone
  • updated_at — timestamp with time zone
  • started_at — timestamp with time zone
  • completed_at — timestamp with time zone
  • schema_version — character varying(20)

railway_event

  • id — uuid — Primary key — NOT NULL
  • created_at — timestamp with time zone — NOT NULL
  • updated_at — timestamp with time zone — NOT NULL
  • occurred_date — date — NOT NULL — 발생일자 ★ — YYYY-MM-DD
  • occurred_time — time without time zone — NOT NULL — 발생시간 ★ — HH:MM (24시간제)
  • registering_org — character varying(100) — NOT NULL — 등록기관 ★ — 예) 한국철도공사(KORAIL)
  • railway_type — character varying(20) — Foreign key → code_railway_type.code — NOT NULL — 철도구분 ★ — code_railway_type 참조
  • line_name — character varying(100) — NOT NULL — '노선명 ★ — 예) 경부고속선 수도권1호선',
  • event_category — character varying(30) — Foreign key → code_event_category.code — NOT NULL — 이벤트 대분류 ★ — code_event_category 참조
  • event_subcategory — character varying(50) — NOT NULL — 이벤트 중분류 ★ — code_event_subcategory 참조 (직접입력 허용)
  • event_detail — character varying(200) — 이벤트 소분류 ○ — 피해/고장 대상 자유기입. 해당없음 → '해당없음'
  • cause_group — character varying(20) — Foreign key → code_cause_group.code — NOT NULL — 원인 그룹 ★ — 인적요인/기술적요인/외적요인
  • cause_main_type — character varying(50) — NOT NULL — 주원인 유형 ★ — code_cause_type 참조 (직접입력 허용)
  • cause_main_detail — text — 주원인 상세 ○ — 구체적 내용 자유기입. 확인불가 → '확인불가'
  • cause_secondary — character varying(50) — 부원인 ○ — 없으면 '해당없음'
  • cause_root — text — 근본원인 ○ — Why 분석 서술. 확인불가 → '확인불가'
  • operation_impact — character varying(20) — Foreign key → code_operation_impact.code — NOT NULL — 운행영향 유형 ★ — code_operation_impact 참조
  • is_delayed — character varying(10) — NOT NULL — 지연 여부 ★ — 지연/무지연
  • delay_total_min — integer — NOT NULL — 합계최소지연시간(분) ★ — 없으면 0
  • delay_total_max — integer — NOT NULL — 합계최대지연시간(분) ★ — 없으면 0
  • delay_highspeed_min — integer — NOT NULL — 고속최소지연시간(분) ★
  • delay_highspeed_max — integer — NOT NULL — 고속최대지연시간(분) ★
  • delay_general_min — integer — NOT NULL — 일반최소지연시간(분) ★
  • delay_general_max — integer — NOT NULL — 일반최대지연시간(분) ★
  • delay_urban_min — integer — NOT NULL — 도시최소지연시간(분) ★
  • delay_urban_max — integer — NOT NULL — 도시최대지연시간(분) ★
  • delay_special_min — integer — NOT NULL — 전용최소지연시간(분) ★
  • delay_special_max — integer — NOT NULL — 전용최대지연시간(분) ★
  • delay_other_min — integer — NOT NULL — 기타최소지연시간(분) ★
  • delay_other_max — integer — NOT NULL — 기타최대지연시간(분) ★
  • delayed_train_count — integer — 지연 열차수 ○ — 확인불가 → NULL
  • nonstop_train_count — integer — 무정차 통과 대수 ○ — 없으면 0
  • nonstop_duration_min — integer — 무정차 통과 시간(분) ○ — 없으면 0
  • death_count — integer — NOT NULL — 사망자수 ★ — 사고로 인해 30일 이내 사망. 없으면 0
  • severe_injury_count — integer — 중상자수 ○ — 없으면 0
  • minor_injury_count — integer — 경상자수 ○ — 없으면 0
  • delay_compensation_count — integer — 지연 배상자수 ○ — 없으면 0
  • total_affected_count — integer — 총 영향 인원 ○ — 확인불가 → NULL
  • casualty_compensation_million — numeric(12,2) — 사상자 보상액(백만원) ○ — 없으면 0. 단위 주의: 1억원 = 100
  • property_damage_million — numeric(12,2) — 재산 피해액(백만원) ○ — 없으면 0
  • other_damage_million — numeric(12,2) — 기타 피해액(백만원) ○ — 없으면 0
  • administrative_district — character varying(100) — 행정구역 ○ — 예) 충청남도 아산시. 확인불가 → '확인불가'
  • station_a — character varying(100) — NOT NULL — 발생역A ★ — 역명 또는 시작 구간명
  • station_b — character varying(100) — 발생역B ○ — 단일지점이면 station_a와 동일
  • location_type — character varying(20) — Foreign key → code_location_type.code — NOT NULL — 장소 대분류 ★ — code_location_type 참조
  • location_subtype — character varying(100) — 장소 중분류 ○ — 예) 역구내 본선승강장
  • location_detail — character varying(200) — 상세 위치 ○ — 예) 7호차 승강문 상부
  • train_type — character varying(30) — NOT NULL — 열차 종류 ★ — code_train_type 참조 (직접입력 허용)
  • train_number — character varying(50) — 열차번호 ○ — 예) 제409KTX열차. 해당없음 → '해당없음'
  • target_classification — character varying(30) — 대상 구분 ○ — 차량/시설/차량+시설/인적/기타
  • track_type — character varying(20) — Foreign key → code_track_type.code — 선로 유형 ○ — code_track_type 참조
  • signal_system — character varying(20) — 신호시스템 유형 ○ — code_signal_system 참조 (직접입력 허용)
  • defect_component — character varying(200) — NOT NULL — 결함·이상 부품명 ★ — 고장 없으면 '해당없음'
  • defect_symptom — text — NOT NULL — 발생 현상 ★ — 관찰된 증상 자유기입
  • action_taken — text — NOT NULL — 조치 내용 ★ — 긴급/일반 구분 서술
  • action_completed_at — timestamp without time zone — 조치 완료일시 ○ — YYYY-MM-DD HH:MM. 확인불가 → NULL
  • event_summary — text — NOT NULL — 이벤트 개요 ★ — 5W1H 기준 (일시·장소·경위·조치·운행영향 포함)
  • prevention_measures — text — 예방 대책 ○ — 재발방지 조치. 확인불가 → '확인불가'
  • data_source — character varying(500) — NOT NULL — 데이터 출처 ★ — 복수 출처 모두 기입. 예) 철도안전정보종합관리시스템
  • weather_temp — character varying(50)
  • … +4