Database Answers Header

Hotel Database SQL Scripts (for Oracle)

Chateau Laurier,Ottawa,Canada

  • Home
  • Ask a Question
  • Data Models
  • FAQs
  • SQL Scripts
  • StateOfTheArt
  • Search
  • Site Map

    Underwater in Fiji
  • CREATE TABLE hotels ...
    -- ============================================================
    --   Project name :  HOTEL_INFORMATION_WEB_SITE                
    --   DBMS name    :  ORACLE Version 8                          
    --   Created on   :  21 Jan 2001  10:10 am                           
    -- ============================================================
    -- ============================================================
    --   Table: HOTEL_CHAIN                                        
    -- ============================================================
    create table HOTEL_CHAINS
    (
        HOTEL_CHAIN_ID              INTEGER                not null,
        HOTEL_CHAIN_CODE            CHAR(10)               null    ,
        HOTEL_CHAIN_NAME            VARCHAR2(50)           null    ,
        constraint PK_HOTEL_CHAIN primary key (HOTEL_CHAIN_ID)
    )
    /
    -- ============================================================
    --   Table: REF_HOTEL_CHARACTERISTICS                          
    -- ============================================================
    create table REF_HOTEL_CHARACTERISTICS
    (
        CHARACTERISTIC_ID           INTEGER                not null,
        CHARACTERISTIC_CODE         CHAR(10)               null    ,
        CHARACTERISTIC_DESCRIPTION  VARCHAR2(50)           null    ,
        constraint PK_REF_HOTEL_CHARACTERISTICS primary key (CHARACTERISTIC_ID)
    )
    /
    -- ============================================================
    --   Table: REF_COUNTRY                                        
    -- ============================================================
    create table REF_COUNTRYS
    (
        COUNTRY_CODE                CHAR(3)                not null,
        COUNTRY_CURRENCY            CHAR(10)               null    ,
        COUNTRY_NAME                VARCHAR2(50)           null    ,
        constraint PK_REF_COUNTRY primary key (COUNTRY_CODE)
    )
    /
    -- ============================================================
    --   Table: REF_STAR_RATING                                    
    -- ============================================================
    create table REF_STAR_RATINGS
    (
        STAR_RATING_ID              INTEGER                not null,
        STAR_RATING_CODE            CHAR(8)                null    ,
        STAR_RATING_IMAGE           CHAR(20)               null    ,
        constraint PK_REF_STAR_RATING primary key (STAR_RATING_ID)
    )
    /
    -- ============================================================
    --   Table: HOTEL                                              
    -- ============================================================
    create table HOTELS
    (
        HOTEL_ID                    INTEGER                not null,
        COUNTRY_CODE                CHAR(3)                not null,
        STAR_RATING_ID              INTEGER                not null,
        HOTEL_CHAIN_ID              INTEGER                null    ,
        HOTEL_CODE                  CHAR(10)               null    ,
        HOTEL_NAME                  VARCHAR2(50)           null    ,
        constraint PK_HOTEL primary key (HOTEL_ID)
    )
    /
    -- ============================================================
    --   Table: HOTEL_CHARACTERISTICS                              
    -- ============================================================
    create table HOTEL_CHARACTERISTICS
    (
        CHARACTERISTIC_ID           INTEGER                not null,
        HOTEL_ID                    INTEGER                not null,
        constraint PK_HOTEL_CHARACTERISTICS primary key (CHARACTERISTIC_ID, HOTEL_ID)
    )
    /
    

    Barry Williams
    Principal Consultant
    Database Answers
    London, England


    [ Home Page | Ask Us a Question | Day in the Life | Email Us | FAQs | Search & Site Map ]

    © Database Answers Ltd. 2001