PROMPT Creating table HEL_FIDS_FLIGHT_INFO

create table hel_fids_flight_info (
   id                            number not null,
   timestamp                     date,
   airline_code                  char(3) NOT NULL,
   flight_no                     char(4) NOT NULL,
   flight_date                   varchar2(8)  NOT NULL,
   op_suffix                     char(1),
   departure                     char(3),
   arrival                       char(3),
   dept_overnight_ind            char(1),
   departure_time                char(4),
   arr_overnight_ind             char(1),
   arrival_time                  char(4),
   serv_type_code                char(1),
   aircraft_type_code            char(3),
   aircraft_reg                  varchar2(10),
   first_delay                   char(2),
   second_delay                  char(2),
   first_delay_time              char(4),
   second_delay_time             char(4),
   no_of_pax                     char(3),
   text_dep_ind                  char(1),
   sched_dept_date               char(6),
   off_block_time                char(4),
   stand                         char(3),
   gate1                         char(3),
   gate2                         char(3),
   actual_dept_date              char(6),
   actual_dept_time              char(4),
   sched_arr_date                char(6),
   takeoff_overnight_ind         char(1),
   takeoff_time                  char(4),
   off_block_overnight_ind       char(1),
   arrival_departure             char(1),
   last_message_type             char(3),
   row_create_time               date,
   row_date_time                 date,
   cuser                         varchar2(30),
   muser                         varchar2(30),
   mterm                         varchar2(64),
   source                        varchar2(8),
   to_be_archived                varchar2(1),
   appn_row_id                   number(18) not null,
   system_id                     number(4) default 0 not null
);

alter table hel_fids_flight_info add ( constraint hel_fids_flight_info_pk primary key (appn_row_id) using index tablespace &1._indexes);

alter table hel_fids_flight_info add ( constraint hel_fids_flight_info_uk1 unique (id) using index tablespace &1._indexes );

COMMENT ON TABLE HEL_FIDS_FLIGHT_INFO IS 'This table contains flight information supplied by the MACH FIDS implementation for the Helsinki project';

COMMENT ON COLUMN HEL_FIDS_FLIGHT_INFO.ACTUAL_DEPT_DATE IS  'Actual date of departure';
COMMENT ON COLUMN HEL_FIDS_FLIGHT_INFO.ACTUAL_DEPT_TIME IS  'Actaul time of departure';
COMMENT ON COLUMN HEL_FIDS_FLIGHT_INFO.AIRCRAFT_REG IS  'Aircaft registration';
COMMENT ON COLUMN HEL_FIDS_FLIGHT_INFO.AIRCRAFT_TYPE_CODE IS  'Aircraft type';
COMMENT ON COLUMN HEL_FIDS_FLIGHT_INFO.AIRLINE_CODE IS  'Carrier';
COMMENT ON COLUMN HEL_FIDS_FLIGHT_INFO.ARRIVAL IS  'Indicates an arrival';
COMMENT ON COLUMN HEL_FIDS_FLIGHT_INFO.ARRIVAL_DEPARTURE IS  'Indicates arrival or departure';
COMMENT ON COLUMN HEL_FIDS_FLIGHT_INFO.ARRIVAL_TIME IS  'Arrival time';
COMMENT ON COLUMN HEL_FIDS_FLIGHT_INFO.ARR_OVERNIGHT_IND IS  'Indicates an overnight arrival';
COMMENT ON COLUMN HEL_FIDS_FLIGHT_INFO.DEPARTURE IS  'Indicates a departure';
COMMENT ON COLUMN HEL_FIDS_FLIGHT_INFO.DEPARTURE_TIME IS  'Departure time';
COMMENT ON COLUMN HEL_FIDS_FLIGHT_INFO.DEPT_OVERNIGHT_IND IS  'Indicates overnight departure';
COMMENT ON COLUMN HEL_FIDS_FLIGHT_INFO.FIRST_DELAY IS  'First delay reason';
COMMENT ON COLUMN HEL_FIDS_FLIGHT_INFO.FIRST_DELAY_TIME IS  'First delay time';
COMMENT ON COLUMN HEL_FIDS_FLIGHT_INFO.FLIGHT_DATE IS  'Flight date';
COMMENT ON COLUMN HEL_FIDS_FLIGHT_INFO.FLIGHT_NO IS  'Flight number';
COMMENT ON COLUMN HEL_FIDS_FLIGHT_INFO.GATE1 IS  'First gate';
COMMENT ON COLUMN HEL_FIDS_FLIGHT_INFO.GATE2 IS  'Second gate';
COMMENT ON COLUMN HEL_FIDS_FLIGHT_INFO.ID IS  'Unique identifier';
COMMENT ON COLUMN HEL_FIDS_FLIGHT_INFO.LAST_MESSAGE_TYPE IS  'Type of the last message';
COMMENT ON COLUMN HEL_FIDS_FLIGHT_INFO.NO_OF_PAX IS  'Number of passengers';
COMMENT ON COLUMN HEL_FIDS_FLIGHT_INFO.OFF_BLOCK_OVERNIGHT_IND IS  'Indicates off blocks overnight';
COMMENT ON COLUMN HEL_FIDS_FLIGHT_INFO.OFF_BLOCK_TIME IS  'Off blocks time';
COMMENT ON COLUMN HEL_FIDS_FLIGHT_INFO.OP_SUFFIX IS  'Flight suffix';
COMMENT ON COLUMN HEL_FIDS_FLIGHT_INFO.SCHED_ARR_DATE IS  'Scheduled date of arrival';
COMMENT ON COLUMN HEL_FIDS_FLIGHT_INFO.SCHED_DEPT_DATE IS  'Scheduled date of departure';
COMMENT ON COLUMN HEL_FIDS_FLIGHT_INFO.SECOND_DELAY IS  'Second delay reason';
COMMENT ON COLUMN HEL_FIDS_FLIGHT_INFO.SECOND_DELAY_TIME IS  'Second delay time';
COMMENT ON COLUMN HEL_FIDS_FLIGHT_INFO.SERV_TYPE_CODE IS  'Server type';
COMMENT ON COLUMN HEL_FIDS_FLIGHT_INFO.STAND IS  'Stand number';
COMMENT ON COLUMN HEL_FIDS_FLIGHT_INFO.TAKEOFF_OVERNIGHT_IND IS  'Indicates overnight takeoff';
COMMENT ON COLUMN HEL_FIDS_FLIGHT_INFO.TAKEOFF_TIME IS  'Take off time';
COMMENT ON COLUMN HEL_FIDS_FLIGHT_INFO.TEXT_DEP_IND IS  'Text departure indicator';
COMMENT ON COLUMN HEL_FIDS_FLIGHT_INFO.TIMESTAMP IS  'Time the row was created';
COMMENT ON COLUMN HEL_FIDS_FLIGHT_INFO.APPN_ROW_ID IS 'Unique sequence number for this row';
COMMENT ON COLUMN HEL_FIDS_FLIGHT_INFO.ROW_CREATE_TIME IS 'The time the row was created';
COMMENT ON COLUMN HEL_FIDS_FLIGHT_INFO.ROW_DATE_TIME IS 'The time the row was last modified';
COMMENT ON COLUMN HEL_FIDS_FLIGHT_INFO.CUSER IS 'The user who created the row';
COMMENT ON COLUMN HEL_FIDS_FLIGHT_INFO.MUSER IS 'The user who last modified the row';
COMMENT ON COLUMN HEL_FIDS_FLIGHT_INFO.MTERM IS 'The terminal from which the last modifcation to this row was made';
COMMENT ON COLUMN HEL_FIDS_FLIGHT_INFO.SYSTEM_ID IS 'The system identifier';
COMMENT ON COLUMN HEL_FIDS_FLIGHT_INFO.SOURCE IS 'The process that last amended this row ';
COMMENT ON COLUMN HEL_FIDS_FLIGHT_INFO.TO_BE_ARCHIVED IS 'Indicates that this row is to be archived or has been archived';
