--
-- PDB Macromolecular Structure
-- SQL Definitions for creating tables
--     written: Tue Jul 29 17:48:51 PDT 2003
--
-- Copyright 2003
--     Douglas Greer, John Westbrook and Phil Bourne,
--     Research Collaboratory for Structural Bioinfomatics,
--     International Union of Crystallography
--


--
-- Setup commands specific for database type: MS_Access
--
-- <None>
--
-- End of database specific commands
--


--
-- SYSTEM TABLE: MMS_SYSTEM
--

CREATE TABLE MMS_SYSTEM(
    data_bank                      VARCHAR(32)    NOT NULL,
    version                        VARCHAR(32)    NOT NULL,
    model_id                       VARCHAR(32)    NOT NULL,
    revision_number                VARCHAR(32)    NOT NULL
) ;


--
-- SYSTEM TABLE: MMS_ENTRY
--

CREATE TABLE MMS_ENTRY(
    entry_key                      INTEGER        NOT NULL PRIMARY KEY,
    id                             VARCHAR(32)    NOT NULL,
    deposition_date                DATE           NOT NULL,
    db_load_date                   DATE           NOT NULL,
    load_status                    INTEGER        NOT NULL,
    presence_flags_module_0        VARBINARY(254),
    presence_flags_module_1        VARBINARY(254),
    presence_flags_module_2        VARBINARY(254),
    presence_flags_module_3        VARBINARY(254)
) ;

CREATE UNIQUE INDEX MMS_ENTRY_INDEX on MMS_ENTRY (id) ;


--
-- SYSTEM TABLE: MMS_CATEGORY
--

CREATE TABLE MMS_CATEGORY(
    category_key                   INTEGER        NOT NULL PRIMARY KEY,
    id                             VARCHAR(32)    NOT NULL,
    table_name                     VARCHAR(32)    NOT NULL,
    description                    LONGCHAR,
    mandatory                      CHAR(1)        NOT NULL,
    next_record                    INTEGER        NOT NULL
) ;

CREATE UNIQUE INDEX MMS_CATEGORY_INDEX on MMS_CATEGORY (id) ;


--
-- SYSTEM TABLE: MMS_ITEM
--

CREATE TABLE MMS_ITEM(
    item_key                       INTEGER        NOT NULL PRIMARY KEY,
    id                             VARCHAR(32)    NOT NULL,
    column_name                    VARCHAR(32)    NOT NULL,
    category_key                   INTEGER        NOT NULL,
    description                    LONGCHAR,
    mandatory                      CHAR(1)        NOT NULL
) ;

CREATE UNIQUE INDEX MMS_ITEM_INDEX on MMS_ITEM (category_key, id) ;


--
-- SYSTEM TABLE: MMS_ENTRY_CATEGORIES
--

CREATE TABLE MMS_ENTRY_CATEGORIES(
    entry_key                      INTEGER        NOT NULL,
    category_key                   INTEGER        NOT NULL,
    first_record                   INTEGER        NOT NULL,
    len                            INTEGER        NOT NULL
) ;

CREATE UNIQUE INDEX MMS_ENTRY_CATEGORIES_INDEX
    on MMS_ENTRY_CATEGORIES (entry_key , category_key ) ;


--
-- TABLE: ATOM_SITE
--

CREATE TABLE ATOM_SITE(
    atom_site_key                  INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    id                             VARCHAR(255),
    type_symbol_id                 VARCHAR(255),
    type_symbol_key                INTEGER,
    label_atom_id                  VARCHAR(255),
    label_atom_key                 INTEGER,
    label_seq_id                   VARCHAR(255),
    label_seq_key                  INTEGER,
    label_comp_id                  VARCHAR(255),
    label_comp_key                 INTEGER,
    label_asym_id                  VARCHAR(255),
    label_asym_key                 INTEGER,
    label_alt_id                   VARCHAR(255),
    label_alt_key                  INTEGER,
    label_entity_id                VARCHAR(255),
    label_entity_key               INTEGER,
    cartn_x                        FLOAT,
    cartn_y                        FLOAT,
    cartn_z                        FLOAT,
    occupancy                      FLOAT,
    b_iso_or_equiv                 FLOAT,
    model_num                      VARCHAR(255),
    attached_hydrogens             INTEGER,
    auth_asym_id                   VARCHAR(255),
    auth_atom_id                   VARCHAR(255),
    auth_comp_id                   VARCHAR(255),
    auth_seq_id                    VARCHAR(255),
    calc_attached_atom             VARCHAR(255),
    occupancy_esd                  FLOAT,
    pdbx_PDB_ins_code              VARCHAR(255)
) ;

CREATE INDEX ATOM_SITE_NDX
    on ATOM_SITE(entry_key) ;


--
-- TABLE: ATOM_SITE_ANISOTROP
--

CREATE TABLE ATOM_SITE_ANISOTROP(
    atom_site_anisotrop_key        INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    b_0_0                          FLOAT,
    b_0_1                          FLOAT,
    b_0_2                          FLOAT,
    b_1_1                          FLOAT,
    b_1_2                          FLOAT,
    b_2_2                          FLOAT,
    b_esd_0_0                      FLOAT,
    b_esd_0_1                      FLOAT,
    b_esd_0_2                      FLOAT,
    b_esd_1_1                      FLOAT,
    b_esd_1_2                      FLOAT,
    b_esd_2_2                      FLOAT,
    ratio                          FLOAT,
    id                             VARCHAR(255),
    id_key                         INTEGER,
    type_symbol_id                 VARCHAR(255),
    type_symbol_key                INTEGER,
    u_0_0                          FLOAT,
    u_0_1                          FLOAT,
    u_0_2                          FLOAT,
    u_1_1                          FLOAT,
    u_1_2                          FLOAT,
    u_2_2                          FLOAT,
    u_esd_0_0                      FLOAT,
    u_esd_0_1                      FLOAT,
    u_esd_0_2                      FLOAT,
    u_esd_1_1                      FLOAT,
    u_esd_1_2                      FLOAT,
    u_esd_2_2                      FLOAT,
    pdbx_auth_seq_id               VARCHAR(255),
    pdbx_auth_alt_id               VARCHAR(255),
    pdbx_auth_asym_id              VARCHAR(255),
    pdbx_auth_atom_id              VARCHAR(255),
    pdbx_auth_comp_id              VARCHAR(255),
    pdbx_label_seq_id              VARCHAR(255),
    pdbx_label_alt_id              VARCHAR(255),
    pdbx_label_asym_id             VARCHAR(255),
    pdbx_label_atom_id             VARCHAR(255),
    pdbx_label_comp_id             VARCHAR(255),
    pdbx_PDB_ins_code              VARCHAR(255)
) ;

CREATE INDEX ATOM_SITE_ANISOTROP_NDX
    on ATOM_SITE_ANISOTROP(entry_key) ;


--
-- TABLE: ATOM_TYPE
--

CREATE TABLE ATOM_TYPE(
    atom_type_key                  INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    analytical_mass_percent        FLOAT,
    description                    LONGCHAR,
    number_in_cell                 INTEGER,
    oxidation_number               INTEGER,
    radius_bond                    FLOAT,
    radius_contact                 FLOAT,
    scat_cromer_mann_a1            FLOAT,
    scat_cromer_mann_a2            FLOAT,
    scat_cromer_mann_a3            FLOAT,
    scat_cromer_mann_a4            FLOAT,
    scat_cromer_mann_b1            FLOAT,
    scat_cromer_mann_b2            FLOAT,
    scat_cromer_mann_b3            FLOAT,
    scat_cromer_mann_b4            FLOAT,
    scat_cromer_mann_c             FLOAT,
    scat_dispersion_imag           FLOAT,
    scat_dispersion_real           FLOAT,
    scat_length_neutron            LONGCHAR,
    scat_source                    LONGCHAR,
    scat_versus_stol_list          LONGCHAR,
    symbol                         VARCHAR(255)
) ;

CREATE INDEX ATOM_TYPE_NDX
    on ATOM_TYPE(entry_key) ;


--
-- TABLE: CHEM_COMP
--

CREATE TABLE CHEM_COMP(
    chem_comp_key                  INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    formula                        LONGCHAR,
    formula_weight                 FLOAT,
    id                             VARCHAR(255),
    model_details                  LONGCHAR,
    model_ext_reference_file       LONGCHAR,
    model_source                   LONGCHAR,
    mon_nstd_class                 LONGCHAR,
    mon_nstd_details               LONGCHAR,
    mon_nstd_flag                  VARCHAR(255),
    mon_nstd_parent                VARCHAR(255),
    mon_nstd_parent_comp_id        VARCHAR(255),
    mon_nstd_parent_comp_key       INTEGER,
    name                           LONGCHAR,
    number_atoms_all               INTEGER,
    number_atoms_nh                INTEGER,
    one_letter_code                CHAR(1),
    three_letter_code              CHAR(3),
    type                           LONGCHAR,
    pdbx_synonyms                  LONGCHAR,
    pdbx_modification_details      LONGCHAR,
    pdbx_component_no              INTEGER
) ;

CREATE INDEX CHEM_COMP_NDX
    on CHEM_COMP(entry_key) ;


--
-- TABLE: CHEM_COMP_ANGLE
--

CREATE TABLE CHEM_COMP_ANGLE(
    chem_comp_angle_key            INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    atom_1_id                      VARCHAR(255),
    atom_1_key                     INTEGER,
    atom_2_id                      VARCHAR(255),
    atom_2_key                     INTEGER,
    atom_3_id                      VARCHAR(255),
    atom_3_key                     INTEGER,
    comp_id                        VARCHAR(255),
    comp_key                       INTEGER,
    value_angle                    FLOAT,
    value_angle_esd                FLOAT,
    value_dist                     FLOAT,
    value_dist_esd                 FLOAT
) ;

CREATE INDEX CHEM_COMP_ANGLE_NDX
    on CHEM_COMP_ANGLE(entry_key) ;


--
-- TABLE: CHEM_COMP_ATOM
--

CREATE TABLE CHEM_COMP_ATOM(
    chem_comp_atom_key             INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    alt_atom_id                    LONGCHAR,
    atom_id                        VARCHAR(255),
    charge                         INTEGER,
    model_cartn_x                  FLOAT,
    model_cartn_y                  FLOAT,
    model_cartn_z                  FLOAT,
    model_cartn_esd_x              FLOAT,
    model_cartn_esd_y              FLOAT,
    model_cartn_esd_z              FLOAT,
    comp_id                        VARCHAR(255),
    comp_key                       INTEGER,
    partial_charge                 FLOAT,
    substruct_code                 VARCHAR(255),
    type_symbol_id                 VARCHAR(255),
    type_symbol_key                INTEGER
) ;

CREATE INDEX CHEM_COMP_ATOM_NDX
    on CHEM_COMP_ATOM(entry_key) ;


--
-- TABLE: CHEM_COMP_BOND
--

CREATE TABLE CHEM_COMP_BOND(
    chem_comp_bond_key             INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    atom_1_id                      VARCHAR(255),
    atom_1_key                     INTEGER,
    atom_2_id                      VARCHAR(255),
    atom_2_key                     INTEGER,
    comp_id                        VARCHAR(255),
    comp_key                       INTEGER,
    value_order                    VARCHAR(255),
    value_dist                     FLOAT,
    value_dist_esd                 FLOAT
) ;

CREATE INDEX CHEM_COMP_BOND_NDX
    on CHEM_COMP_BOND(entry_key) ;


--
-- TABLE: CHEM_COMP_CHIR
--

CREATE TABLE CHEM_COMP_CHIR(
    chem_comp_chir_key             INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    atom_id                        VARCHAR(255),
    atom_key                       INTEGER,
    atom_config                    VARCHAR(255),
    id                             VARCHAR(255),
    comp_id                        VARCHAR(255),
    comp_key                       INTEGER,
    number_atoms_all               INTEGER,
    number_atoms_nh                INTEGER,
    volume_flag                    VARCHAR(255),
    volume_three                   FLOAT,
    volume_three_esd               FLOAT
) ;

CREATE INDEX CHEM_COMP_CHIR_NDX
    on CHEM_COMP_CHIR(entry_key) ;


--
-- TABLE: CHEM_COMP_CHIR_ATOM
--

CREATE TABLE CHEM_COMP_CHIR_ATOM(
    chem_comp_chir_atom_key        INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    atom_id                        VARCHAR(255),
    atom_key                       INTEGER,
    chir_id                        VARCHAR(255),
    chir_key                       INTEGER,
    comp_id                        VARCHAR(255),
    comp_key                       INTEGER,
    dev                            FLOAT
) ;

CREATE INDEX CHEM_COMP_CHIR_ATOM_NDX
    on CHEM_COMP_CHIR_ATOM(entry_key) ;


--
-- TABLE: CHEM_COMP_LINK
--

CREATE TABLE CHEM_COMP_LINK(
    chem_comp_link_key             INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    link_id                        VARCHAR(255),
    link_key                       INTEGER,
    details                        LONGCHAR,
    type_comp_1_id                 VARCHAR(255),
    type_comp_1_key                INTEGER,
    type_comp_2_id                 VARCHAR(255),
    type_comp_2_key                INTEGER
) ;

CREATE INDEX CHEM_COMP_LINK_NDX
    on CHEM_COMP_LINK(entry_key) ;


--
-- TABLE: CHEM_COMP_PLANE
--

CREATE TABLE CHEM_COMP_PLANE(
    chem_comp_plane_key            INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    id                             VARCHAR(255),
    comp_id                        VARCHAR(255),
    comp_key                       INTEGER,
    number_atoms_all               INTEGER,
    number_atoms_nh                INTEGER
) ;

CREATE INDEX CHEM_COMP_PLANE_NDX
    on CHEM_COMP_PLANE(entry_key) ;


--
-- TABLE: CHEM_COMP_PLANE_ATOM
--

CREATE TABLE CHEM_COMP_PLANE_ATOM(
    chem_comp_plane_atom_key       INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    atom_id                        VARCHAR(255),
    atom_key                       INTEGER,
    comp_id                        VARCHAR(255),
    comp_key                       INTEGER,
    plane_id                       VARCHAR(255),
    plane_key                      INTEGER,
    dist_esd                       FLOAT
) ;

CREATE INDEX CHEM_COMP_PLANE_ATOM_NDX
    on CHEM_COMP_PLANE_ATOM(entry_key) ;


--
-- TABLE: CHEM_COMP_TOR
--

CREATE TABLE CHEM_COMP_TOR(
    chem_comp_tor_key              INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    atom_1_id                      VARCHAR(255),
    atom_1_key                     INTEGER,
    atom_2_id                      VARCHAR(255),
    atom_2_key                     INTEGER,
    atom_3_id                      VARCHAR(255),
    atom_3_key                     INTEGER,
    atom_4_id                      VARCHAR(255),
    atom_4_key                     INTEGER,
    id                             VARCHAR(255),
    comp_id                        VARCHAR(255),
    comp_key                       INTEGER
) ;

CREATE INDEX CHEM_COMP_TOR_NDX
    on CHEM_COMP_TOR(entry_key) ;


--
-- TABLE: CHEM_COMP_TOR_VALUE
--

CREATE TABLE CHEM_COMP_TOR_VALUE(
    chem_comp_tor_value_key        INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    comp_id                        VARCHAR(255),
    comp_key                       INTEGER,
    tor_id                         VARCHAR(255),
    tor_key                        INTEGER,
    angle                          FLOAT,
    angle_esd                      FLOAT,
    dist                           FLOAT,
    dist_esd                       FLOAT
) ;

CREATE INDEX CHEM_COMP_TOR_VALUE_NDX
    on CHEM_COMP_TOR_VALUE(entry_key) ;


--
-- TABLE: CHEM_LINK
--

CREATE TABLE CHEM_LINK(
    chem_link_key                  INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    id                             VARCHAR(255),
    details                        LONGCHAR
) ;

CREATE INDEX CHEM_LINK_NDX
    on CHEM_LINK(entry_key) ;


--
-- TABLE: CHEM_LINK_ANGLE
--

CREATE TABLE CHEM_LINK_ANGLE(
    chem_link_angle_key            INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    atom_1_comp_id                 VARCHAR(255),
    atom_2_comp_id                 VARCHAR(255),
    atom_3_comp_id                 VARCHAR(255),
    atom_id_1                      VARCHAR(255),
    atom_id_2                      VARCHAR(255),
    atom_id_3                      VARCHAR(255),
    link_id                        VARCHAR(255),
    link_key                       INTEGER,
    value_angle                    FLOAT,
    value_angle_esd                FLOAT,
    value_dist                     FLOAT,
    value_dist_esd                 FLOAT
) ;

CREATE INDEX CHEM_LINK_ANGLE_NDX
    on CHEM_LINK_ANGLE(entry_key) ;


--
-- TABLE: CHEM_LINK_BOND
--

CREATE TABLE CHEM_LINK_BOND(
    chem_link_bond_key             INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    atom_1_comp_id                 VARCHAR(255),
    atom_2_comp_id                 VARCHAR(255),
    atom_id_1                      VARCHAR(255),
    atom_id_2                      VARCHAR(255),
    link_id                        VARCHAR(255),
    link_key                       INTEGER,
    value_dist                     FLOAT,
    value_dist_esd                 FLOAT,
    value_order                    VARCHAR(255)
) ;

CREATE INDEX CHEM_LINK_BOND_NDX
    on CHEM_LINK_BOND(entry_key) ;


--
-- TABLE: CHEM_LINK_CHIR
--

CREATE TABLE CHEM_LINK_CHIR(
    chem_link_chir_key             INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    atom_comp_id                   VARCHAR(255),
    atom_id                        VARCHAR(255),
    atom_config                    VARCHAR(255),
    id                             VARCHAR(255),
    link_id                        VARCHAR(255),
    link_key                       INTEGER,
    number_atoms_all               INTEGER,
    number_atoms_nh                INTEGER,
    volume_flag                    VARCHAR(255),
    volume_three                   FLOAT,
    volume_three_esd               FLOAT
) ;

CREATE INDEX CHEM_LINK_CHIR_NDX
    on CHEM_LINK_CHIR(entry_key) ;


--
-- TABLE: CHEM_LINK_CHIR_ATOM
--

CREATE TABLE CHEM_LINK_CHIR_ATOM(
    chem_link_chir_atom_key        INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    atom_comp_id                   VARCHAR(255),
    atom_id                        VARCHAR(255),
    chir_id                        VARCHAR(255),
    chir_key                       INTEGER,
    dev                            FLOAT
) ;

CREATE INDEX CHEM_LINK_CHIR_ATOM_NDX
    on CHEM_LINK_CHIR_ATOM(entry_key) ;


--
-- TABLE: CHEM_LINK_PLANE
--

CREATE TABLE CHEM_LINK_PLANE(
    chem_link_plane_key            INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    id                             VARCHAR(255),
    link_id                        VARCHAR(255),
    link_key                       INTEGER,
    number_atoms_all               INTEGER,
    number_atoms_nh                INTEGER
) ;

CREATE INDEX CHEM_LINK_PLANE_NDX
    on CHEM_LINK_PLANE(entry_key) ;


--
-- TABLE: CHEM_LINK_PLANE_ATOM
--

CREATE TABLE CHEM_LINK_PLANE_ATOM(
    chem_link_plane_atom_key       INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    atom_comp_id                   VARCHAR(255),
    atom_id                        VARCHAR(255),
    plane_id                       VARCHAR(255),
    plane_key                      INTEGER
) ;

CREATE INDEX CHEM_LINK_PLANE_ATOM_NDX
    on CHEM_LINK_PLANE_ATOM(entry_key) ;


--
-- TABLE: CHEM_LINK_TOR
--

CREATE TABLE CHEM_LINK_TOR(
    chem_link_tor_key              INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    atom_1_comp_id                 VARCHAR(255),
    atom_2_comp_id                 VARCHAR(255),
    atom_3_comp_id                 VARCHAR(255),
    atom_4_comp_id                 VARCHAR(255),
    atom_id_1                      VARCHAR(255),
    atom_id_2                      VARCHAR(255),
    atom_id_3                      VARCHAR(255),
    atom_id_4                      VARCHAR(255),
    id                             VARCHAR(255),
    link_id                        VARCHAR(255),
    link_key                       INTEGER
) ;

CREATE INDEX CHEM_LINK_TOR_NDX
    on CHEM_LINK_TOR(entry_key) ;


--
-- TABLE: CHEM_LINK_TOR_VALUE
--

CREATE TABLE CHEM_LINK_TOR_VALUE(
    chem_link_tor_value_key        INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    tor_id                         VARCHAR(255),
    tor_key                        INTEGER,
    angle                          FLOAT,
    angle_esd                      FLOAT,
    dist                           FLOAT,
    dist_esd                       FLOAT
) ;

CREATE INDEX CHEM_LINK_TOR_VALUE_NDX
    on CHEM_LINK_TOR_VALUE(entry_key) ;


--
-- TABLE: ENTITY
--

CREATE TABLE ENTITY(
    entity_key                     INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    details                        LONGCHAR,
    formula_weight                 FLOAT,
    id                             VARCHAR(255),
    src_method                     VARCHAR(255),
    type                           VARCHAR(255),
    pdbx_description               LONGCHAR,
    pdbx_number_of_molecules       FLOAT,
    pdbx_parent_entity_id          VARCHAR(255),
    pdbx_mutation                  LONGCHAR,
    pdbx_fragment                  LONGCHAR,
    pdbx_ec                        LONGCHAR,
    pdbx_modification              LONGCHAR,
    pdbx_formula_weight_exptl      FLOAT,
    pdbx_formula_weight_exptl_meth LONGCHAR
) ;

CREATE INDEX ENTITY_NDX
    on ENTITY(entry_key) ;


--
-- TABLE: ENTITY_KEYWORDS
--

CREATE TABLE ENTITY_KEYWORDS(
    entity_keywords_key            INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    entity_id                      VARCHAR(255),
    entity_key                     INTEGER,
    text                           LONGCHAR,
    pdbx_mutation                  LONGCHAR,
    pdbx_fragment                  LONGCHAR,
    pdbx_ec                        LONGCHAR
) ;

CREATE INDEX ENTITY_KEYWORDS_NDX
    on ENTITY_KEYWORDS(entry_key) ;


--
-- TABLE: ENTITY_LINK
--

CREATE TABLE ENTITY_LINK(
    entity_link_key                INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    link_id                        VARCHAR(255),
    link_key                       INTEGER,
    details                        LONGCHAR,
    entity_1_id                    VARCHAR(255),
    entity_1_key                   INTEGER,
    entity_2_id                    VARCHAR(255),
    entity_2_key                   INTEGER,
    entity_seq_num_1_id            VARCHAR(255),
    entity_seq_num_1_key           INTEGER,
    entity_seq_num_2_id            VARCHAR(255),
    entity_seq_num_2_key           INTEGER
) ;

CREATE INDEX ENTITY_LINK_NDX
    on ENTITY_LINK(entry_key) ;


--
-- TABLE: ENTITY_NAME_COM
--

CREATE TABLE ENTITY_NAME_COM(
    entity_name_com_key            INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    entity_id                      VARCHAR(255),
    entity_key                     INTEGER,
    name                           LONGCHAR
) ;

CREATE INDEX ENTITY_NAME_COM_NDX
    on ENTITY_NAME_COM(entry_key) ;


--
-- TABLE: ENTITY_NAME_SYS
--

CREATE TABLE ENTITY_NAME_SYS(
    entity_name_sys_key            INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    entity_id                      VARCHAR(255),
    entity_key                     INTEGER,
    name                           LONGCHAR,
    system                         LONGCHAR
) ;

CREATE INDEX ENTITY_NAME_SYS_NDX
    on ENTITY_NAME_SYS(entry_key) ;


--
-- TABLE: ENTITY_POLY
--

CREATE TABLE ENTITY_POLY(
    entity_poly_key                INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    entity_id                      VARCHAR(255),
    entity_key                     INTEGER,
    nstd_chirality                 VARCHAR(255),
    nstd_linkage                   VARCHAR(255),
    nstd_monomer                   VARCHAR(255),
    number_of_monomers             INTEGER,
    type                           VARCHAR(255),
    type_details                   LONGCHAR,
    pdbx_strand_id                 LONGCHAR,
    pdbx_seq_one_letter_code       LONGCHAR,
    pdbx_seq_one_letter_code_can   LONGCHAR
) ;

CREATE INDEX ENTITY_POLY_NDX
    on ENTITY_POLY(entry_key) ;


--
-- TABLE: ENTITY_POLY_SEQ
--

CREATE TABLE ENTITY_POLY_SEQ(
    entity_poly_seq_key            INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    entity_id                      VARCHAR(255),
    entity_key                     INTEGER,
    hetero                         VARCHAR(255),
    mon_id                         VARCHAR(255),
    mon_key                        INTEGER,
    num                            INTEGER
) ;

CREATE INDEX ENTITY_POLY_SEQ_NDX
    on ENTITY_POLY_SEQ(entry_key) ;


--
-- TABLE: ENTITY_SRC_GEN
--

CREATE TABLE ENTITY_SRC_GEN(
    entity_src_gen_key             INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    entity_id                      VARCHAR(255),
    entity_key                     INTEGER,
    gene_src_common_name           LONGCHAR,
    gene_src_details               LONGCHAR,
    gene_src_genus                 LONGCHAR,
    gene_src_species               LONGCHAR,
    gene_src_strain                LONGCHAR,
    gene_src_tissue                LONGCHAR,
    gene_src_tissue_fraction       LONGCHAR,
    host_org_common_name           LONGCHAR,
    host_org_details               LONGCHAR,
    host_org_genus                 LONGCHAR,
    host_org_species               LONGCHAR,
    host_org_strain                LONGCHAR,
    plasmid_details                LONGCHAR,
    plasmid_name                   LONGCHAR,
    pdbx_gene_src_fragment         LONGCHAR,
    pdbx_gene_src_gene             LONGCHAR,
    pdbx_gene_src_scientific_name  LONGCHAR,
    pdbx_gene_src_variant          LONGCHAR,
    pdbx_gene_src_cell_line        LONGCHAR,
    pdbx_gene_src_atcc             LONGCHAR,
    pdbx_gene_src_organ            LONGCHAR,
    pdbx_gene_src_organelle        LONGCHAR,
    pdbx_gene_src_plasmid          LONGCHAR,
    pdbx_gene_src_plasmid_name     LONGCHAR,
    pdbx_gene_src_cell             LONGCHAR,
    pdbx_gene_src_cellular_locatio LONGCHAR,
    pdbx_host_org_gene             LONGCHAR,
    pdbx_host_org_organ            LONGCHAR,
    pdbx_host_org_variant          LONGCHAR,
    pdbx_host_org_cell_line        LONGCHAR,
    pdbx_host_org_atcc             LONGCHAR,
    pdbx_host_org_culture_collecti LONGCHAR,
    pdbx_host_org_cell             LONGCHAR,
    pdbx_host_org_organelle        LONGCHAR,
    pdbx_host_org_cellular_locatio LONGCHAR,
    pdbx_host_org_scientific_name  LONGCHAR,
    pdbx_host_org_strain           LONGCHAR,
    pdbx_host_org_tissue           LONGCHAR,
    pdbx_host_org_tissue_fraction  LONGCHAR,
    pdbx_host_org_vector           LONGCHAR,
    pdbx_host_org_vector_type      LONGCHAR,
    pdbx_description               LONGCHAR
) ;

CREATE INDEX ENTITY_SRC_GEN_NDX
    on ENTITY_SRC_GEN(entry_key) ;


--
-- TABLE: ENTITY_SRC_NAT
--

CREATE TABLE ENTITY_SRC_NAT(
    entity_src_nat_key             INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    common_name                    LONGCHAR,
    details                        LONGCHAR,
    entity_id                      VARCHAR(255),
    entity_key                     INTEGER,
    genus                          LONGCHAR,
    species                        LONGCHAR,
    strain                         LONGCHAR,
    tissue                         LONGCHAR,
    tissue_fraction                LONGCHAR,
    pdbx_organism_scientific       LONGCHAR,
    pdbx_secretion                 LONGCHAR,
    pdbx_fragment                  LONGCHAR,
    pdbx_variant                   LONGCHAR,
    pdbx_cell_line                 LONGCHAR,
    pdbx_atcc                      LONGCHAR,
    pdbx_cellular_location         LONGCHAR,
    pdbx_organ                     LONGCHAR,
    pdbx_organelle                 LONGCHAR,
    pdbx_cell                      LONGCHAR,
    pdbx_plasmid_name              LONGCHAR,
    pdbx_plasmid_details           LONGCHAR
) ;

CREATE INDEX ENTITY_SRC_NAT_NDX
    on ENTITY_SRC_NAT(entry_key) ;


--
-- TABLE: PDBX_ENTITY_NAME
--

CREATE TABLE PDBX_ENTITY_NAME(
    pdbx_entity_name_key           INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    entity_id                      VARCHAR(255),
    name                           LONGCHAR,
    name_type                      LONGCHAR
) ;

CREATE INDEX PDBX_ENTITY_NAME_NDX
    on PDBX_ENTITY_NAME(entry_key) ;


--
-- TABLE: PDBX_PRERELEASE_SEQ
--

CREATE TABLE PDBX_PRERELEASE_SEQ(
    pdbx_prerelease_seq_key        INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    entity_id                      VARCHAR(255),
    seq_one_letter_code            LONGCHAR
) ;

CREATE INDEX PDBX_PRERELEASE_SEQ_NDX
    on PDBX_PRERELEASE_SEQ(entry_key) ;


--
-- TABLE: PDBX_POLY_SEQ_SCHEME
--

CREATE TABLE PDBX_POLY_SEQ_SCHEME(
    pdbx_poly_seq_scheme_key       INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    asym_id                        VARCHAR(255),
    entity_id                      VARCHAR(255),
    seq_id                         VARCHAR(255),
    mon_id                         VARCHAR(255),
    pdb_strand_id                  VARCHAR(255),
    ndb_seq_num                    VARCHAR(255),
    pdb_seq_num                    VARCHAR(255),
    auth_seq_num                   VARCHAR(255),
    pdb_mon_id                     VARCHAR(255),
    auth_mon_id                    VARCHAR(255),
    pdb_ins_code                   VARCHAR(255)
) ;

CREATE INDEX PDBX_POLY_SEQ_SCHEME_NDX
    on PDBX_POLY_SEQ_SCHEME(entry_key) ;


--
-- TABLE: PDBX_NONPOLY_SCHEME
--

CREATE TABLE PDBX_NONPOLY_SCHEME(
    pdbx_nonpoly_scheme_key        INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    id                             INTEGER,
    asym_id                        VARCHAR(255),
    entity_id                      VARCHAR(255),
    mon_id                         VARCHAR(255),
    pdb_strand_id                  VARCHAR(255),
    ndb_seq_num                    VARCHAR(255),
    pdb_seq_num                    VARCHAR(255),
    auth_seq_num                   VARCHAR(255),
    pdb_mon_id                     VARCHAR(255),
    auth_mon_id                    VARCHAR(255),
    pdb_ins_code                   VARCHAR(255)
) ;

CREATE INDEX PDBX_NONPOLY_SCHEME_NDX
    on PDBX_NONPOLY_SCHEME(entry_key) ;


--
-- TABLE: PDBX_ENTITY_ASSEMBLY
--

CREATE TABLE PDBX_ENTITY_ASSEMBLY(
    pdbx_entity_assembly_key       INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    id                             VARCHAR(255),
    entity_id                      VARCHAR(255),
    biol_id                        VARCHAR(255),
    num_copies                     INTEGER
) ;

CREATE INDEX PDBX_ENTITY_ASSEMBLY_NDX
    on PDBX_ENTITY_ASSEMBLY(entry_key) ;


--
-- TABLE: PDBX_ENTITY_SRC_SYN
--

CREATE TABLE PDBX_ENTITY_SRC_SYN(
    pdbx_entity_src_syn_key        INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    details                        LONGCHAR,
    entity_id                      VARCHAR(255)
) ;

CREATE INDEX PDBX_ENTITY_SRC_SYN_NDX
    on PDBX_ENTITY_SRC_SYN(entry_key) ;


--
-- TABLE: ENTRY_LINK
--

CREATE TABLE ENTRY_LINK(
    entry_link_key                 INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    entry_id                       VARCHAR(255),
    id                             VARCHAR(255),
    details                        LONGCHAR
) ;

CREATE INDEX ENTRY_LINK_NDX
    on ENTRY_LINK(entry_key) ;


--
-- TABLE: GEOM
--

CREATE TABLE GEOM(
    geom_key                       INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    entry_id                       VARCHAR(255),
    details                        LONGCHAR
) ;

CREATE INDEX GEOM_NDX
    on GEOM(entry_key) ;


--
-- TABLE: GEOM_ANGLE
--

CREATE TABLE GEOM_ANGLE(
    geom_angle_key                 INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    atom_site_1_id                 VARCHAR(255),
    atom_site_1_key                INTEGER,
    atom_site_label_1_atom_id      VARCHAR(255),
    atom_site_label_1_atom_key     INTEGER,
    atom_site_label_1_seq_id       VARCHAR(255),
    atom_site_label_1_seq_key      INTEGER,
    atom_site_label_1_comp_id      VARCHAR(255),
    atom_site_label_1_comp_key     INTEGER,
    atom_site_label_1_asym_id      VARCHAR(255),
    atom_site_label_1_asym_key     INTEGER,
    atom_site_label_1_alt_id       VARCHAR(255),
    atom_site_label_1_alt_key      INTEGER,
    atom_site_2_id                 VARCHAR(255),
    atom_site_2_key                INTEGER,
    atom_site_label_2_atom_id      VARCHAR(255),
    atom_site_label_2_atom_key     INTEGER,
    atom_site_label_2_seq_id       VARCHAR(255),
    atom_site_label_2_seq_key      INTEGER,
    atom_site_label_2_comp_id      VARCHAR(255),
    atom_site_label_2_comp_key     INTEGER,
    atom_site_label_2_asym_id      VARCHAR(255),
    atom_site_label_2_asym_key     INTEGER,
    atom_site_label_2_alt_id       VARCHAR(255),
    atom_site_label_2_alt_key      INTEGER,
    atom_site_3_id                 VARCHAR(255),
    atom_site_3_key                INTEGER,
    atom_site_label_3_atom_id      VARCHAR(255),
    atom_site_label_3_atom_key     INTEGER,
    atom_site_label_3_seq_id       VARCHAR(255),
    atom_site_label_3_seq_key      INTEGER,
    atom_site_label_3_comp_id      VARCHAR(255),
    atom_site_label_3_comp_key     INTEGER,
    atom_site_label_3_asym_id      VARCHAR(255),
    atom_site_label_3_asym_key     INTEGER,
    atom_site_label_3_alt_id       VARCHAR(255),
    atom_site_label_3_alt_key      INTEGER,
    atom_site_auth_1_atom_id       VARCHAR(255),
    atom_site_auth_1_atom_key      INTEGER,
    atom_site_auth_1_seq_id        VARCHAR(255),
    atom_site_auth_1_seq_key       INTEGER,
    atom_site_auth_1_comp_id       VARCHAR(255),
    atom_site_auth_1_comp_key      INTEGER,
    atom_site_auth_1_asym_id       VARCHAR(255),
    atom_site_auth_1_asym_key      INTEGER,
    atom_site_auth_2_atom_id       VARCHAR(255),
    atom_site_auth_2_atom_key      INTEGER,
    atom_site_auth_2_seq_id        VARCHAR(255),
    atom_site_auth_2_seq_key       INTEGER,
    atom_site_auth_2_comp_id       VARCHAR(255),
    atom_site_auth_2_comp_key      INTEGER,
    atom_site_auth_2_asym_id       VARCHAR(255),
    atom_site_auth_2_asym_key      INTEGER,
    atom_site_auth_3_atom_id       VARCHAR(255),
    atom_site_auth_3_atom_key      INTEGER,
    atom_site_auth_3_seq_id        VARCHAR(255),
    atom_site_auth_3_seq_key       INTEGER,
    atom_site_auth_3_comp_id       VARCHAR(255),
    atom_site_auth_3_comp_key      INTEGER,
    atom_site_auth_3_asym_id       VARCHAR(255),
    atom_site_auth_3_asym_key      INTEGER,
    publ_flag                      VARCHAR(255),
    site_symmetry_1                LONGCHAR,
    site_symmetry_2                LONGCHAR,
    site_symmetry_3                LONGCHAR,
    value                          FLOAT,
    value_esd                      FLOAT,
    pdbx_atom_site_PDB_ins_code_1  VARCHAR(255),
    pdbx_atom_site_PDB_ins_code_2  VARCHAR(255),
    pdbx_atom_site_PDB_ins_code_3  VARCHAR(255),
    pdbx_PDB_model_num             VARCHAR(255)
) ;

CREATE INDEX GEOM_ANGLE_NDX
    on GEOM_ANGLE(entry_key) ;


--
-- TABLE: GEOM_BOND
--

CREATE TABLE GEOM_BOND(
    geom_bond_key                  INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    atom_site_1_id                 VARCHAR(255),
    atom_site_1_key                INTEGER,
    atom_site_label_1_atom_id      VARCHAR(255),
    atom_site_label_1_atom_key     INTEGER,
    atom_site_label_1_seq_id       VARCHAR(255),
    atom_site_label_1_seq_key      INTEGER,
    atom_site_label_1_comp_id      VARCHAR(255),
    atom_site_label_1_comp_key     INTEGER,
    atom_site_label_1_asym_id      VARCHAR(255),
    atom_site_label_1_asym_key     INTEGER,
    atom_site_label_1_alt_id       VARCHAR(255),
    atom_site_label_1_alt_key      INTEGER,
    atom_site_2_id                 VARCHAR(255),
    atom_site_2_key                INTEGER,
    atom_site_label_2_atom_id      VARCHAR(255),
    atom_site_label_2_atom_key     INTEGER,
    atom_site_label_2_seq_id       VARCHAR(255),
    atom_site_label_2_seq_key      INTEGER,
    atom_site_label_2_comp_id      VARCHAR(255),
    atom_site_label_2_comp_key     INTEGER,
    atom_site_label_2_asym_id      VARCHAR(255),
    atom_site_label_2_asym_key     INTEGER,
    atom_site_label_2_alt_id       VARCHAR(255),
    atom_site_label_2_alt_key      INTEGER,
    atom_site_auth_1_atom_id       VARCHAR(255),
    atom_site_auth_1_atom_key      INTEGER,
    atom_site_auth_1_seq_id        VARCHAR(255),
    atom_site_auth_1_seq_key       INTEGER,
    atom_site_auth_1_comp_id       VARCHAR(255),
    atom_site_auth_1_comp_key      INTEGER,
    atom_site_auth_1_asym_id       VARCHAR(255),
    atom_site_auth_1_asym_key      INTEGER,
    atom_site_auth_2_atom_id       VARCHAR(255),
    atom_site_auth_2_atom_key      INTEGER,
    atom_site_auth_2_seq_id        VARCHAR(255),
    atom_site_auth_2_seq_key       INTEGER,
    atom_site_auth_2_comp_id       VARCHAR(255),
    atom_site_auth_2_comp_key      INTEGER,
    atom_site_auth_2_asym_id       VARCHAR(255),
    atom_site_auth_2_asym_key      INTEGER,
    dist                           FLOAT,
    dist_esd                       FLOAT,
    publ_flag                      VARCHAR(255),
    site_symmetry_1                LONGCHAR,
    site_symmetry_2                LONGCHAR,
    pdbx_atom_site_PDB_ins_code_1  VARCHAR(255),
    pdbx_atom_site_PDB_ins_code_2  VARCHAR(255),
    pdbx_PDB_model_num             VARCHAR(255)
) ;

CREATE INDEX GEOM_BOND_NDX
    on GEOM_BOND(entry_key) ;


--
-- TABLE: GEOM_CONTACT
--

CREATE TABLE GEOM_CONTACT(
    geom_contact_key               INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    atom_site_1_id                 VARCHAR(255),
    atom_site_1_key                INTEGER,
    atom_site_label_1_atom_id      VARCHAR(255),
    atom_site_label_1_atom_key     INTEGER,
    atom_site_label_1_seq_id       VARCHAR(255),
    atom_site_label_1_seq_key      INTEGER,
    atom_site_label_1_comp_id      VARCHAR(255),
    atom_site_label_1_comp_key     INTEGER,
    atom_site_label_1_asym_id      VARCHAR(255),
    atom_site_label_1_asym_key     INTEGER,
    atom_site_label_1_alt_id       VARCHAR(255),
    atom_site_label_1_alt_key      INTEGER,
    atom_site_2_id                 VARCHAR(255),
    atom_site_2_key                INTEGER,
    atom_site_label_2_atom_id      VARCHAR(255),
    atom_site_label_2_atom_key     INTEGER,
    atom_site_label_2_seq_id       VARCHAR(255),
    atom_site_label_2_seq_key      INTEGER,
    atom_site_label_2_comp_id      VARCHAR(255),
    atom_site_label_2_comp_key     INTEGER,
    atom_site_label_2_asym_id      VARCHAR(255),
    atom_site_label_2_asym_key     INTEGER,
    atom_site_label_2_alt_id       VARCHAR(255),
    atom_site_label_2_alt_key      INTEGER,
    atom_site_auth_1_atom_id       VARCHAR(255),
    atom_site_auth_1_atom_key      INTEGER,
    atom_site_auth_1_seq_id        VARCHAR(255),
    atom_site_auth_1_seq_key       INTEGER,
    atom_site_auth_1_comp_id       VARCHAR(255),
    atom_site_auth_1_comp_key      INTEGER,
    atom_site_auth_1_asym_id       VARCHAR(255),
    atom_site_auth_1_asym_key      INTEGER,
    atom_site_auth_2_atom_id       VARCHAR(255),
    atom_site_auth_2_atom_key      INTEGER,
    atom_site_auth_2_seq_id        VARCHAR(255),
    atom_site_auth_2_seq_key       INTEGER,
    atom_site_auth_2_comp_id       VARCHAR(255),
    atom_site_auth_2_comp_key      INTEGER,
    atom_site_auth_2_asym_id       VARCHAR(255),
    atom_site_auth_2_asym_key      INTEGER,
    dist                           FLOAT,
    dist_esd                       FLOAT,
    publ_flag                      VARCHAR(255),
    site_symmetry_1                LONGCHAR,
    site_symmetry_2                LONGCHAR,
    pdbx_atom_site_PDB_ins_code_1  VARCHAR(255),
    pdbx_atom_site_PDB_ins_code_2  VARCHAR(255),
    pdbx_PDB_model_num             VARCHAR(255)
) ;

CREATE INDEX GEOM_CONTACT_NDX
    on GEOM_CONTACT(entry_key) ;


--
-- TABLE: GEOM_HBOND
--

CREATE TABLE GEOM_HBOND(
    geom_hbond_key                 INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    angle_dha                      FLOAT,
    angle_dha_esd                  FLOAT,
    atom_site_id_a                 VARCHAR(255),
    atom_site_label_a_atom_id      VARCHAR(255),
    atom_site_label_a_atom_key     INTEGER,
    atom_site_label_a_seq_id       VARCHAR(255),
    atom_site_label_a_seq_key      INTEGER,
    atom_site_label_a_comp_id      VARCHAR(255),
    atom_site_label_a_comp_key     INTEGER,
    atom_site_label_a_asym_id      VARCHAR(255),
    atom_site_label_a_asym_key     INTEGER,
    atom_site_label_a_alt_id       VARCHAR(255),
    atom_site_label_a_alt_key      INTEGER,
    atom_site_id_d                 VARCHAR(255),
    atom_site_label_d_atom_id      VARCHAR(255),
    atom_site_label_d_atom_key     INTEGER,
    atom_site_label_d_seq_id       VARCHAR(255),
    atom_site_label_d_seq_key      INTEGER,
    atom_site_label_d_comp_id      VARCHAR(255),
    atom_site_label_d_comp_key     INTEGER,
    atom_site_label_d_asym_id      VARCHAR(255),
    atom_site_label_d_asym_key     INTEGER,
    atom_site_label_d_alt_id       VARCHAR(255),
    atom_site_label_d_alt_key      INTEGER,
    atom_site_id_h                 VARCHAR(255),
    atom_site_label_h_atom_id      VARCHAR(255),
    atom_site_label_h_atom_key     INTEGER,
    atom_site_label_h_seq_id       VARCHAR(255),
    atom_site_label_h_seq_key      INTEGER,
    atom_site_label_h_comp_id      VARCHAR(255),
    atom_site_label_h_comp_key     INTEGER,
    atom_site_label_h_asym_id      VARCHAR(255),
    atom_site_label_h_asym_key     INTEGER,
    atom_site_label_h_alt_id       VARCHAR(255),
    atom_site_label_h_alt_key      INTEGER,
    atom_site_auth_a_atom_id       VARCHAR(255),
    atom_site_auth_a_atom_key      INTEGER,
    atom_site_auth_a_seq_id        VARCHAR(255),
    atom_site_auth_a_seq_key       INTEGER,
    atom_site_auth_a_comp_id       VARCHAR(255),
    atom_site_auth_a_comp_key      INTEGER,
    atom_site_auth_a_asym_id       VARCHAR(255),
    atom_site_auth_a_asym_key      INTEGER,
    atom_site_auth_d_atom_id       VARCHAR(255),
    atom_site_auth_d_atom_key      INTEGER,
    atom_site_auth_d_seq_id        VARCHAR(255),
    atom_site_auth_d_seq_key       INTEGER,
    atom_site_auth_d_comp_id       VARCHAR(255),
    atom_site_auth_d_comp_key      INTEGER,
    atom_site_auth_d_asym_id       VARCHAR(255),
    atom_site_auth_d_asym_key      INTEGER,
    atom_site_auth_h_atom_id       VARCHAR(255),
    atom_site_auth_h_atom_key      INTEGER,
    atom_site_auth_h_seq_id        VARCHAR(255),
    atom_site_auth_h_seq_key       INTEGER,
    atom_site_auth_h_comp_id       VARCHAR(255),
    atom_site_auth_h_comp_key      INTEGER,
    atom_site_auth_h_asym_id       VARCHAR(255),
    atom_site_auth_h_asym_key      INTEGER,
    dist_da                        FLOAT,
    dist_da_esd                    FLOAT,
    dist_dh                        FLOAT,
    dist_dh_esd                    FLOAT,
    dist_ha                        FLOAT,
    dist_ha_esd                    FLOAT,
    publ_flag                      VARCHAR(255),
    site_symmetry_a                LONGCHAR,
    site_symmetry_d                LONGCHAR,
    site_symmetry_h                LONGCHAR
) ;

CREATE INDEX GEOM_HBOND_NDX
    on GEOM_HBOND(entry_key) ;


--
-- TABLE: GEOM_TORSION
--

CREATE TABLE GEOM_TORSION(
    geom_torsion_key               INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    atom_site_1_id                 VARCHAR(255),
    atom_site_1_key                INTEGER,
    atom_site_label_1_atom_id      VARCHAR(255),
    atom_site_label_1_atom_key     INTEGER,
    atom_site_label_1_seq_id       VARCHAR(255),
    atom_site_label_1_seq_key      INTEGER,
    atom_site_label_1_comp_id      VARCHAR(255),
    atom_site_label_1_comp_key     INTEGER,
    atom_site_label_1_asym_id      VARCHAR(255),
    atom_site_label_1_asym_key     INTEGER,
    atom_site_label_1_alt_id       VARCHAR(255),
    atom_site_label_1_alt_key      INTEGER,
    atom_site_2_id                 VARCHAR(255),
    atom_site_2_key                INTEGER,
    atom_site_label_2_atom_id      VARCHAR(255),
    atom_site_label_2_atom_key     INTEGER,
    atom_site_label_2_seq_id       VARCHAR(255),
    atom_site_label_2_seq_key      INTEGER,
    atom_site_label_2_comp_id      VARCHAR(255),
    atom_site_label_2_comp_key     INTEGER,
    atom_site_label_2_asym_id      VARCHAR(255),
    atom_site_label_2_asym_key     INTEGER,
    atom_site_label_2_alt_id       VARCHAR(255),
    atom_site_label_2_alt_key      INTEGER,
    atom_site_3_id                 VARCHAR(255),
    atom_site_3_key                INTEGER,
    atom_site_label_3_atom_id      VARCHAR(255),
    atom_site_label_3_atom_key     INTEGER,
    atom_site_label_3_seq_id       VARCHAR(255),
    atom_site_label_3_seq_key      INTEGER,
    atom_site_label_3_comp_id      VARCHAR(255),
    atom_site_label_3_comp_key     INTEGER,
    atom_site_label_3_asym_id      VARCHAR(255),
    atom_site_label_3_asym_key     INTEGER,
    atom_site_label_3_alt_id       VARCHAR(255),
    atom_site_label_3_alt_key      INTEGER,
    atom_site_4_id                 VARCHAR(255),
    atom_site_4_key                INTEGER,
    atom_site_label_4_atom_id      VARCHAR(255),
    atom_site_label_4_atom_key     INTEGER,
    atom_site_label_4_seq_id       VARCHAR(255),
    atom_site_label_4_seq_key      INTEGER,
    atom_site_label_4_comp_id      VARCHAR(255),
    atom_site_label_4_comp_key     INTEGER,
    atom_site_label_4_asym_id      VARCHAR(255),
    atom_site_label_4_asym_key     INTEGER,
    atom_site_label_4_alt_id       VARCHAR(255),
    atom_site_label_4_alt_key      INTEGER,
    atom_site_auth_1_atom_id       VARCHAR(255),
    atom_site_auth_1_atom_key      INTEGER,
    atom_site_auth_1_seq_id        VARCHAR(255),
    atom_site_auth_1_seq_key       INTEGER,
    atom_site_auth_1_comp_id       VARCHAR(255),
    atom_site_auth_1_comp_key      INTEGER,
    atom_site_auth_1_asym_id       VARCHAR(255),
    atom_site_auth_1_asym_key      INTEGER,
    atom_site_auth_2_atom_id       VARCHAR(255),
    atom_site_auth_2_atom_key      INTEGER,
    atom_site_auth_2_seq_id        VARCHAR(255),
    atom_site_auth_2_seq_key       INTEGER,
    atom_site_auth_2_comp_id       VARCHAR(255),
    atom_site_auth_2_comp_key      INTEGER,
    atom_site_auth_2_asym_id       VARCHAR(255),
    atom_site_auth_2_asym_key      INTEGER,
    atom_site_auth_3_atom_id       VARCHAR(255),
    atom_site_auth_3_atom_key      INTEGER,
    atom_site_auth_3_seq_id        VARCHAR(255),
    atom_site_auth_3_seq_key       INTEGER,
    atom_site_auth_3_comp_id       VARCHAR(255),
    atom_site_auth_3_comp_key      INTEGER,
    atom_site_auth_3_asym_id       VARCHAR(255),
    atom_site_auth_3_asym_key      INTEGER,
    atom_site_auth_4_atom_id       VARCHAR(255),
    atom_site_auth_4_atom_key      INTEGER,
    atom_site_auth_4_seq_id        VARCHAR(255),
    atom_site_auth_4_seq_key       INTEGER,
    atom_site_auth_4_comp_id       VARCHAR(255),
    atom_site_auth_4_comp_key      INTEGER,
    atom_site_auth_4_asym_id       VARCHAR(255),
    atom_site_auth_4_asym_key      INTEGER,
    publ_flag                      VARCHAR(255),
    site_symmetry_1                LONGCHAR,
    site_symmetry_2                LONGCHAR,
    site_symmetry_3                LONGCHAR,
    site_symmetry_4                LONGCHAR,
    value                          FLOAT,
    value_esd                      FLOAT,
    pdbx_atom_site_PDB_ins_code_1  VARCHAR(255),
    pdbx_atom_site_PDB_ins_code_2  VARCHAR(255),
    pdbx_atom_site_PDB_ins_code_3  VARCHAR(255),
    pdbx_atom_site_PDB_ins_code_4  VARCHAR(255),
    pdbx_PDB_model_num             VARCHAR(255)
) ;

CREATE INDEX GEOM_TORSION_NDX
    on GEOM_TORSION(entry_key) ;


--
-- TABLE: STRUCT
--

CREATE TABLE STRUCT(
    struct_key                     INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    entry_id                       VARCHAR(255),
    title                          LONGCHAR,
    pdbx_descriptor                LONGCHAR,
    pdbx_model_details             LONGCHAR
) ;

CREATE INDEX STRUCT_NDX
    on STRUCT(entry_key) ;


--
-- TABLE: STRUCT_ASYM
--

CREATE TABLE STRUCT_ASYM(
    struct_asym_key                INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    details                        LONGCHAR,
    entity_id                      VARCHAR(255),
    entity_key                     INTEGER,
    id                             VARCHAR(255),
    pdbx_modified                  LONGCHAR,
    pdbx_blank_PDB_chainid_flag    VARCHAR(255)
) ;

CREATE INDEX STRUCT_ASYM_NDX
    on STRUCT_ASYM(entry_key) ;


--
-- TABLE: STRUCT_BIOL
--

CREATE TABLE STRUCT_BIOL(
    struct_biol_key                INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    details                        LONGCHAR,
    id                             LONGCHAR,
    pdbx_parent_biol_id            VARCHAR(255)
) ;

CREATE INDEX STRUCT_BIOL_NDX
    on STRUCT_BIOL(entry_key) ;


--
-- TABLE: STRUCT_BIOL_GEN
--

CREATE TABLE STRUCT_BIOL_GEN(
    struct_biol_gen_key            INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    asym_id                        VARCHAR(255),
    asym_key                       INTEGER,
    biol_id                        VARCHAR(255),
    biol_key                       INTEGER,
    details                        LONGCHAR,
    symmetry                       LONGCHAR,
    pdbx_full_symmetry_operation   VARCHAR(255)
) ;

CREATE INDEX STRUCT_BIOL_GEN_NDX
    on STRUCT_BIOL_GEN(entry_key) ;


--
-- TABLE: STRUCT_BIOL_KEYWORDS
--

CREATE TABLE STRUCT_BIOL_KEYWORDS(
    struct_biol_keywords_key       INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    biol_id                        VARCHAR(255),
    biol_key                       INTEGER,
    text                           LONGCHAR
) ;

CREATE INDEX STRUCT_BIOL_KEYWORDS_NDX
    on STRUCT_BIOL_KEYWORDS(entry_key) ;


--
-- TABLE: STRUCT_BIOL_VIEW
--

CREATE TABLE STRUCT_BIOL_VIEW(
    struct_biol_view_key           INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    biol_id                        VARCHAR(255),
    biol_key                       INTEGER,
    details                        LONGCHAR,
    id                             LONGCHAR,
    rot_matrix_0_0                 FLOAT,
    rot_matrix_0_1                 FLOAT,
    rot_matrix_0_2                 FLOAT,
    rot_matrix_1_0                 FLOAT,
    rot_matrix_1_1                 FLOAT,
    rot_matrix_1_2                 FLOAT,
    rot_matrix_2_0                 FLOAT,
    rot_matrix_2_1                 FLOAT,
    rot_matrix_2_2                 FLOAT
) ;

CREATE INDEX STRUCT_BIOL_VIEW_NDX
    on STRUCT_BIOL_VIEW(entry_key) ;


--
-- TABLE: STRUCT_CONF
--

CREATE TABLE STRUCT_CONF(
    struct_conf_key                INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    beg_label_seq_id               VARCHAR(255),
    beg_label_seq_key              INTEGER,
    beg_label_comp_id              VARCHAR(255),
    beg_label_comp_key             INTEGER,
    beg_label_asym_id              VARCHAR(255),
    beg_label_asym_key             INTEGER,
    beg_auth_seq_id                VARCHAR(255),
    beg_auth_seq_key               INTEGER,
    beg_auth_comp_id               VARCHAR(255),
    beg_auth_comp_key              INTEGER,
    beg_auth_asym_id               VARCHAR(255),
    beg_auth_asym_key              INTEGER,
    conf_type_id                   VARCHAR(255),
    conf_type_key                  INTEGER,
    details                        LONGCHAR,
    end_label_seq_id               VARCHAR(255),
    end_label_seq_key              INTEGER,
    end_label_comp_id              VARCHAR(255),
    end_label_comp_key             INTEGER,
    end_label_asym_id              VARCHAR(255),
    end_label_asym_key             INTEGER,
    end_auth_seq_id                VARCHAR(255),
    end_auth_seq_key               INTEGER,
    end_auth_comp_id               VARCHAR(255),
    end_auth_comp_key              INTEGER,
    end_auth_asym_id               VARCHAR(255),
    end_auth_asym_key              INTEGER,
    id                             VARCHAR(255),
    pdbx_beg_PDB_ins_code          VARCHAR(255),
    pdbx_end_PDB_ins_code          VARCHAR(255),
    pdbx_PDB_helix_class           VARCHAR(255),
    pdbx_PDB_helix_length          VARCHAR(255),
    pdbx_PDB_helix_id              VARCHAR(255)
) ;

CREATE INDEX STRUCT_CONF_NDX
    on STRUCT_CONF(entry_key) ;


--
-- TABLE: STRUCT_CONF_TYPE
--

CREATE TABLE STRUCT_CONF_TYPE(
    struct_conf_type_key           INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    criteria                       LONGCHAR,
    id                             VARCHAR(255),
    reference                      LONGCHAR
) ;

CREATE INDEX STRUCT_CONF_TYPE_NDX
    on STRUCT_CONF_TYPE(entry_key) ;


--
-- TABLE: STRUCT_CONN
--

CREATE TABLE STRUCT_CONN(
    struct_conn_key                INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    conn_type_id                   VARCHAR(255),
    conn_type_key                  INTEGER,
    details                        LONGCHAR,
    id                             VARCHAR(255),
    ptnr1_label_atom_id            VARCHAR(255),
    ptnr1_label_atom_key           INTEGER,
    ptnr1_label_seq_id             VARCHAR(255),
    ptnr1_label_seq_key            INTEGER,
    ptnr1_label_comp_id            VARCHAR(255),
    ptnr1_label_comp_key           INTEGER,
    ptnr1_label_asym_id            VARCHAR(255),
    ptnr1_label_asym_key           INTEGER,
    ptnr1_label_alt_id             VARCHAR(255),
    ptnr1_label_alt_key            INTEGER,
    ptnr1_auth_atom_id             VARCHAR(255),
    ptnr1_auth_atom_key            INTEGER,
    ptnr1_auth_seq_id              VARCHAR(255),
    ptnr1_auth_seq_key             INTEGER,
    ptnr1_auth_comp_id             VARCHAR(255),
    ptnr1_auth_comp_key            INTEGER,
    ptnr1_auth_asym_id             VARCHAR(255),
    ptnr1_auth_asym_key            INTEGER,
    ptnr1_role                     LONGCHAR,
    ptnr1_symmetry                 LONGCHAR,
    ptnr2_label_atom_id            VARCHAR(255),
    ptnr2_label_atom_key           INTEGER,
    ptnr2_label_seq_id             VARCHAR(255),
    ptnr2_label_seq_key            INTEGER,
    ptnr2_label_comp_id            VARCHAR(255),
    ptnr2_label_comp_key           INTEGER,
    ptnr2_label_asym_id            VARCHAR(255),
    ptnr2_label_asym_key           INTEGER,
    ptnr2_label_alt_id             VARCHAR(255),
    ptnr2_label_alt_key            INTEGER,
    ptnr2_auth_atom_id             VARCHAR(255),
    ptnr2_auth_atom_key            INTEGER,
    ptnr2_auth_seq_id              VARCHAR(255),
    ptnr2_auth_seq_key             INTEGER,
    ptnr2_auth_comp_id             VARCHAR(255),
    ptnr2_auth_comp_key            INTEGER,
    ptnr2_auth_asym_id             VARCHAR(255),
    ptnr2_auth_asym_key            INTEGER,
    ptnr2_role                     LONGCHAR,
    ptnr2_symmetry                 LONGCHAR,
    pdbx_ptnr1_PDB_ins_code        VARCHAR(255),
    pdbx_ptnr1_auth_alt_id         VARCHAR(255),
    pdbx_ptnr1_label_alt_id        VARCHAR(255),
    pdbx_ptnr1_standard_comp_id    VARCHAR(255),
    pdbx_ptnr2_PDB_ins_code        VARCHAR(255),
    pdbx_ptnr2_auth_alt_id         VARCHAR(255),
    pdbx_ptnr2_label_alt_id        VARCHAR(255),
    pdbx_ptnr3_auth_alt_id         VARCHAR(255),
    pdbx_ptnr3_auth_asym_id        VARCHAR(255),
    pdbx_ptnr3_auth_atom_id        VARCHAR(255),
    pdbx_ptnr3_auth_comp_id        VARCHAR(255),
    pdbx_ptnr3_PDB_ins_code        VARCHAR(255),
    pdbx_ptnr3_auth_seq_id         VARCHAR(255),
    pdbx_ptnr3_label_alt_id        VARCHAR(255),
    pdbx_ptnr3_label_asym_id       VARCHAR(255),
    pdbx_ptnr3_label_atom_id       VARCHAR(255),
    pdbx_ptnr3_label_comp_id       VARCHAR(255),
    pdbx_ptnr3_label_seq_id        VARCHAR(255),
    pdbx_PDB_id                    VARCHAR(255)
) ;

CREATE INDEX STRUCT_CONN_NDX
    on STRUCT_CONN(entry_key) ;


--
-- TABLE: STRUCT_CONN_TYPE
--

CREATE TABLE STRUCT_CONN_TYPE(
    struct_conn_type_key           INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    criteria                       LONGCHAR,
    id                             VARCHAR(255),
    reference                      LONGCHAR
) ;

CREATE INDEX STRUCT_CONN_TYPE_NDX
    on STRUCT_CONN_TYPE(entry_key) ;


--
-- TABLE: STRUCT_KEYWORDS
--

CREATE TABLE STRUCT_KEYWORDS(
    struct_keywords_key            INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    entry_id                       VARCHAR(255),
    text                           LONGCHAR,
    pdbx_keywords                  LONGCHAR
) ;

CREATE INDEX STRUCT_KEYWORDS_NDX
    on STRUCT_KEYWORDS(entry_key) ;


--
-- TABLE: STRUCT_MON_DETAILS
--

CREATE TABLE STRUCT_MON_DETAILS(
    struct_mon_details_key         INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    entry_id                       VARCHAR(255),
    prot_cis                       FLOAT,
    rscc                           LONGCHAR,
    rsr                            LONGCHAR
) ;

CREATE INDEX STRUCT_MON_DETAILS_NDX
    on STRUCT_MON_DETAILS(entry_key) ;


--
-- TABLE: STRUCT_MON_NUCL
--

CREATE TABLE STRUCT_MON_NUCL(
    struct_mon_nucl_key            INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    alpha                          FLOAT,
    beta                           FLOAT,
    chi1                           FLOAT,
    chi2                           FLOAT,
    delta                          FLOAT,
    details                        FLOAT,
    epsilon                        FLOAT,
    gamma                          FLOAT,
    label_seq_id                   VARCHAR(255),
    label_seq_key                  INTEGER,
    label_comp_id                  VARCHAR(255),
    label_comp_key                 INTEGER,
    label_asym_id                  VARCHAR(255),
    label_asym_key                 INTEGER,
    label_alt_id                   VARCHAR(255),
    label_alt_key                  INTEGER,
    auth_seq_id                    VARCHAR(255),
    auth_seq_key                   INTEGER,
    auth_comp_id                   VARCHAR(255),
    auth_comp_key                  INTEGER,
    auth_asym_id                   VARCHAR(255),
    auth_asym_key                  INTEGER,
    mean_b_all                     FLOAT,
    mean_b_base                    FLOAT,
    mean_b_phos                    FLOAT,
    mean_b_sugar                   FLOAT,
    nu0                            FLOAT,
    nu1                            FLOAT,
    nu2                            FLOAT,
    nu3                            FLOAT,
    nu4                            FLOAT,
    p                              FLOAT,
    rscc_all                       FLOAT,
    rscc_base                      FLOAT,
    rscc_phos                      FLOAT,
    rscc_sugar                     FLOAT,
    rsr_all                        FLOAT,
    rsr_base                       FLOAT,
    rsr_phos                       FLOAT,
    rsr_sugar                      FLOAT,
    tau0                           FLOAT,
    tau1                           FLOAT,
    tau2                           FLOAT,
    tau3                           FLOAT,
    tau4                           FLOAT,
    taum                           FLOAT,
    zeta                           FLOAT
) ;

CREATE INDEX STRUCT_MON_NUCL_NDX
    on STRUCT_MON_NUCL(entry_key) ;


--
-- TABLE: STRUCT_MON_PROT
--

CREATE TABLE STRUCT_MON_PROT(
    struct_mon_prot_key            INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    chi1                           FLOAT,
    chi2                           FLOAT,
    chi3                           FLOAT,
    chi4                           FLOAT,
    chi5                           FLOAT,
    details                        FLOAT,
    label_seq_id                   VARCHAR(255),
    label_seq_key                  INTEGER,
    label_comp_id                  VARCHAR(255),
    label_comp_key                 INTEGER,
    label_asym_id                  VARCHAR(255),
    label_asym_key                 INTEGER,
    label_alt_id                   VARCHAR(255),
    label_alt_key                  INTEGER,
    auth_seq_id                    VARCHAR(255),
    auth_seq_key                   INTEGER,
    auth_comp_id                   VARCHAR(255),
    auth_comp_key                  INTEGER,
    auth_asym_id                   VARCHAR(255),
    auth_asym_key                  INTEGER,
    rscc_all                       FLOAT,
    rscc_main                      FLOAT,
    rscc_side                      FLOAT,
    rsr_all                        FLOAT,
    rsr_main                       FLOAT,
    rsr_side                       FLOAT,
    mean_b_all                     FLOAT,
    mean_b_main                    FLOAT,
    mean_b_side                    FLOAT,
    omega                          FLOAT,
    phi                            FLOAT,
    psi                            FLOAT
) ;

CREATE INDEX STRUCT_MON_PROT_NDX
    on STRUCT_MON_PROT(entry_key) ;


--
-- TABLE: STRUCT_MON_PROT_CIS
--

CREATE TABLE STRUCT_MON_PROT_CIS(
    struct_mon_prot_cis_key        INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    label_seq_id                   VARCHAR(255),
    label_seq_key                  INTEGER,
    label_comp_id                  VARCHAR(255),
    label_comp_key                 INTEGER,
    label_asym_id                  VARCHAR(255),
    label_asym_key                 INTEGER,
    label_alt_id                   VARCHAR(255),
    label_alt_key                  INTEGER,
    auth_seq_id                    VARCHAR(255),
    auth_seq_key                   INTEGER,
    auth_comp_id                   VARCHAR(255),
    auth_comp_key                  INTEGER,
    auth_asym_id                   VARCHAR(255),
    auth_asym_key                  INTEGER,
    pdbx_auth_asym_id_2            VARCHAR(255),
    pdbx_auth_comp_id_2            VARCHAR(255),
    pdbx_auth_seq_id_2             VARCHAR(255),
    pdbx_label_asym_id_2           VARCHAR(255),
    pdbx_label_comp_id_2           VARCHAR(255),
    pdbx_label_seq_id_2            VARCHAR(255),
    pdbx_PDB_ins_code              VARCHAR(255),
    pdbx_PDB_ins_code_2            VARCHAR(255),
    pdbx_PDB_model_num             VARCHAR(255),
    pdbx_omega_angle               VARCHAR(255),
    pdbx_id                        VARCHAR(255)
) ;

CREATE INDEX STRUCT_MON_PROT_CIS_NDX
    on STRUCT_MON_PROT_CIS(entry_key) ;


--
-- TABLE: STRUCT_NCS_DOM
--

CREATE TABLE STRUCT_NCS_DOM(
    struct_ncs_dom_key             INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    details                        LONGCHAR,
    id                             VARCHAR(255)
) ;

CREATE INDEX STRUCT_NCS_DOM_NDX
    on STRUCT_NCS_DOM(entry_key) ;


--
-- TABLE: STRUCT_NCS_DOM_LIM
--

CREATE TABLE STRUCT_NCS_DOM_LIM(
    struct_ncs_dom_lim_key         INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    beg_label_seq_id               VARCHAR(255),
    beg_label_seq_key              INTEGER,
    beg_label_comp_id              VARCHAR(255),
    beg_label_comp_key             INTEGER,
    beg_label_asym_id              VARCHAR(255),
    beg_label_asym_key             INTEGER,
    beg_label_alt_id               VARCHAR(255),
    beg_label_alt_key              INTEGER,
    beg_auth_seq_id                VARCHAR(255),
    beg_auth_seq_key               INTEGER,
    beg_auth_comp_id               VARCHAR(255),
    beg_auth_comp_key              INTEGER,
    beg_auth_asym_id               VARCHAR(255),
    beg_auth_asym_key              INTEGER,
    dom_id                         VARCHAR(255),
    dom_key                        INTEGER,
    end_label_seq_id               VARCHAR(255),
    end_label_seq_key              INTEGER,
    end_label_comp_id              VARCHAR(255),
    end_label_comp_key             INTEGER,
    end_label_asym_id              VARCHAR(255),
    end_label_asym_key             INTEGER,
    end_label_alt_id               VARCHAR(255),
    end_label_alt_key              INTEGER,
    end_auth_seq_id                VARCHAR(255),
    end_auth_seq_key               INTEGER,
    end_auth_comp_id               VARCHAR(255),
    end_auth_comp_key              INTEGER,
    end_auth_asym_id               VARCHAR(255),
    end_auth_asym_key              INTEGER
) ;

CREATE INDEX STRUCT_NCS_DOM_LIM_NDX
    on STRUCT_NCS_DOM_LIM(entry_key) ;


--
-- TABLE: STRUCT_NCS_ENS
--

CREATE TABLE STRUCT_NCS_ENS(
    struct_ncs_ens_key             INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    details                        LONGCHAR,
    id                             VARCHAR(255),
    point_group                    LONGCHAR
) ;

CREATE INDEX STRUCT_NCS_ENS_NDX
    on STRUCT_NCS_ENS(entry_key) ;


--
-- TABLE: STRUCT_NCS_ENS_GEN
--

CREATE TABLE STRUCT_NCS_ENS_GEN(
    struct_ncs_ens_gen_key         INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    dom_1_id                       VARCHAR(255),
    dom_1_key                      INTEGER,
    dom_2_id                       VARCHAR(255),
    dom_2_key                      INTEGER,
    ens_id                         VARCHAR(255),
    ens_key                        INTEGER,
    oper_id                        VARCHAR(255),
    oper_key                       INTEGER
) ;

CREATE INDEX STRUCT_NCS_ENS_GEN_NDX
    on STRUCT_NCS_ENS_GEN(entry_key) ;


--
-- TABLE: STRUCT_NCS_OPER
--

CREATE TABLE STRUCT_NCS_OPER(
    struct_ncs_oper_key            INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    code                           VARCHAR(255),
    details                        LONGCHAR,
    id                             VARCHAR(255),
    matrix_0_0                     FLOAT,
    matrix_0_1                     FLOAT,
    matrix_0_2                     FLOAT,
    matrix_1_0                     FLOAT,
    matrix_1_1                     FLOAT,
    matrix_1_2                     FLOAT,
    matrix_2_0                     FLOAT,
    matrix_2_1                     FLOAT,
    matrix_2_2                     FLOAT,
    vector_0                       FLOAT,
    vector_1                       FLOAT,
    vector_2                       FLOAT
) ;

CREATE INDEX STRUCT_NCS_OPER_NDX
    on STRUCT_NCS_OPER(entry_key) ;


--
-- TABLE: STRUCT_REF
--

CREATE TABLE STRUCT_REF(
    struct_ref_key                 INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    biol_id                        VARCHAR(255),
    biol_key                       INTEGER,
    db_code                        LONGCHAR,
    db_name                        LONGCHAR,
    details                        LONGCHAR,
    entity_id                      VARCHAR(255),
    entity_key                     INTEGER,
    id                             VARCHAR(255),
    seq_align                      VARCHAR(255),
    seq_dif                        VARCHAR(255),
    pdbx_db_accession              VARCHAR(255),
    pdbx_seq_one_letter_code       LONGCHAR,
    pdbx_align_begin               VARCHAR(255)
) ;

CREATE INDEX STRUCT_REF_NDX
    on STRUCT_REF(entry_key) ;


--
-- TABLE: STRUCT_REF_SEQ
--

CREATE TABLE STRUCT_REF_SEQ(
    struct_ref_seq_key             INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    align_id                       VARCHAR(255),
    db_align_beg                   INTEGER,
    db_align_end                   INTEGER,
    details                        LONGCHAR,
    ref_id                         VARCHAR(255),
    ref_key                        INTEGER,
    seq_align_beg_id               VARCHAR(255),
    seq_align_beg_key              INTEGER,
    seq_align_end_id               VARCHAR(255),
    seq_align_end_key              INTEGER,
    pdbx_strand_id                 VARCHAR(255),
    pdbx_db_accession              VARCHAR(255),
    pdbx_db_align_beg_ins_code     VARCHAR(255),
    pdbx_db_align_end_ins_code     VARCHAR(255),
    pdbx_PDB_id_code               VARCHAR(255),
    pdbx_auth_seq_align_beg        VARCHAR(255),
    pdbx_auth_seq_align_end        VARCHAR(255),
    pdbx_seq_align_beg_ins_code    VARCHAR(255),
    pdbx_seq_align_end_ins_code    VARCHAR(255)
) ;

CREATE INDEX STRUCT_REF_SEQ_NDX
    on STRUCT_REF_SEQ(entry_key) ;


--
-- TABLE: STRUCT_REF_SEQ_DIF
--

CREATE TABLE STRUCT_REF_SEQ_DIF(
    struct_ref_seq_dif_key         INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    align_id                       VARCHAR(255),
    align_key                      INTEGER,
    db_mon_id                      VARCHAR(255),
    db_mon_key                     INTEGER,
    details                        LONGCHAR,
    mon_id                         VARCHAR(255),
    mon_key                        INTEGER,
    seq_num_id                     VARCHAR(255),
    seq_num_key                    INTEGER,
    pdbx_pdb_id_code               VARCHAR(255),
    pdbx_pdb_strand_id             VARCHAR(255),
    pdbx_pdb_ins_code              VARCHAR(255),
    pdbx_auth_seq_num              VARCHAR(255),
    pdbx_seq_db_name               VARCHAR(255),
    pdbx_seq_db_accession_code     VARCHAR(255),
    pdbx_seq_db_seq_num            VARCHAR(255)
) ;

CREATE INDEX STRUCT_REF_SEQ_DIF_NDX
    on STRUCT_REF_SEQ_DIF(entry_key) ;


--
-- TABLE: STRUCT_SHEET
--

CREATE TABLE STRUCT_SHEET(
    struct_sheet_key               INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    details                        LONGCHAR,
    id                             VARCHAR(255),
    number_strands                 INTEGER,
    type                           LONGCHAR
) ;

CREATE INDEX STRUCT_SHEET_NDX
    on STRUCT_SHEET(entry_key) ;


--
-- TABLE: STRUCT_SHEET_HBOND
--

CREATE TABLE STRUCT_SHEET_HBOND(
    struct_sheet_hbond_key         INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    range_1_beg_label_atom_id      VARCHAR(255),
    range_1_beg_label_atom_key     INTEGER,
    range_1_beg_label_seq_id       VARCHAR(255),
    range_1_beg_label_seq_key      INTEGER,
    range_1_end_label_atom_id      VARCHAR(255),
    range_1_end_label_atom_key     INTEGER,
    range_1_end_label_seq_id       VARCHAR(255),
    range_1_end_label_seq_key      INTEGER,
    range_2_beg_label_atom_id      VARCHAR(255),
    range_2_beg_label_atom_key     INTEGER,
    range_2_beg_label_seq_id       VARCHAR(255),
    range_2_beg_label_seq_key      INTEGER,
    range_2_end_label_atom_id      VARCHAR(255),
    range_2_end_label_atom_key     INTEGER,
    range_2_end_label_seq_id       VARCHAR(255),
    range_2_end_label_seq_key      INTEGER,
    range_1_beg_auth_atom_id       VARCHAR(255),
    range_1_beg_auth_atom_key      INTEGER,
    range_1_beg_auth_seq_id        VARCHAR(255),
    range_1_beg_auth_seq_key       INTEGER,
    range_1_end_auth_atom_id       VARCHAR(255),
    range_1_end_auth_atom_key      INTEGER,
    range_1_end_auth_seq_id        VARCHAR(255),
    range_1_end_auth_seq_key       INTEGER,
    range_2_beg_auth_atom_id       VARCHAR(255),
    range_2_beg_auth_atom_key      INTEGER,
    range_2_beg_auth_seq_id        VARCHAR(255),
    range_2_beg_auth_seq_key       INTEGER,
    range_2_end_auth_atom_id       VARCHAR(255),
    range_2_end_auth_atom_key      INTEGER,
    range_2_end_auth_seq_id        VARCHAR(255),
    range_2_end_auth_seq_key       INTEGER,
    range_1_id                     VARCHAR(255),
    range_1_key                    INTEGER,
    range_2_id                     VARCHAR(255),
    range_2_key                    INTEGER,
    sheet_id                       VARCHAR(255),
    sheet_key                      INTEGER,
    pdbx_range_1_beg_auth_comp_id  VARCHAR(255),
    pdbx_range_1_beg_auth_asym_id  VARCHAR(255),
    pdbx_range_1_end_auth_comp_id  VARCHAR(255),
    pdbx_range_1_end_auth_asym_id  VARCHAR(255),
    pdbx_range_1_beg_label_comp_id VARCHAR(255),
    pdbx_range_1_beg_label_asym_id VARCHAR(255),
    pdbx_range_1_beg_PDB_ins_code  VARCHAR(255),
    pdbx_range_1_end_label_comp_id VARCHAR(255),
    pdbx_range_1_end_label_asym_id VARCHAR(255),
    pdbx_range_1_end_PDB_ins_code  VARCHAR(255),
    pdbx_range_2_beg_label_comp_id VARCHAR(255),
    pdbx_range_2_beg_label_asym_id VARCHAR(255),
    pdbx_range_2_beg_PDB_ins_code  VARCHAR(255),
    pdbx_range_2_end_label_comp_id VARCHAR(255),
    pdbx_range_2_end_label_asym_id VARCHAR(255),
    pdbx_range_2_end_label_ins_cod VARCHAR(255)
) ;

CREATE INDEX STRUCT_SHEET_HBOND_NDX
    on STRUCT_SHEET_HBOND(entry_key) ;


--
-- TABLE: PDBX_STRUCT_SHEET_HBOND
--

CREATE TABLE PDBX_STRUCT_SHEET_HBOND(
    pdbx_struct_sheet_hbond_key    INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    range_id_1                     VARCHAR(255),
    range_id_2                     VARCHAR(255),
    sheet_id                       VARCHAR(255),
    range_1_label_atom_id          VARCHAR(255),
    range_1_label_seq_id           VARCHAR(255),
    range_1_label_comp_id          VARCHAR(255),
    range_1_label_asym_id          VARCHAR(255),
    range_1_auth_atom_id           VARCHAR(255),
    range_1_auth_seq_id            VARCHAR(255),
    range_1_auth_comp_id           VARCHAR(255),
    range_1_auth_asym_id           VARCHAR(255),
    range_1_PDB_ins_code           VARCHAR(255),
    range_2_label_atom_id          VARCHAR(255),
    range_2_label_seq_id           VARCHAR(255),
    range_2_label_comp_id          VARCHAR(255),
    range_2_label_asym_id          VARCHAR(255),
    range_2_auth_atom_id           VARCHAR(255),
    range_2_auth_seq_id            VARCHAR(255),
    range_2_auth_comp_id           VARCHAR(255),
    range_2_auth_asym_id           VARCHAR(255),
    range_2_PDB_ins_code           VARCHAR(255)
) ;

CREATE INDEX PDBX_STRUCT_SHEET_HBOND_NDX
    on PDBX_STRUCT_SHEET_HBOND(entry_key) ;


--
-- TABLE: STRUCT_SHEET_ORDER
--

CREATE TABLE STRUCT_SHEET_ORDER(
    struct_sheet_order_key         INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    offset                         INTEGER,
    range_1_id                     VARCHAR(255),
    range_1_key                    INTEGER,
    range_2_id                     VARCHAR(255),
    range_2_key                    INTEGER,
    sense                          VARCHAR(255),
    sheet_id                       VARCHAR(255),
    sheet_key                      INTEGER
) ;

CREATE INDEX STRUCT_SHEET_ORDER_NDX
    on STRUCT_SHEET_ORDER(entry_key) ;


--
-- TABLE: STRUCT_SHEET_RANGE
--

CREATE TABLE STRUCT_SHEET_RANGE(
    struct_sheet_range_key         INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    beg_label_seq_id               VARCHAR(255),
    beg_label_seq_key              INTEGER,
    beg_label_comp_id              VARCHAR(255),
    beg_label_comp_key             INTEGER,
    beg_label_asym_id              VARCHAR(255),
    beg_label_asym_key             INTEGER,
    beg_auth_seq_id                VARCHAR(255),
    beg_auth_seq_key               INTEGER,
    beg_auth_comp_id               VARCHAR(255),
    beg_auth_comp_key              INTEGER,
    beg_auth_asym_id               VARCHAR(255),
    beg_auth_asym_key              INTEGER,
    end_label_seq_id               VARCHAR(255),
    end_label_seq_key              INTEGER,
    end_label_comp_id              VARCHAR(255),
    end_label_comp_key             INTEGER,
    end_label_asym_id              VARCHAR(255),
    end_label_asym_key             INTEGER,
    end_auth_seq_id                VARCHAR(255),
    end_auth_seq_key               INTEGER,
    end_auth_comp_id               VARCHAR(255),
    end_auth_comp_key              INTEGER,
    end_auth_asym_id               VARCHAR(255),
    end_auth_asym_key              INTEGER,
    id                             VARCHAR(255),
    sheet_id                       VARCHAR(255),
    sheet_key                      INTEGER,
    symmetry                       LONGCHAR,
    pdbx_beg_PDB_ins_code          VARCHAR(255),
    pdbx_end_PDB_ins_code          VARCHAR(255)
) ;

CREATE INDEX STRUCT_SHEET_RANGE_NDX
    on STRUCT_SHEET_RANGE(entry_key) ;


--
-- TABLE: STRUCT_SHEET_TOPOLOGY
--

CREATE TABLE STRUCT_SHEET_TOPOLOGY(
    struct_sheet_topology_key      INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    offset                         INTEGER,
    range_1_id                     VARCHAR(255),
    range_1_key                    INTEGER,
    range_2_id                     VARCHAR(255),
    range_2_key                    INTEGER,
    sense                          VARCHAR(255),
    sheet_id                       VARCHAR(255),
    sheet_key                      INTEGER
) ;

CREATE INDEX STRUCT_SHEET_TOPOLOGY_NDX
    on STRUCT_SHEET_TOPOLOGY(entry_key) ;


--
-- TABLE: STRUCT_SITE
--

CREATE TABLE STRUCT_SITE(
    struct_site_key                INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    details                        LONGCHAR,
    id                             LONGCHAR,
    pdbx_num_residues              INTEGER
) ;

CREATE INDEX STRUCT_SITE_NDX
    on STRUCT_SITE(entry_key) ;


--
-- TABLE: STRUCT_SITE_GEN
--

CREATE TABLE STRUCT_SITE_GEN(
    struct_site_gen_key            INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    details                        LONGCHAR,
    id                             LONGCHAR,
    label_atom_id                  VARCHAR(255),
    label_atom_key                 INTEGER,
    label_seq_id                   VARCHAR(255),
    label_seq_key                  INTEGER,
    label_comp_id                  VARCHAR(255),
    label_comp_key                 INTEGER,
    label_asym_id                  VARCHAR(255),
    label_asym_key                 INTEGER,
    label_alt_id                   VARCHAR(255),
    label_alt_key                  INTEGER,
    auth_atom_id                   VARCHAR(255),
    auth_atom_key                  INTEGER,
    auth_seq_id                    VARCHAR(255),
    auth_seq_key                   INTEGER,
    auth_comp_id                   VARCHAR(255),
    auth_comp_key                  INTEGER,
    auth_asym_id                   VARCHAR(255),
    auth_asym_key                  INTEGER,
    site_id                        VARCHAR(255),
    site_key                       INTEGER,
    symmetry                       LONGCHAR,
    pdbx_auth_ins_code             VARCHAR(255),
    pdbx_num_res                   INTEGER
) ;

CREATE INDEX STRUCT_SITE_GEN_NDX
    on STRUCT_SITE_GEN(entry_key) ;


--
-- TABLE: STRUCT_SITE_KEYWORDS
--

CREATE TABLE STRUCT_SITE_KEYWORDS(
    struct_site_keywords_key       INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    site_id                        VARCHAR(255),
    site_key                       INTEGER,
    text                           LONGCHAR
) ;

CREATE INDEX STRUCT_SITE_KEYWORDS_NDX
    on STRUCT_SITE_KEYWORDS(entry_key) ;


--
-- TABLE: STRUCT_SITE_VIEW
--

CREATE TABLE STRUCT_SITE_VIEW(
    struct_site_view_key           INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    details                        LONGCHAR,
    id                             LONGCHAR,
    rot_matrix_0_0                 FLOAT,
    rot_matrix_0_1                 FLOAT,
    rot_matrix_0_2                 FLOAT,
    rot_matrix_1_0                 FLOAT,
    rot_matrix_1_1                 FLOAT,
    rot_matrix_1_2                 FLOAT,
    rot_matrix_2_0                 FLOAT,
    rot_matrix_2_1                 FLOAT,
    rot_matrix_2_2                 FLOAT,
    site_id                        VARCHAR(255),
    site_key                       INTEGER
) ;

CREATE INDEX STRUCT_SITE_VIEW_NDX
    on STRUCT_SITE_VIEW(entry_key) ;


--
-- TABLE: ATOM_SITES
--

CREATE TABLE ATOM_SITES(
    atom_sites_key                 INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    entry_id                       VARCHAR(255),
    cartn_transf_matrix_0_0        FLOAT,
    cartn_transf_matrix_0_1        FLOAT,
    cartn_transf_matrix_0_2        FLOAT,
    cartn_transf_matrix_1_0        FLOAT,
    cartn_transf_matrix_1_1        FLOAT,
    cartn_transf_matrix_1_2        FLOAT,
    cartn_transf_matrix_2_0        FLOAT,
    cartn_transf_matrix_2_1        FLOAT,
    cartn_transf_matrix_2_2        FLOAT,
    cartn_transf_vector_0          FLOAT,
    cartn_transf_vector_1          FLOAT,
    cartn_transf_vector_2          FLOAT,
    cartn_transform_axes           LONGCHAR,
    fract_transf_matrix_0_0        FLOAT,
    fract_transf_matrix_0_1        FLOAT,
    fract_transf_matrix_0_2        FLOAT,
    fract_transf_matrix_1_0        FLOAT,
    fract_transf_matrix_1_1        FLOAT,
    fract_transf_matrix_1_2        FLOAT,
    fract_transf_matrix_2_0        FLOAT,
    fract_transf_matrix_2_1        FLOAT,
    fract_transf_matrix_2_2        FLOAT,
    fract_transf_vector_0          FLOAT,
    fract_transf_vector_1          FLOAT,
    fract_transf_vector_2          FLOAT,
    solution_primary               VARCHAR(255),
    solution_secondary             VARCHAR(255),
    solution_hydrogens             VARCHAR(255)
) ;

CREATE INDEX ATOM_SITES_NDX
    on ATOM_SITES(entry_key) ;


--
-- TABLE: ATOM_SITES_ALT
--

CREATE TABLE ATOM_SITES_ALT(
    atom_sites_alt_key             INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    details                        LONGCHAR,
    id                             VARCHAR(255)
) ;

CREATE INDEX ATOM_SITES_ALT_NDX
    on ATOM_SITES_ALT(entry_key) ;


--
-- TABLE: ATOM_SITES_ALT_ENS
--

CREATE TABLE ATOM_SITES_ALT_ENS(
    atom_sites_alt_ens_key         INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    details                        LONGCHAR,
    id                             VARCHAR(255)
) ;

CREATE INDEX ATOM_SITES_ALT_ENS_NDX
    on ATOM_SITES_ALT_ENS(entry_key) ;


--
-- TABLE: ATOM_SITES_ALT_GEN
--

CREATE TABLE ATOM_SITES_ALT_GEN(
    atom_sites_alt_gen_key         INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    alt_id                         VARCHAR(255),
    alt_key                        INTEGER,
    ens_id                         VARCHAR(255),
    ens_key                        INTEGER
) ;

CREATE INDEX ATOM_SITES_ALT_GEN_NDX
    on ATOM_SITES_ALT_GEN(entry_key) ;


--
-- TABLE: ATOM_SITES_FOOTNOTE
--

CREATE TABLE ATOM_SITES_FOOTNOTE(
    atom_sites_footnote_key        INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    id                             VARCHAR(255),
    text                           LONGCHAR
) ;

CREATE INDEX ATOM_SITES_FOOTNOTE_NDX
    on ATOM_SITES_FOOTNOTE(entry_key) ;


--
-- TABLE: CELL
--

CREATE TABLE CELL(
    cell_key                       INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    cell_length_a                  FLOAT,
    cell_length_b                  FLOAT,
    cell_length_c                  FLOAT,
    cell_angle_alpha               FLOAT,
    cell_angle_beta                FLOAT,
    cell_angle_gamma               FLOAT,
    cell_esd_length_a              FLOAT,
    cell_esd_length_b              FLOAT,
    cell_esd_length_c              FLOAT,
    cell_esd_angle_alpha           FLOAT,
    cell_esd_angle_beta            FLOAT,
    cell_esd_angle_gamma           FLOAT,
    entry_id                       VARCHAR(255),
    details                        LONGCHAR,
    volume                         FLOAT,
    volume_esd                     FLOAT,
    z_pdb                          INTEGER,
    pdbx_unique_axis               LONGCHAR
) ;

CREATE INDEX CELL_NDX
    on CELL(entry_key) ;


--
-- TABLE: CELL_MEASUREMENT
--

CREATE TABLE CELL_MEASUREMENT(
    cell_measurement_key           INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    entry_id                       VARCHAR(255),
    pressure                       FLOAT,
    pressure_esd                   FLOAT,
    radiation                      LONGCHAR,
    reflns_used                    INTEGER,
    temp                           FLOAT,
    temp_esd                       FLOAT,
    theta_max                      FLOAT,
    theta_min                      FLOAT,
    wavelength                     FLOAT
) ;

CREATE INDEX CELL_MEASUREMENT_NDX
    on CELL_MEASUREMENT(entry_key) ;


--
-- TABLE: CELL_MEASUREMENT_REFLN
--

CREATE TABLE CELL_MEASUREMENT_REFLN(
    cell_measurement_refln_key     INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    index_h                        INTEGER,
    index_k                        INTEGER,
    index_l                        INTEGER,
    theta                          FLOAT
) ;

CREATE INDEX CELL_MEASUREMENT_REFLN_NDX
    on CELL_MEASUREMENT_REFLN(entry_key) ;


--
-- TABLE: DIFFRN
--

CREATE TABLE DIFFRN(
    diffrn_key                     INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    ambient_environment            LONGCHAR,
    ambient_pressure               FLOAT,
    ambient_pressure_esd           FLOAT,
    ambient_temp                   FLOAT,
    ambient_temp_details           LONGCHAR,
    ambient_temp_esd               FLOAT,
    crystal_id                     VARCHAR(255),
    crystal_key                    INTEGER,
    crystal_support                LONGCHAR,
    crystal_treatment              LONGCHAR,
    details                        LONGCHAR,
    id                             VARCHAR(255)
) ;

CREATE INDEX DIFFRN_NDX
    on DIFFRN(entry_key) ;


--
-- TABLE: DIFFRN_ATTENUATOR
--

CREATE TABLE DIFFRN_ATTENUATOR(
    diffrn_attenuator_key          INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    code                           VARCHAR(255),
    scale                          FLOAT
) ;

CREATE INDEX DIFFRN_ATTENUATOR_NDX
    on DIFFRN_ATTENUATOR(entry_key) ;


--
-- TABLE: DIFFRN_DETECTOR
--

CREATE TABLE DIFFRN_DETECTOR(
    diffrn_detector_key            INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    details                        LONGCHAR,
    detector                       LONGCHAR,
    diffrn_id                      VARCHAR(255),
    diffrn_key                     INTEGER,
    dtime                          FLOAT,
    type                           LONGCHAR,
    pdbx_collection_date           VARCHAR(255)
) ;

CREATE INDEX DIFFRN_DETECTOR_NDX
    on DIFFRN_DETECTOR(entry_key) ;


--
-- TABLE: DIFFRN_MEASUREMENT
--

CREATE TABLE DIFFRN_MEASUREMENT(
    diffrn_measurement_key         INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    diffrn_id                      VARCHAR(255),
    diffrn_key                     INTEGER,
    details                        LONGCHAR,
    device                         LONGCHAR,
    device_details                 LONGCHAR,
    device_type                    LONGCHAR,
    method                         LONGCHAR,
    specimen_support               LONGCHAR
) ;

CREATE INDEX DIFFRN_MEASUREMENT_NDX
    on DIFFRN_MEASUREMENT(entry_key) ;


--
-- TABLE: DIFFRN_ORIENT_MATRIX
--

CREATE TABLE DIFFRN_ORIENT_MATRIX(
    diffrn_orient_matrix_key       INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    diffrn_id                      VARCHAR(255),
    diffrn_key                     INTEGER,
    type                           LONGCHAR,
    ub_0_0                         FLOAT,
    ub_0_1                         FLOAT,
    ub_0_2                         FLOAT,
    ub_1_0                         FLOAT,
    ub_1_1                         FLOAT,
    ub_1_2                         FLOAT,
    ub_2_0                         FLOAT,
    ub_2_1                         FLOAT,
    ub_2_2                         FLOAT
) ;

CREATE INDEX DIFFRN_ORIENT_MATRIX_NDX
    on DIFFRN_ORIENT_MATRIX(entry_key) ;


--
-- TABLE: DIFFRN_ORIENT_REFLN
--

CREATE TABLE DIFFRN_ORIENT_REFLN(
    diffrn_orient_refln_key        INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    angle_chi                      FLOAT,
    angle_kappa                    FLOAT,
    angle_omega                    FLOAT,
    angle_phi                      FLOAT,
    angle_psi                      FLOAT,
    angle_theta                    FLOAT,
    diffrn_id                      VARCHAR(255),
    diffrn_key                     INTEGER,
    index_h                        INTEGER,
    index_k                        INTEGER,
    index_l                        INTEGER
) ;

CREATE INDEX DIFFRN_ORIENT_REFLN_NDX
    on DIFFRN_ORIENT_REFLN(entry_key) ;


--
-- TABLE: DIFFRN_RADIATION
--

CREATE TABLE DIFFRN_RADIATION(
    diffrn_radiation_key           INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    collimation                    LONGCHAR,
    diffrn_id                      VARCHAR(255),
    diffrn_key                     INTEGER,
    filter_edge                    FLOAT,
    inhomogeneity                  FLOAT,
    monochromator                  LONGCHAR,
    polarisn_norm                  FLOAT,
    polarisn_ratio                 FLOAT,
    probe                          LONGCHAR,
    type                           LONGCHAR,
    xray_symbol                    LONGCHAR,
    wavelength_code_id             VARCHAR(255),
    wavelength_code_key            INTEGER,
    pdbx_monochromatic_or_laue_m_l VARCHAR(255),
    pdbx_wavelength_list           LONGCHAR,
    pdbx_wavelength                LONGCHAR,
    pdbx_diffrn_protocol           LONGCHAR
) ;

CREATE INDEX DIFFRN_RADIATION_NDX
    on DIFFRN_RADIATION(entry_key) ;


--
-- TABLE: DIFFRN_RADIATION_WAVELENGTH
--

CREATE TABLE DIFFRN_RADIATION_WAVELENGTH(
    diffrn_radiation_wavelengt_key INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    id                             VARCHAR(255),
    wavelength                     FLOAT,
    wt                             FLOAT
) ;

CREATE INDEX DIFFRN_RADIATION_WAVELENGT_NDX
    on DIFFRN_RADIATION_WAVELENGTH(entry_key) ;


--
-- TABLE: DIFFRN_REFLN
--

CREATE TABLE DIFFRN_REFLN(
    diffrn_refln_key               INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    angle_chi                      FLOAT,
    angle_kappa                    FLOAT,
    angle_omega                    FLOAT,
    angle_phi                      FLOAT,
    angle_psi                      FLOAT,
    angle_theta                    FLOAT,
    attenuator_code_id             VARCHAR(255),
    attenuator_code_key            INTEGER,
    counts_bg_1                    INTEGER,
    counts_bg_2                    INTEGER,
    counts_net                     INTEGER,
    counts_peak                    INTEGER,
    counts_total                   INTEGER,
    detect_slit_horiz              FLOAT,
    detect_slit_vert               FLOAT,
    diffrn_id                      VARCHAR(255),
    diffrn_key                     INTEGER,
    elapsed_time                   FLOAT,
    id                             VARCHAR(255),
    index_h                        INTEGER,
    index_k                        INTEGER,
    index_l                        INTEGER,
    intensity_net                  FLOAT,
    intensity_sigma                FLOAT,
    scale_group_code_id            VARCHAR(255),
    scale_group_code_key           INTEGER,
    scan_mode                      VARCHAR(255),
    scan_mode_backgd               VARCHAR(255),
    scan_rate                      FLOAT,
    scan_time_backgd               FLOAT,
    scan_width                     FLOAT,
    sint_over_lambda               FLOAT,
    standard_code_id               VARCHAR(255),
    standard_code_key              INTEGER,
    wavelength                     FLOAT,
    wavelength_code_id             VARCHAR(255),
    wavelength_code_key            INTEGER
) ;

CREATE INDEX DIFFRN_REFLN_NDX
    on DIFFRN_REFLN(entry_key) ;


--
-- TABLE: DIFFRN_REFLNS
--

CREATE TABLE DIFFRN_REFLNS(
    diffrn_reflns_key              INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    av_r_equivalents               FLOAT,
    av_sigmaI_over_netI            FLOAT,
    diffrn_id                      VARCHAR(255),
    diffrn_key                     INTEGER,
    limit_min_h                    INTEGER,
    limit_min_k                    INTEGER,
    limit_min_l                    INTEGER,
    limit_max_h                    INTEGER,
    limit_max_k                    INTEGER,
    limit_max_l                    INTEGER,
    number2                        INTEGER,
    reduction_process              LONGCHAR,
    theta_max                      FLOAT,
    theta_min                      FLOAT,
    transf_matrix_0_0              FLOAT,
    transf_matrix_0_1              FLOAT,
    transf_matrix_0_2              FLOAT,
    transf_matrix_1_0              FLOAT,
    transf_matrix_1_1              FLOAT,
    transf_matrix_1_2              FLOAT,
    transf_matrix_2_0              FLOAT,
    transf_matrix_2_1              FLOAT,
    transf_matrix_2_2              FLOAT
) ;

CREATE INDEX DIFFRN_REFLNS_NDX
    on DIFFRN_REFLNS(entry_key) ;


--
-- TABLE: DIFFRN_SCALE_GROUP
--

CREATE TABLE DIFFRN_SCALE_GROUP(
    diffrn_scale_group_key         INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    code                           VARCHAR(255),
    i_net                          FLOAT
) ;

CREATE INDEX DIFFRN_SCALE_GROUP_NDX
    on DIFFRN_SCALE_GROUP(entry_key) ;


--
-- TABLE: DIFFRN_SOURCE
--

CREATE TABLE DIFFRN_SOURCE(
    diffrn_source_key              INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    current2                       FLOAT,
    details                        LONGCHAR,
    diffrn_id                      VARCHAR(255),
    diffrn_key                     INTEGER,
    power                          FLOAT,
    size2                          LONGCHAR,
    source                         LONGCHAR,
    target                         VARCHAR(255),
    type                           LONGCHAR,
    voltage                        FLOAT,
    pdbx_synchrotron_beamline      LONGCHAR,
    pdbx_synchrotron_site          LONGCHAR
) ;

CREATE INDEX DIFFRN_SOURCE_NDX
    on DIFFRN_SOURCE(entry_key) ;


--
-- TABLE: DIFFRN_STANDARD_REFLN
--

CREATE TABLE DIFFRN_STANDARD_REFLN(
    diffrn_standard_refln_key      INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    code                           VARCHAR(255),
    diffrn_id                      VARCHAR(255),
    diffrn_key                     INTEGER,
    index_h                        INTEGER,
    index_k                        INTEGER,
    index_l                        INTEGER
) ;

CREATE INDEX DIFFRN_STANDARD_REFLN_NDX
    on DIFFRN_STANDARD_REFLN(entry_key) ;


--
-- TABLE: DIFFRN_STANDARDS
--

CREATE TABLE DIFFRN_STANDARDS(
    diffrn_standards_key           INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    diffrn_id                      VARCHAR(255),
    diffrn_key                     INTEGER,
    decay_percent                  FLOAT,
    interval_count                 INTEGER,
    interval_time                  FLOAT,
    number2                        INTEGER,
    scale_sigma                    FLOAT
) ;

CREATE INDEX DIFFRN_STANDARDS_NDX
    on DIFFRN_STANDARDS(entry_key) ;


--
-- TABLE: EXPTL
--

CREATE TABLE EXPTL(
    exptl_key                      INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    absorpt_coefficient_mu         FLOAT,
    absorpt_correction_t_max       FLOAT,
    absorpt_correction_t_min       FLOAT,
    absorpt_correction_type        VARCHAR(255),
    absorpt_process_details        LONGCHAR,
    entry_id                       VARCHAR(255),
    crystals_number                INTEGER,
    details                        LONGCHAR,
    method                         LONGCHAR,
    method_details                 LONGCHAR
) ;

CREATE INDEX EXPTL_NDX
    on EXPTL(entry_key) ;


--
-- TABLE: EXPTL_CRYSTAL
--

CREATE TABLE EXPTL_CRYSTAL(
    exptl_crystal_key              INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    colour                         LONGCHAR,
    density_diffrn                 FLOAT,
    density_matthews               FLOAT,
    density_meas                   FLOAT,
    density_meas_temp              FLOAT,
    density_method                 LONGCHAR,
    density_percent_sol            FLOAT,
    description                    LONGCHAR,
    f_000                          INTEGER,
    id                             VARCHAR(255),
    preparation                    LONGCHAR,
    size_max                       FLOAT,
    size_mid                       FLOAT,
    size_min                       FLOAT,
    size_rad                       FLOAT,
    pdbx_crystal_image_url         LONGCHAR,
    pdbx_crystal_image_format      LONGCHAR
) ;

CREATE INDEX EXPTL_CRYSTAL_NDX
    on EXPTL_CRYSTAL(entry_key) ;


--
-- TABLE: EXPTL_CRYSTAL_FACE
--

CREATE TABLE EXPTL_CRYSTAL_FACE(
    exptl_crystal_face_key         INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    crystal_id                     VARCHAR(255),
    crystal_key                    INTEGER,
    diffr_chi                      FLOAT,
    diffr_kappa                    FLOAT,
    diffr_phi                      FLOAT,
    diffr_psi                      FLOAT,
    index_h                        INTEGER,
    index_k                        INTEGER,
    index_l                        INTEGER,
    perp_dist                      FLOAT
) ;

CREATE INDEX EXPTL_CRYSTAL_FACE_NDX
    on EXPTL_CRYSTAL_FACE(entry_key) ;


--
-- TABLE: EXPTL_CRYSTAL_GROW
--

CREATE TABLE EXPTL_CRYSTAL_GROW(
    exptl_crystal_grow_key         INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    apparatus                      LONGCHAR,
    atmosphere                     LONGCHAR,
    crystal_id                     VARCHAR(255),
    crystal_key                    INTEGER,
    details                        LONGCHAR,
    method                         LONGCHAR,
    method_ref                     LONGCHAR,
    ph                             FLOAT,
    pressure                       FLOAT,
    pressure_esd                   FLOAT,
    seeding                        LONGCHAR,
    seeding_ref                    LONGCHAR,
    temp                           FLOAT,
    temp_details                   LONGCHAR,
    temp_esd                       FLOAT,
    time                           LONGCHAR,
    pdbx_details                   LONGCHAR,
    pdbx_pH_range                  LONGCHAR
) ;

CREATE INDEX EXPTL_CRYSTAL_GROW_NDX
    on EXPTL_CRYSTAL_GROW(entry_key) ;


--
-- TABLE: EXPTL_CRYSTAL_GROW_COMP
--

CREATE TABLE EXPTL_CRYSTAL_GROW_COMP(
    exptl_crystal_grow_comp_key    INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    conc                           LONGCHAR,
    details                        LONGCHAR,
    crystal_id                     VARCHAR(255),
    crystal_key                    INTEGER,
    id                             LONGCHAR,
    name                           LONGCHAR,
    sol_id                         LONGCHAR,
    volume                         LONGCHAR
) ;

CREATE INDEX EXPTL_CRYSTAL_GROW_COMP_NDX
    on EXPTL_CRYSTAL_GROW_COMP(entry_key) ;


--
-- TABLE: PHASING
--

CREATE TABLE PHASING(
    phasing_key                    INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    method                         VARCHAR(255)
) ;

CREATE INDEX PHASING_NDX
    on PHASING(entry_key) ;


--
-- TABLE: PHASING_AVERAGING
--

CREATE TABLE PHASING_AVERAGING(
    phasing_averaging_key          INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    details                        LONGCHAR,
    entry_id                       VARCHAR(255),
    method                         LONGCHAR
) ;

CREATE INDEX PHASING_AVERAGING_NDX
    on PHASING_AVERAGING(entry_key) ;


--
-- TABLE: PHASING_ISOMORPHOUS
--

CREATE TABLE PHASING_ISOMORPHOUS(
    phasing_isomorphous_key        INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    details                        LONGCHAR,
    entry_id                       VARCHAR(255),
    method                         LONGCHAR,
    parent                         LONGCHAR
) ;

CREATE INDEX PHASING_ISOMORPHOUS_NDX
    on PHASING_ISOMORPHOUS(entry_key) ;


--
-- TABLE: PHASING_MAD
--

CREATE TABLE PHASING_MAD(
    phasing_mad_key                INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    details                        LONGCHAR,
    entry_id                       VARCHAR(255),
    method                         LONGCHAR
) ;

CREATE INDEX PHASING_MAD_NDX
    on PHASING_MAD(entry_key) ;


--
-- TABLE: PHASING_MAD_CLUST
--

CREATE TABLE PHASING_MAD_CLUST(
    phasing_mad_clust_key          INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    expt_id                        VARCHAR(255),
    expt_key                       INTEGER,
    id                             VARCHAR(255),
    number_set                     INTEGER
) ;

CREATE INDEX PHASING_MAD_CLUST_NDX
    on PHASING_MAD_CLUST(entry_key) ;


--
-- TABLE: PHASING_MAD_EXPT
--

CREATE TABLE PHASING_MAD_EXPT(
    phasing_mad_expt_key           INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    delta_delta_phi                FLOAT,
    delta_phi                      FLOAT,
    delta_phi_sigma                FLOAT,
    id                             VARCHAR(255),
    mean_fom                       FLOAT,
    number_clust                   INTEGER,
    r_normal_all                   FLOAT,
    r_normal_anom_scat             FLOAT
) ;

CREATE INDEX PHASING_MAD_EXPT_NDX
    on PHASING_MAD_EXPT(entry_key) ;


--
-- TABLE: PHASING_MAD_RATIO
--

CREATE TABLE PHASING_MAD_RATIO(
    phasing_mad_ratio_key          INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    d_res_high                     FLOAT,
    d_res_low                      FLOAT,
    expt_id                        VARCHAR(255),
    expt_key                       INTEGER,
    clust_id                       VARCHAR(255),
    clust_key                      INTEGER,
    ratio_one_wl                   FLOAT,
    ratio_one_wl_centric           FLOAT,
    ratio_two_wl                   FLOAT,
    wavelength_1_id                VARCHAR(255),
    wavelength_1_key               INTEGER,
    wavelength_2_id                VARCHAR(255),
    wavelength_2_key               INTEGER
) ;

CREATE INDEX PHASING_MAD_RATIO_NDX
    on PHASING_MAD_RATIO(entry_key) ;


--
-- TABLE: PHASING_MAD_SET
--

CREATE TABLE PHASING_MAD_SET(
    phasing_mad_set_key            INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    clust_id                       VARCHAR(255),
    clust_key                      INTEGER,
    d_res_high                     FLOAT,
    d_res_low                      FLOAT,
    expt_id                        VARCHAR(255),
    expt_key                       INTEGER,
    f_double_prime                 FLOAT,
    f_prime                        FLOAT,
    set_id                         VARCHAR(255),
    set_key                        INTEGER,
    wavelength                     FLOAT,
    wavelength_details             LONGCHAR
) ;

CREATE INDEX PHASING_MAD_SET_NDX
    on PHASING_MAD_SET(entry_key) ;


--
-- TABLE: PHASING_MIR
--

CREATE TABLE PHASING_MIR(
    phasing_mir_key                INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    details                        LONGCHAR,
    entry_id                       VARCHAR(255),
    method                         LONGCHAR
) ;

CREATE INDEX PHASING_MIR_NDX
    on PHASING_MIR(entry_key) ;


--
-- TABLE: PHASING_MIR_DER
--

CREATE TABLE PHASING_MIR_DER(
    phasing_mir_der_key            INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    d_res_high                     FLOAT,
    d_res_low                      FLOAT,
    der_set_id                     VARCHAR(255),
    der_set_key                    INTEGER,
    details                        LONGCHAR,
    id                             LONGCHAR,
    native_set_id                  VARCHAR(255),
    native_set_key                 INTEGER,
    number_of_sites                INTEGER,
    reflns_criteria                LONGCHAR
) ;

CREATE INDEX PHASING_MIR_DER_NDX
    on PHASING_MIR_DER(entry_key) ;


--
-- TABLE: PHASING_MIR_DER_REFLN
--

CREATE TABLE PHASING_MIR_DER_REFLN(
    phasing_mir_der_refln_key      INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    der_id                         VARCHAR(255),
    der_key                        INTEGER,
    f_calc                         FLOAT,
    f_calc_au                      FLOAT,
    f_meas                         FLOAT,
    f_meas_au                      FLOAT,
    f_meas_sigma                   FLOAT,
    f_meas_sigma_au                FLOAT,
    hl_a_iso                       FLOAT,
    hl_b_iso                       FLOAT,
    hl_c_iso                       FLOAT,
    hl_d_iso                       FLOAT,
    index_h                        INTEGER,
    index_k                        INTEGER,
    index_l                        INTEGER,
    phase_calc                     FLOAT,
    set_id                         VARCHAR(255),
    set_key                        INTEGER
) ;

CREATE INDEX PHASING_MIR_DER_REFLN_NDX
    on PHASING_MIR_DER_REFLN(entry_key) ;


--
-- TABLE: PHASING_MIR_DER_SHELL
--

CREATE TABLE PHASING_MIR_DER_SHELL(
    phasing_mir_der_shell_key      INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    d_res_high                     FLOAT,
    d_res_low                      FLOAT,
    der_id                         VARCHAR(255),
    der_key                        INTEGER,
    fom                            FLOAT,
    ha_ampl                        FLOAT,
    loc                            FLOAT,
    phase                          FLOAT,
    power                          FLOAT,
    r_cullis                       FLOAT,
    r_kraut                        FLOAT,
    reflns                         INTEGER
) ;

CREATE INDEX PHASING_MIR_DER_SHELL_NDX
    on PHASING_MIR_DER_SHELL(entry_key) ;


--
-- TABLE: PHASING_MIR_DER_SITE
--

CREATE TABLE PHASING_MIR_DER_SITE(
    phasing_mir_der_site_key       INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    atom_type_symbol_id            VARCHAR(255),
    atom_type_symbol_key           INTEGER,
    b_iso                          FLOAT,
    b_iso_esd                      FLOAT,
    cartn_x                        FLOAT,
    cartn_y                        FLOAT,
    cartn_z                        FLOAT,
    cartn_esd_x                    FLOAT,
    cartn_esd_y                    FLOAT,
    cartn_esd_z                    FLOAT,
    der_id                         VARCHAR(255),
    der_key                        INTEGER,
    details                        LONGCHAR,
    fract_x                        FLOAT,
    fract_y                        FLOAT,
    fract_z                        FLOAT,
    fract_esd_x                    FLOAT,
    fract_esd_y                    FLOAT,
    fract_esd_z                    FLOAT,
    id                             VARCHAR(255),
    occupancy                      FLOAT
) ;

CREATE INDEX PHASING_MIR_DER_SITE_NDX
    on PHASING_MIR_DER_SITE(entry_key) ;


--
-- TABLE: PHASING_MIR_SHELL
--

CREATE TABLE PHASING_MIR_SHELL(
    phasing_mir_shell_key          INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    d_res_high                     FLOAT,
    d_res_low                      FLOAT,
    fom                            FLOAT,
    loc                            FLOAT,
    mean_phase                     FLOAT,
    power                          FLOAT,
    r_cullis                       FLOAT,
    r_kraut                        FLOAT,
    reflns                         INTEGER
) ;

CREATE INDEX PHASING_MIR_SHELL_NDX
    on PHASING_MIR_SHELL(entry_key) ;


--
-- TABLE: PHASING_SET
--

CREATE TABLE PHASING_SET(
    phasing_set_key                INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    cell_length_a                  FLOAT,
    cell_length_b                  FLOAT,
    cell_length_c                  FLOAT,
    cell_angle_alpha               FLOAT,
    cell_angle_beta                FLOAT,
    cell_angle_gamma               FLOAT,
    detector_specific              LONGCHAR,
    detector_type                  LONGCHAR,
    id                             LONGCHAR,
    radiation_source_specific      LONGCHAR,
    radiation_wavelength           FLOAT,
    temp                           FLOAT
) ;

CREATE INDEX PHASING_SET_NDX
    on PHASING_SET(entry_key) ;


--
-- TABLE: PHASING_SET_REFLN
--

CREATE TABLE PHASING_SET_REFLN(
    phasing_set_refln_key          INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    set_id                         VARCHAR(255),
    set_key                        INTEGER,
    f_meas                         FLOAT,
    f_meas_au                      FLOAT,
    f_meas_sigma                   FLOAT,
    f_meas_sigma_au                FLOAT,
    index_h                        INTEGER,
    index_k                        INTEGER,
    index_l                        INTEGER
) ;

CREATE INDEX PHASING_SET_REFLN_NDX
    on PHASING_SET_REFLN(entry_key) ;


--
-- TABLE: REFINE
--

CREATE TABLE REFINE(
    refine_key                     INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    aniso_b_0_0                    FLOAT,
    aniso_b_0_1                    FLOAT,
    aniso_b_0_2                    FLOAT,
    aniso_b_1_1                    FLOAT,
    aniso_b_1_2                    FLOAT,
    aniso_b_2_2                    FLOAT,
    b_iso_max                      FLOAT,
    b_iso_mean                     FLOAT,
    b_iso_min                      FLOAT,
    entry_id                       VARCHAR(255),
    details                        LONGCHAR,
    diff_density_max               FLOAT,
    diff_density_max_esd           FLOAT,
    diff_density_min               FLOAT,
    diff_density_min_esd           FLOAT,
    diff_density_rms               FLOAT,
    diff_density_rms_esd           FLOAT,
    ls_abs_structure_details       LONGCHAR,
    ls_abs_structure_flack         FLOAT,
    ls_abs_structure_flack_esd     FLOAT,
    ls_abs_structure_rogers        FLOAT,
    ls_abs_structure_rogers_esd    FLOAT,
    ls_d_res_high                  FLOAT,
    ls_d_res_low                   FLOAT,
    ls_extinction_coef             FLOAT,
    ls_extinction_coef_esd         FLOAT,
    ls_extinction_expression       LONGCHAR,
    ls_extinction_method           LONGCHAR,
    ls_goodness_of_fit_all         FLOAT,
    ls_goodness_of_fit_all_esd     FLOAT,
    ls_goodness_of_fit_obs         FLOAT,
    ls_goodness_of_fit_obs_esd     FLOAT,
    ls_hydrogen_treatment          VARCHAR(255),
    ls_matrix_type                 VARCHAR(255),
    ls_number_constraints          INTEGER,
    ls_number_parameters           INTEGER,
    ls_number_reflns_all           INTEGER,
    ls_number_reflns_obs           INTEGER,
    ls_number_reflns_r_free        INTEGER,
    ls_number_reflns_r_work        INTEGER,
    ls_number_restraints           INTEGER,
    ls_percent_reflns_obs          FLOAT,
    ls_percent_reflns_r_free       FLOAT,
    ls_r_factor_all                FLOAT,
    ls_r_factor_obs                FLOAT,
    ls_r_factor_r_free             FLOAT,
    ls_r_factor_r_free_error       FLOAT,
    ls_r_factor_r_free_error_detai LONGCHAR,
    ls_r_factor_r_work             FLOAT,
    ls_r_fsqd_factor_obs           FLOAT,
    ls_r_i_factor_obs              FLOAT,
    ls_redundancy_reflns_all       INTEGER,
    ls_redundancy_reflns_obs       INTEGER,
    ls_restrained_s_all            FLOAT,
    ls_restrained_s_obs            FLOAT,
    ls_shift_over_esd_max          FLOAT,
    ls_shift_over_esd_mean         FLOAT,
    ls_structure_factor_coef       VARCHAR(255),
    ls_weighting_details           LONGCHAR,
    ls_weighting_scheme            VARCHAR(255),
    ls_wr_factor_all               FLOAT,
    ls_wr_factor_obs               FLOAT,
    ls_wr_factor_r_free            FLOAT,
    ls_wr_factor_r_work            FLOAT,
    occupancy_max                  FLOAT,
    occupancy_min                  FLOAT,
    solvent_model_details          LONGCHAR,
    solvent_model_param_bsol       FLOAT,
    solvent_model_param_ksol       FLOAT,
    pdbx_ls_sigma_I                FLOAT,
    pdbx_ls_sigma_F                FLOAT,
    pdbx_data_cutoff_high_absF     FLOAT,
    pdbx_data_cutoff_high_rms_absF FLOAT,
    pdbx_data_cutoff_low_absF      FLOAT,
    pdbx_isotropic_thermal_model   LONGCHAR,
    pdbx_ls_cross_valid_method     LONGCHAR,
    pdbx_method_to_determine_struc LONGCHAR,
    pdbx_starting_model            LONGCHAR,
    pdbx_stereochemistry_target_va LONGCHAR,
    pdbx_R_Free_selection_details  LONGCHAR,
    pdbx_stereochem_target_val_spe LONGCHAR,
    pdbx_overall_ESU_R             FLOAT,
    pdbx_overall_ESU_R_Free        FLOAT,
    pdbx_solvent_vdw_probe_radii   FLOAT,
    pdbx_solvent_ion_probe_radii   FLOAT,
    pdbx_solvent_shrinkage_radii   FLOAT
) ;

CREATE INDEX REFINE_NDX
    on REFINE(entry_key) ;


--
-- TABLE: REFINE_ANALYZE
--

CREATE TABLE REFINE_ANALYZE(
    refine_analyze_key             INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    entry_id                       VARCHAR(255),
    luzzati_coordinate_error_obs   FLOAT,
    luzzati_d_res_low_obs          FLOAT,
    luzzati_sigma_a_obs            FLOAT,
    luzzati_sigma_a_obs_details    LONGCHAR,
    luzzati_coordinate_error_free  FLOAT,
    luzzati_d_res_low_free         FLOAT,
    luzzati_sigma_a_free           FLOAT,
    luzzati_sigma_a_free_details   LONGCHAR,
    number_disordered_residues     FLOAT,
    occupancy_sum_hydrogen         FLOAT,
    occupancy_sum_non_hydrogen     FLOAT
) ;

CREATE INDEX REFINE_ANALYZE_NDX
    on REFINE_ANALYZE(entry_key) ;


--
-- TABLE: REFINE_B_ISO
--

CREATE TABLE REFINE_B_ISO(
    refine_b_iso_key               INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    class_atoms                    LONGCHAR,
    details                        LONGCHAR,
    treatment                      VARCHAR(255),
    value                          FLOAT
) ;

CREATE INDEX REFINE_B_ISO_NDX
    on REFINE_B_ISO(entry_key) ;


--
-- TABLE: REFINE_HIST
--

CREATE TABLE REFINE_HIST(
    refine_hist_key                INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    cycle_id                       VARCHAR(255),
    details                        LONGCHAR,
    d_res_high                     FLOAT,
    d_res_low                      FLOAT,
    number_atoms_solvent           INTEGER,
    number_atoms_total             INTEGER,
    number_reflns_all              INTEGER,
    number_reflns_obs              INTEGER,
    number_reflns_R_free           INTEGER,
    number_reflns_R_work           INTEGER,
    r_factor_all                   FLOAT,
    r_factor_obs                   FLOAT,
    r_factor_r_free                FLOAT,
    r_factor_r_work                FLOAT,
    pdbx_number_atoms_protein      INTEGER,
    pdbx_number_atoms_nucleic_acid INTEGER,
    pdbx_number_atoms_ligand       INTEGER,
    pdbx_number_atoms_lipid        INTEGER,
    pdbx_number_atoms_carb         INTEGER,
    pdbx_pseudo_atom_details       LONGCHAR
) ;

CREATE INDEX REFINE_HIST_NDX
    on REFINE_HIST(entry_key) ;


--
-- TABLE: REFINE_LS_RESTR
--

CREATE TABLE REFINE_LS_RESTR(
    refine_ls_restr_key            INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    criterion                      LONGCHAR,
    dev_ideal                      FLOAT,
    number2                        INTEGER,
    rejects                        INTEGER,
    dev_ideal_target               FLOAT,
    type                           LONGCHAR,
    weight                         FLOAT
) ;

CREATE INDEX REFINE_LS_RESTR_NDX
    on REFINE_LS_RESTR(entry_key) ;


--
-- TABLE: REFINE_LS_RESTR_NCS
--

CREATE TABLE REFINE_LS_RESTR_NCS(
    refine_ls_restr_ncs_key        INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    dom_id                         VARCHAR(255),
    ncs_model_details              LONGCHAR,
    weight_position                FLOAT,
    weight_b_iso                   FLOAT,
    rms_dev_position               FLOAT,
    rms_dev_b_iso                  FLOAT
) ;

CREATE INDEX REFINE_LS_RESTR_NCS_NDX
    on REFINE_LS_RESTR_NCS(entry_key) ;


--
-- TABLE: REFINE_LS_SHELL
--

CREATE TABLE REFINE_LS_SHELL(
    refine_ls_shell_key            INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    d_res_high                     FLOAT,
    d_res_low                      FLOAT,
    number_reflns_all              INTEGER,
    number_reflns_obs              INTEGER,
    number_reflns_r_free           INTEGER,
    number_reflns_r_work           INTEGER,
    percent_reflns_obs             FLOAT,
    percent_reflns_r_free          FLOAT,
    r_factor_all                   FLOAT,
    r_factor_obs                   FLOAT,
    r_factor_r_free                FLOAT,
    r_factor_r_free_error          FLOAT,
    r_factor_r_work                FLOAT,
    redundancy_reflns_all          INTEGER,
    redundancy_reflns_obs          INTEGER,
    wr_factor_all                  FLOAT,
    wr_factor_obs                  FLOAT,
    wr_factor_r_free               FLOAT,
    wr_factor_r_work               FLOAT,
    pdbx_total_number_of_bins_used INTEGER
) ;

CREATE INDEX REFINE_LS_SHELL_NDX
    on REFINE_LS_SHELL(entry_key) ;


--
-- TABLE: REFINE_OCCUPANCY
--

CREATE TABLE REFINE_OCCUPANCY(
    refine_occupancy_key           INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    class_atoms                    LONGCHAR,
    details                        LONGCHAR,
    treatment                      VARCHAR(255),
    value                          FLOAT
) ;

CREATE INDEX REFINE_OCCUPANCY_NDX
    on REFINE_OCCUPANCY(entry_key) ;


--
-- TABLE: PDBX_REFINE
--

CREATE TABLE PDBX_REFINE(
    pdbx_refine_key                INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    entry_id                       VARCHAR(255),
    R_factor_all_no_cutoff         FLOAT,
    R_factor_obs_no_cutoff         FLOAT,
    free_R_factor_4sig_cutoff      FLOAT,
    free_R_factor_no_cutoff        FLOAT,
    free_R_val_test_set_size_perc_ FLOAT,
    free_R_val_test_set_ct_no_cuto FLOAT,
    number_reflns_obs_no_cutoff    FLOAT,
    R_factor_all_4sig_cutoff       FLOAT,
    R_factor_obs_4sig_cutoff       FLOAT,
    free_R_val_4sig_cutoff         FLOAT,
    free2_R_val_test_set_size_perc FLOAT,
    free_R_val_test_set_ct_4sig_cu FLOAT,
    number_reflns_obs_4sig_cutoff  FLOAT
) ;

CREATE INDEX PDBX_REFINE_NDX
    on PDBX_REFINE(entry_key) ;


--
-- TABLE: PDBX_XPLOR_FILE
--

CREATE TABLE PDBX_XPLOR_FILE(
    pdbx_xplor_file_key            INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    serial_no                      VARCHAR(255),
    param_file                     LONGCHAR,
    topol_file                     LONGCHAR
) ;

CREATE INDEX PDBX_XPLOR_FILE_NDX
    on PDBX_XPLOR_FILE(entry_key) ;


--
-- TABLE: PDBX_REFINE_AUX_FILE
--

CREATE TABLE PDBX_REFINE_AUX_FILE(
    pdbx_refine_aux_file_key       INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    serial_no                      VARCHAR(255),
    file_name                      LONGCHAR,
    file_type                      LONGCHAR
) ;

CREATE INDEX PDBX_REFINE_AUX_FILE_NDX
    on PDBX_REFINE_AUX_FILE(entry_key) ;


--
-- TABLE: PDBX_REFINE_TLS
--

CREATE TABLE PDBX_REFINE_TLS(
    pdbx_refine_tls_key            INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    t_0_0                          FLOAT,
    t_0_1                          FLOAT,
    t_0_2                          FLOAT,
    t_1_1                          FLOAT,
    t_1_2                          FLOAT,
    t_2_2                          FLOAT,
    t_esd_0_0                      FLOAT,
    t_esd_0_1                      FLOAT,
    t_esd_0_2                      FLOAT,
    t_esd_1_1                      FLOAT,
    t_esd_1_2                      FLOAT,
    t_esd_2_2                      FLOAT,
    l_0_0                          FLOAT,
    l_0_1                          FLOAT,
    l_0_2                          FLOAT,
    l_1_1                          FLOAT,
    l_1_2                          FLOAT,
    l_2_2                          FLOAT,
    l_esd_0_0                      FLOAT,
    l_esd_0_1                      FLOAT,
    l_esd_0_2                      FLOAT,
    l_esd_1_1                      FLOAT,
    l_esd_1_2                      FLOAT,
    l_esd_2_2                      FLOAT,
    s_0_0                          FLOAT,
    s_0_1                          FLOAT,
    s_0_2                          FLOAT,
    s_1_1                          FLOAT,
    s_1_2                          FLOAT,
    s_2_2                          FLOAT,
    s_esd_0_0                      FLOAT,
    s_esd_0_1                      FLOAT,
    s_esd_0_2                      FLOAT,
    s_esd_1_1                      FLOAT,
    s_esd_1_2                      FLOAT,
    s_esd_2_2                      FLOAT
) ;

CREATE INDEX PDBX_REFINE_TLS_NDX
    on PDBX_REFINE_TLS(entry_key) ;


--
-- TABLE: PDBX_REFINE_TLS_GROUP
--

CREATE TABLE PDBX_REFINE_TLS_GROUP(
    pdbx_refine_tls_group_key      INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    id                             VARCHAR(255),
    refine_tls_id                  VARCHAR(255),
    beg_label_asym_id              VARCHAR(255),
    beg_label_asym_key             INTEGER,
    beg_label_seq_id               VARCHAR(255),
    beg_label_seq_key              INTEGER,
    beg_auth_seq_id                VARCHAR(255),
    beg_auth_seq_key               INTEGER,
    end_label_asym_id              VARCHAR(255),
    end_label_asym_key             INTEGER,
    end_label_seq_id               VARCHAR(255),
    end_label_seq_key              INTEGER,
    end_auth_seq_id                VARCHAR(255),
    end_auth_seq_key               INTEGER,
    selection                      VARCHAR(255)
) ;

CREATE INDEX PDBX_REFINE_TLS_GROUP_NDX
    on PDBX_REFINE_TLS_GROUP(entry_key) ;


--
-- TABLE: REFLN
--

CREATE TABLE REFLN(
    refln_key                      INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    a_calc                         FLOAT,
    a_calc_au                      FLOAT,
    a_meas                         FLOAT,
    a_meas_au                      FLOAT,
    b_calc                         FLOAT,
    b_calc_au                      FLOAT,
    b_meas                         FLOAT,
    b_meas_au                      FLOAT,
    crystal_id                     VARCHAR(255),
    crystal_key                    INTEGER,
    f_calc                         FLOAT,
    f_calc_au                      FLOAT,
    f_meas                         FLOAT,
    f_meas_au                      FLOAT,
    f_meas_sigma                   FLOAT,
    f_meas_sigma_au                FLOAT,
    f_squared_calc                 FLOAT,
    f_squared_meas                 FLOAT,
    f_squared_sigma                FLOAT,
    fom                            FLOAT,
    index_h                        INTEGER,
    index_k                        INTEGER,
    index_l                        INTEGER,
    intensity_calc                 FLOAT,
    intensity_meas                 FLOAT,
    intensity_sigma                FLOAT,
    mean_path_length_tbar          FLOAT,
    status                         VARCHAR(255),
    phase_calc                     FLOAT,
    phase_meas                     FLOAT,
    refinement_status              VARCHAR(255),
    scale_group_code_id            VARCHAR(255),
    scale_group_code_key           INTEGER,
    sint_over_lambda               FLOAT,
    symmetry_epsilon               INTEGER,
    symmetry_multiplicity          INTEGER,
    wavelength                     FLOAT,
    wavelength_code_id             VARCHAR(255),
    wavelength_code_key            INTEGER,
    pdbx_F_calc_part_solvent       FLOAT,
    pdbx_phase_calc_part_solvent   FLOAT,
    pdbx_F_calc_with_solvent       FLOAT,
    pdbx_phase_calc_with_solvent   FLOAT
) ;

CREATE INDEX REFLN_NDX
    on REFLN(entry_key) ;


--
-- TABLE: REFLNS
--

CREATE TABLE REFLNS(
    reflns_key                     INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    b_iso_wilson_estimate          FLOAT,
    entry_id                       VARCHAR(255),
    data_reduction_details         LONGCHAR,
    data_reduction_method          LONGCHAR,
    d_resolution_high              FLOAT,
    d_resolution_low               FLOAT,
    details                        LONGCHAR,
    limit_min_h                    INTEGER,
    limit_min_k                    INTEGER,
    limit_min_l                    INTEGER,
    limit_max_h                    INTEGER,
    limit_max_k                    INTEGER,
    limit_max_l                    INTEGER,
    number_all                     INTEGER,
    number_obs                     INTEGER,
    observed_criterion             LONGCHAR,
    observed_criterion_F_max       FLOAT,
    observed_criterion_F_min       FLOAT,
    observed_criterion_I_max       FLOAT,
    observed_criterion_I_min       FLOAT,
    observed_criterion_sigma_F     FLOAT,
    observed_criterion_sigma_I     FLOAT,
    percent_possible_obs           FLOAT,
    r_free_details                 LONGCHAR,
    rmerge_f_all                   FLOAT,
    rmerge_f_obs                   FLOAT,
    pdbx_redundancy                FLOAT,
    pdbx_Rmerge_I_obs              FLOAT,
    pdbx_Rsym_value                FLOAT,
    pdbx_netI_over_av_sigmaI       FLOAT,
    pdbx_chi_squared               FLOAT,
    pdbx_scaling_rejects           INTEGER,
    pdbx_d_res_high_opt            FLOAT,
    pdbx_d_res_low_opt             FLOAT,
    pdbx_d_res_opt_method          LONGCHAR
) ;

CREATE INDEX REFLNS_NDX
    on REFLNS(entry_key) ;


--
-- TABLE: REFLNS_SCALE
--

CREATE TABLE REFLNS_SCALE(
    reflns_scale_key               INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    group_code                     LONGCHAR,
    meas_f                         FLOAT,
    meas_f_squared                 FLOAT,
    meas_intensity                 FLOAT
) ;

CREATE INDEX REFLNS_SCALE_NDX
    on REFLNS_SCALE(entry_key) ;


--
-- TABLE: REFLNS_SHELL
--

CREATE TABLE REFLNS_SHELL(
    reflns_shell_key               INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    d_res_high                     FLOAT,
    d_res_low                      FLOAT,
    mean_i_over_sig_i_all          FLOAT,
    mean_i_over_sig_i_obs          FLOAT,
    number_measured_all            INTEGER,
    number_measured_obs            INTEGER,
    number_possible                INTEGER,
    number_unique_all              INTEGER,
    number_unique_obs              INTEGER,
    percent_possible_all           FLOAT,
    percent_possible_obs           FLOAT,
    rmerge_f_all                   FLOAT,
    rmerge_f_obs                   FLOAT,
    rmerge_i_all                   FLOAT,
    rmerge_i_obs                   FLOAT,
    pdbx_redundancy                FLOAT,
    pdbx_Rsym_value                FLOAT,
    pdbx_chi_squared               FLOAT
) ;

CREATE INDEX REFLNS_SHELL_NDX
    on REFLNS_SHELL(entry_key) ;


--
-- TABLE: SYMMETRY
--

CREATE TABLE SYMMETRY(
    symmetry_key                   INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    entry_id                       VARCHAR(255),
    cell_setting                   VARCHAR(255),
    int_tables_number              INTEGER,
    space_group_name_hall          LONGCHAR,
    space_group_name_h_m           LONGCHAR,
    pdbx_full_space_group_name_h_m LONGCHAR
) ;

CREATE INDEX SYMMETRY_NDX
    on SYMMETRY(entry_key) ;


--
-- TABLE: SYMMETRY_EQUIV
--

CREATE TABLE SYMMETRY_EQUIV(
    symmetry_equiv_key             INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    id                             VARCHAR(255),
    pos_as_xyz                     LONGCHAR
) ;

CREATE INDEX SYMMETRY_EQUIV_NDX
    on SYMMETRY_EQUIV(entry_key) ;


--
-- TABLE: PDBX_NMR_DETAILS
--

CREATE TABLE PDBX_NMR_DETAILS(
    pdbx_nmr_details_key           INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    entry_id                       VARCHAR(255),
    text                           LONGCHAR
) ;

CREATE INDEX PDBX_NMR_DETAILS_NDX
    on PDBX_NMR_DETAILS(entry_key) ;


--
-- TABLE: PDBX_NMR_SAMPLE_DETAILS
--

CREATE TABLE PDBX_NMR_SAMPLE_DETAILS(
    pdbx_nmr_sample_details_key    INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    solution_id                    VARCHAR(255),
    contents                       LONGCHAR,
    solvent_system                 LONGCHAR
) ;

CREATE INDEX PDBX_NMR_SAMPLE_DETAILS_NDX
    on PDBX_NMR_SAMPLE_DETAILS(entry_key) ;


--
-- TABLE: PDBX_NMR_EXPTL_SAMPLE
--

CREATE TABLE PDBX_NMR_EXPTL_SAMPLE(
    pdbx_nmr_exptl_sample_key      INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    solution_id                    VARCHAR(255),
    component_name                 LONGCHAR,
    concentration                  FLOAT,
    concentration_units            VARCHAR(255),
    isotopic_labeling              LONGCHAR
) ;

CREATE INDEX PDBX_NMR_EXPTL_SAMPLE_NDX
    on PDBX_NMR_EXPTL_SAMPLE(entry_key) ;


--
-- TABLE: PDBX_NMR_EXPTL_SAMPLE_CONDITIONS
--

CREATE TABLE PDBX_NMR_EXPTL_SAMPLE_CONDITIONS(
    pdbx_nmr_exptl_sample_cond_key INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    conditions_id                  VARCHAR(255),
    temperature                    VARCHAR(255),
    pressure_units                 VARCHAR(255),
    pressure                       LONGCHAR,
    pH                             VARCHAR(255),
    ionic_strength                 LONGCHAR
) ;

CREATE INDEX PDBX_NMR_EXPTL_SAMPLE_COND_NDX
    on PDBX_NMR_EXPTL_SAMPLE_CONDITIONS(entry_key) ;


--
-- TABLE: PDBX_NMR_SPECTROMETER
--

CREATE TABLE PDBX_NMR_SPECTROMETER(
    pdbx_nmr_spectrometer_key      INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    spectrometer_id                VARCHAR(255),
    model                          LONGCHAR,
    type                           LONGCHAR,
    manufacturer                   LONGCHAR,
    field_strength                 FLOAT
) ;

CREATE INDEX PDBX_NMR_SPECTROMETER_NDX
    on PDBX_NMR_SPECTROMETER(entry_key) ;


--
-- TABLE: PDBX_NMR_EXPTL
--

CREATE TABLE PDBX_NMR_EXPTL(
    pdbx_nmr_exptl_key             INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    experiment_id                  VARCHAR(255),
    conditions_id                  VARCHAR(255),
    solution_id                    VARCHAR(255),
    type                           LONGCHAR
) ;

CREATE INDEX PDBX_NMR_EXPTL_NDX
    on PDBX_NMR_EXPTL(entry_key) ;


--
-- TABLE: PDBX_NMR_SOFTWARE
--

CREATE TABLE PDBX_NMR_SOFTWARE(
    pdbx_nmr_software_key          INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    classification                 LONGCHAR,
    name                           LONGCHAR,
    version                        LONGCHAR,
    authors                        LONGCHAR
) ;

CREATE INDEX PDBX_NMR_SOFTWARE_NDX
    on PDBX_NMR_SOFTWARE(entry_key) ;


--
-- TABLE: PDBX_NMR_CONSTRAINTS
--

CREATE TABLE PDBX_NMR_CONSTRAINTS(
    pdbx_nmr_constraints_key       INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    entry_id                       VARCHAR(255),
    NOE_constraints_total          INTEGER,
    NOE_intraresidue_total_count   INTEGER,
    NOE_interentity_total_count    INTEGER,
    NOE_sequential_total_count     INTEGER,
    NOE_medium_range_total_count   INTEGER,
    NOE_long_range_total_count     INTEGER,
    protein_phi_angle_constraints_ INTEGER,
    protein_psi_angle_constraints_ INTEGER,
    protein_chi_angle_constraints_ INTEGER,
    protein_other_angle_constraint INTEGER,
    NOE_interproton_distance_evalu LONGCHAR,
    NOE_pseudoatom_corrections     LONGCHAR,
    NOE_motional_averaging_correct LONGCHAR,
    hydrogen_bond_constraints_tota INTEGER,
    disulfide_bond_constraints_tot INTEGER,
    NA_alpha_angle_constraints_tot INTEGER,
    NA_beta_angle_constraints_tota INTEGER,
    NA_gamma_angle_constraints_tot INTEGER,
    NA_delta_angle_constraints_tot INTEGER,
    NA_epsilon_angle_constraints_t INTEGER,
    NA_chi_angle_constraints_total INTEGER,
    NA_other_angle_constraints_tot INTEGER,
    NA_sugar_pucker_constraints_to INTEGER
) ;

CREATE INDEX PDBX_NMR_CONSTRAINTS_NDX
    on PDBX_NMR_CONSTRAINTS(entry_key) ;


--
-- TABLE: PDBX_NMR_ENSEMBLE
--

CREATE TABLE PDBX_NMR_ENSEMBLE(
    pdbx_nmr_ensemble_key          INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    entry_id                       VARCHAR(255),
    conformers_calculated_total_nu INTEGER,
    conformers_submitted_total_num INTEGER,
    conformer_selection_criteria   LONGCHAR,
    representative_conformer       INTEGER,
    average_constraints_per_residu INTEGER,
    average_constraint_violations_ INTEGER,
    maximum_distance_constraint_vi FLOAT,
    average_distance_constraint_vi FLOAT,
    maximum_upper_distance_constra FLOAT,
    maximum_lower_distance_constra FLOAT,
    distance_constraint_violation_ LONGCHAR,
    maximum_torsion_angle_constrai FLOAT,
    average_torsion_angle_constrai FLOAT,
    torsion_angle_constraint_viola LONGCHAR
) ;

CREATE INDEX PDBX_NMR_ENSEMBLE_NDX
    on PDBX_NMR_ENSEMBLE(entry_key) ;


--
-- TABLE: PDBX_NMR_ENSEMBLE_RMS
--

CREATE TABLE PDBX_NMR_ENSEMBLE_RMS(
    pdbx_nmr_ensemble_rms_key      INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    entry_id                       VARCHAR(255),
    residue_range_begin            INTEGER,
    chain_range_begin              VARCHAR(255),
    residue_range_end              INTEGER,
    chain_range_end                VARCHAR(255),
    atom_type                      LONGCHAR,
    distance_rms_dev               FLOAT,
    distance_rms_dev_error         FLOAT,
    covalent_bond_rms_dev          FLOAT,
    covalent_bond_rms_dev_error    FLOAT,
    bond_angle_rms_dev             FLOAT,
    bond_angle_rms_dev_error       FLOAT,
    improper_torsion_angle_rms_dev FLOAT,
    improper2_torsion_angle_rms_de FLOAT,
    peptide_planarity_rms_dev      FLOAT,
    peptide_planarity_rms_dev_erro FLOAT,
    dihedral_angles_rms_dev        FLOAT,
    dihedral_angles_rms_dev_error  FLOAT,
    coord_average_rmsd_method      LONGCHAR
) ;

CREATE INDEX PDBX_NMR_ENSEMBLE_RMS_NDX
    on PDBX_NMR_ENSEMBLE_RMS(entry_key) ;


--
-- TABLE: PDBX_NMR_REPRESENTATIVE
--

CREATE TABLE PDBX_NMR_REPRESENTATIVE(
    pdbx_nmr_representative_key    INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    entry_id                       VARCHAR(255),
    conformer_id                   INTEGER,
    selection_criteria             LONGCHAR
) ;

CREATE INDEX PDBX_NMR_REPRESENTATIVE_NDX
    on PDBX_NMR_REPRESENTATIVE(entry_key) ;


--
-- TABLE: PDBX_NMR_REFINE
--

CREATE TABLE PDBX_NMR_REFINE(
    pdbx_nmr_refine_key            INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    entry_id                       VARCHAR(255),
    method                         LONGCHAR,
    details                        LONGCHAR
) ;

CREATE INDEX PDBX_NMR_REFINE_NDX
    on PDBX_NMR_REFINE(entry_key) ;


--
-- TABLE: PDBX_NMR_FORCE_CONSTANTS
--

CREATE TABLE PDBX_NMR_FORCE_CONSTANTS(
    pdbx_nmr_force_constants_key   INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    entry_id                       VARCHAR(255),
    exptl_distance_term            FLOAT,
    exptl_distance_term_units      VARCHAR(255),
    exptl_torsion_angles_term      FLOAT,
    exptl_torsion_angles_term_unit VARCHAR(255),
    exptl_J_coupling_term          FLOAT,
    exptl_J_coupling_term_units    VARCHAR(255),
    exptl_13C_shift_term           FLOAT,
    exptl_13C_shift_term_units     VARCHAR(255),
    exptl_1H_shift_term            FLOAT,
    exptl_1H_shift_term_units      VARCHAR(255),
    exptl_dipolar_coupling_term    FLOAT,
    exptl_dipolar_coupling_term_un VARCHAR(255),
    exptl_D_isotope_shift_term     FLOAT,
    exptl_D_isotope_shift_term_uni VARCHAR(255),
    covalent_geom_bond_term        FLOAT,
    covalent_geom_bond_term_units  VARCHAR(255),
    covalent_geom_angles_term      FLOAT,
    covalent_geom_angles_term_unit VARCHAR(255),
    covalent_geom_impropers_term   FLOAT,
    covalent_geom_impropers_term_u VARCHAR(255),
    non_bonded_inter_van_der_Waals LONGCHAR,
    non_bonded2_inter_van_der_Waal FLOAT,
    non_bonded3_inter_van_der_Waal VARCHAR(255),
    non_bonded_inter_conf_db_poten FLOAT,
    non_bonded_inter_radius_of_gyr FLOAT,
    non_bonded2_inter_radius_of_gy VARCHAR(255)
) ;

CREATE INDEX PDBX_NMR_FORCE_CONSTANTS_NDX
    on PDBX_NMR_FORCE_CONSTANTS(entry_key) ;


--
-- TABLE: CITATION
--

CREATE TABLE CITATION(
    citation_key                   INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    abstract_text                  LONGCHAR,
    abstract_id_CAS                LONGCHAR,
    book_id_isbn                   LONGCHAR,
    book_publisher                 LONGCHAR,
    book_publisher_city            LONGCHAR,
    book_title                     LONGCHAR,
    coordinate_linkage             VARCHAR(255),
    country                        LONGCHAR,
    database_id_medline            INTEGER,
    details                        LONGCHAR,
    id                             VARCHAR(255),
    journal_abbrev                 LONGCHAR,
    journal_id_astm                LONGCHAR,
    journal_id_csd                 LONGCHAR,
    journal_id_issn                LONGCHAR,
    journal_full                   LONGCHAR,
    journal_issue                  LONGCHAR,
    journal_volume                 LONGCHAR,
    language                       LONGCHAR,
    page_first                     LONGCHAR,
    page_last                      LONGCHAR,
    title                          LONGCHAR,
    year                           INTEGER
) ;

CREATE INDEX CITATION_NDX
    on CITATION(entry_key) ;


--
-- TABLE: CITATION_AUTHOR
--

CREATE TABLE CITATION_AUTHOR(
    citation_author_key            INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    citation_id                    VARCHAR(255),
    citation_key                   INTEGER,
    name                           LONGCHAR,
    ordinal                        INTEGER
) ;

CREATE INDEX CITATION_AUTHOR_NDX
    on CITATION_AUTHOR(entry_key) ;


--
-- TABLE: CITATION_EDITOR
--

CREATE TABLE CITATION_EDITOR(
    citation_editor_key            INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    citation_id                    VARCHAR(255),
    citation_key                   INTEGER,
    name                           LONGCHAR,
    ordinal                        INTEGER
) ;

CREATE INDEX CITATION_EDITOR_NDX
    on CITATION_EDITOR(entry_key) ;


--
-- TABLE: DATABASE_2
--

CREATE TABLE DATABASE_2(
    database_2_key                 INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    database_id                    VARCHAR(255),
    database_code                  LONGCHAR
) ;

CREATE INDEX DATABASE_2_NDX
    on DATABASE_2(entry_key) ;


--
-- TABLE: DATABASE_PDB_CAVEAT
--

CREATE TABLE DATABASE_PDB_CAVEAT(
    database_pdb_caveat_key        INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    id                             INTEGER,
    text                           LONGCHAR
) ;

CREATE INDEX DATABASE_PDB_CAVEAT_NDX
    on DATABASE_PDB_CAVEAT(entry_key) ;


--
-- TABLE: DATABASE_PDB_MATRIX
--

CREATE TABLE DATABASE_PDB_MATRIX(
    database_pdb_matrix_key        INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    entry_id                       VARCHAR(255),
    origx_0_0                      FLOAT,
    origx_0_1                      FLOAT,
    origx_0_2                      FLOAT,
    origx_1_0                      FLOAT,
    origx_1_1                      FLOAT,
    origx_1_2                      FLOAT,
    origx_2_0                      FLOAT,
    origx_2_1                      FLOAT,
    origx_2_2                      FLOAT,
    origx_vector_0                 FLOAT,
    origx_vector_1                 FLOAT,
    origx_vector_2                 FLOAT,
    scale_0_0                      FLOAT,
    scale_0_1                      FLOAT,
    scale_0_2                      FLOAT,
    scale_1_0                      FLOAT,
    scale_1_1                      FLOAT,
    scale_1_2                      FLOAT,
    scale_2_0                      FLOAT,
    scale_2_1                      FLOAT,
    scale_2_2                      FLOAT,
    scale_vector_0                 FLOAT,
    scale_vector_1                 FLOAT,
    scale_vector_2                 FLOAT
) ;

CREATE INDEX DATABASE_PDB_MATRIX_NDX
    on DATABASE_PDB_MATRIX(entry_key) ;


--
-- TABLE: DATABASE_PDB_REMARK
--

CREATE TABLE DATABASE_PDB_REMARK(
    database_pdb_remark_key        INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    id                             INTEGER,
    text                           LONGCHAR
) ;

CREATE INDEX DATABASE_PDB_REMARK_NDX
    on DATABASE_PDB_REMARK(entry_key) ;


--
-- TABLE: DATABASE_PDB_REV
--

CREATE TABLE DATABASE_PDB_REV(
    database_pdb_rev_key           INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    author_name                    LONGCHAR,
    date2                          CHAR(10),
    date_original                  CHAR(10),
    mod_type                       INTEGER,
    num                            INTEGER,
    replaced_by                    LONGCHAR,
    replaces                       LONGCHAR,
    status                         LONGCHAR
) ;

CREATE INDEX DATABASE_PDB_REV_NDX
    on DATABASE_PDB_REV(entry_key) ;


--
-- TABLE: DATABASE_PDB_REV_RECORD
--

CREATE TABLE DATABASE_PDB_REV_RECORD(
    database_pdb_rev_record_key    INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    details                        LONGCHAR,
    rev_num_id                     VARCHAR(255),
    rev_num_key                    INTEGER,
    type                           LONGCHAR
) ;

CREATE INDEX DATABASE_PDB_REV_RECORD_NDX
    on DATABASE_PDB_REV_RECORD(entry_key) ;


--
-- TABLE: DATABASE_PDB_TVECT
--

CREATE TABLE DATABASE_PDB_TVECT(
    database_pdb_tvect_key         INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    details                        LONGCHAR,
    id                             VARCHAR(255),
    vector_0                       FLOAT,
    vector_1                       FLOAT,
    vector_2                       FLOAT
) ;

CREATE INDEX DATABASE_PDB_TVECT_NDX
    on DATABASE_PDB_TVECT(entry_key) ;


--
-- TABLE: PDBX_DATABASE_MESSAGE
--

CREATE TABLE PDBX_DATABASE_MESSAGE(
    pdbx_database_message_key      INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    entry_id                       VARCHAR(255),
    message_id                     LONGCHAR,
    content_type                   VARCHAR(255),
    message_type                   VARCHAR(255),
    sender                         LONGCHAR,
    sender_address_fax             VARCHAR(255),
    sender_address_phone           VARCHAR(255),
    sender_address_email           VARCHAR(255),
    sender_address_mail            LONGCHAR,
    receiver                       LONGCHAR,
    receiver_address_fax           VARCHAR(255),
    receiver_address_phone         VARCHAR(255),
    receiver_address_email         VARCHAR(255),
    receiver_address_mail          LONGCHAR,
    message                        LONGCHAR
) ;

CREATE INDEX PDBX_DATABASE_MESSAGE_NDX
    on PDBX_DATABASE_MESSAGE(entry_key) ;


--
-- TABLE: PDBX_DATABASE_PDB_OBS_SPR
--

CREATE TABLE PDBX_DATABASE_PDB_OBS_SPR(
    pdbx_database_pdb_obs_spr_key  INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    id                             VARCHAR(255),
    date2                          VARCHAR(255),
    pdb_id                         VARCHAR(255),
    replace_pdb_id                 VARCHAR(255)
) ;

CREATE INDEX PDBX_DATABASE_PDB_OBS_SPR_NDX
    on PDBX_DATABASE_PDB_OBS_SPR(entry_key) ;


--
-- TABLE: PDBX_DATABASE_PROC
--

CREATE TABLE PDBX_DATABASE_PROC(
    pdbx_database_proc_key         INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    entry_id                       VARCHAR(255),
    cycle_id                       VARCHAR(255),
    date_begin_cycle               VARCHAR(255),
    date_end_cycle                 VARCHAR(255),
    details                        LONGCHAR
) ;

CREATE INDEX PDBX_DATABASE_PROC_NDX
    on PDBX_DATABASE_PROC(entry_key) ;


--
-- TABLE: PDBX_DATABASE_REMARK
--

CREATE TABLE PDBX_DATABASE_REMARK(
    pdbx_database_remark_key       INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    id                             INTEGER,
    text                           LONGCHAR
) ;

CREATE INDEX PDBX_DATABASE_REMARK_NDX
    on PDBX_DATABASE_REMARK(entry_key) ;


--
-- TABLE: PDBX_DATABASE_STATUS
--

CREATE TABLE PDBX_DATABASE_STATUS(
    pdbx_database_status_key       INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    status_code                    VARCHAR(255),
    author_release_status_code     VARCHAR(255),
    dep_release_code_coordinates   LONGCHAR,
    dep_release_code_sequence      LONGCHAR,
    dep_release_code_struct_fact   LONGCHAR,
    dep_release_code_nmr_constrain LONGCHAR,
    entry_id                       VARCHAR(255),
    recvd_deposit_form             CHAR(1),
    date_deposition_form           VARCHAR(255),
    recvd_coordinates              CHAR(1),
    date_coordinates               VARCHAR(255),
    recvd_struct_fact              CHAR(1),
    date_struct_fact               VARCHAR(255),
    recvd_nmr_constraints          CHAR(1),
    date_nmr_constraints           VARCHAR(255),
    recvd_internal_approval        CHAR(1),
    recvd_manuscript               CHAR(1),
    date_manuscript                VARCHAR(255),
    name_depositor                 LONGCHAR,
    recvd_author_approval          CHAR(1),
    author_approval_type           VARCHAR(255),
    date_author_approval           VARCHAR(255),
    recvd_initial_deposition_date  VARCHAR(255),
    date_submitted                 VARCHAR(255),
    rcsb_annotator                 VARCHAR(255),
    date_of_PDB_release            VARCHAR(255),
    date_hold_coordinates          VARCHAR(255),
    date_hold_struct_fact          VARCHAR(255),
    date_hold_nmr_constraints      VARCHAR(255),
    hold_for_publication           CHAR(1),
    pdb_date_of_author_approval    VARCHAR(255),
    deposit_site                   VARCHAR(255),
    process_site                   VARCHAR(255)
) ;

CREATE INDEX PDBX_DATABASE_STATUS_NDX
    on PDBX_DATABASE_STATUS(entry_key) ;


--
-- TABLE: PDBX_DATABASE_RELATED
--

CREATE TABLE PDBX_DATABASE_RELATED(
    pdbx_database_related_key      INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    db_name                        VARCHAR(255),
    details                        LONGCHAR,
    db_id                          LONGCHAR,
    content_type                   LONGCHAR
) ;

CREATE INDEX PDBX_DATABASE_RELATED_NDX
    on PDBX_DATABASE_RELATED(entry_key) ;


--
-- TABLE: COMPUTING
--

CREATE TABLE COMPUTING(
    computing_key                  INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    entry_id                       VARCHAR(255),
    cell_refinement                LONGCHAR,
    data_collection                LONGCHAR,
    data_reduction                 LONGCHAR,
    molecular_graphics             LONGCHAR,
    publication_material           LONGCHAR,
    structure_refinement           LONGCHAR,
    structure_solution             LONGCHAR,
    pdbx_structure_refinement_meth LONGCHAR,
    pdbx_data_reduction_ii         LONGCHAR,
    pdbx_data_reduction_ds         LONGCHAR
) ;

CREATE INDEX COMPUTING_NDX
    on COMPUTING(entry_key) ;


--
-- TABLE: SOFTWARE
--

CREATE TABLE SOFTWARE(
    software_key                   INTEGER        NOT NULL  PRIMARY KEY,
    entry_key                      INTEGER        NOT NULL,
    citation_id                    VARCHAR(255),
    citation_key                   INTEGER,
    classification                 LONGCHAR,
    compiler_name                  LONGCHAR,
    compiler_version               LONGCHAR,
    contact_author                 LONGCHAR,
    contact_author_email           LONGCHAR,
    date2                          LONGCHAR,
    description                    LONGCHAR,
    dependencies                   LONGCHAR,
    hardware                       LONGCHAR,
    language                       LONGCHAR,
    location                       LONGCHAR,
    mods                           LONGCHAR,
    name                           LONGCHAR,
    os                             LONGCHAR,
    os_version                     LONGCHAR,
    type                           LONGCHAR,
    version                        LONGCHAR
) ;

CREATE INDEX SOFTWARE_NDX
    on SOFTWARE(entry_key) ;
