/*****************************************************************************
*
* Filename         - $Workfile:   translator.sql  $
*
*                     Name              Date      Version     CR Number
* Author           - See revision history below.
* Last Update      - See revision history below.
*
* Project Name     - TAGTRAK(Oracle Database)
*
* Source Code
* Identifier       - 0/3/300/8010/112
*
* Design Spec
* Section          - 
*
* Contents         - Live Schema: translator table and associated items
*
* Language         - Oracle SQL*Plus script
*
* Classification   - Commercial In Confidence
*
*          (c) Ultra Electronics Limited, 1998
*
*****************************************************************************/
/****************************************************************************
* @(#)$Workfile:   translator.sql  $  $Revision:   1.0  $
*
* Revision History
*
* Note that user tagtrak is many users. For these users the user
* name is entered as the last line in the change description.
*
* $Log:   /shared/pvcs/tagtarch/air_france/database/db/source/live/translator.svl  $
 *
 *   Rev 1.0   12 Oct 1998 21:01:48   tagtrak
 *OR:
 *CR: 12779
 *REV:
 *Initial check in of Air France development.
 * 
*
****************************************************************************/

PROMPT Creating table TRANSLATOR

create table translator (
   TYPE                          char(10)  not null,
   DB_CODE                       char(3)  not null,
   LANGUAGE                      char(3)  not null,
   TEXT                          varchar2(100)  not null,
   CODE                          char(3)  not null,
   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 translator add ( constraint translator_pk primary key (appn_row_id) using index tablespace &1._indexes);

alter table translator add ( constraint translator_uk1 unique (TYPE,DB_CODE,LANGUAGE) using index tablespace &1._indexes);

COMMENT ON TABLE TRANSLATOR IS 'This table contains localisations of strings used principally in scanner reports';

COMMENT ON COLUMN TRANSLATOR.CODE IS  'Localised code';
COMMENT ON COLUMN TRANSLATOR.DB_CODE IS  'Identifier for this string';
COMMENT ON COLUMN TRANSLATOR.LANGUAGE IS  'Language of the string';
COMMENT ON COLUMN TRANSLATOR.TEXT IS  'The string in the language stated in the LANGUAGE column ';
COMMENT ON COLUMN TRANSLATOR.TYPE IS  'Area of the system this text is used in';
COMMENT ON COLUMN TRANSLATOR.APPN_ROW_ID IS 'Unique sequence number for this row';
COMMENT ON COLUMN TRANSLATOR.ROW_CREATE_TIME IS 'The time the row was created';
COMMENT ON COLUMN TRANSLATOR.ROW_DATE_TIME IS 'The time the row was last modified';
COMMENT ON COLUMN TRANSLATOR.CUSER IS 'The user who created the row';
COMMENT ON COLUMN TRANSLATOR.MUSER IS 'The user who last modified the row';
COMMENT ON COLUMN TRANSLATOR.MTERM IS 'The terminal from which the last modifcation to this row was made';
COMMENT ON COLUMN TRANSLATOR.SYSTEM_ID IS 'The system identifier';
COMMENT ON COLUMN TRANSLATOR.SOURCE IS 'The process that last amended this row ';
COMMENT ON COLUMN TRANSLATOR.TO_BE_ARCHIVED IS 'Indicates that this row is to be archived or has been archived';
