freight shipment delivery table structure

freight shipment delivery table structure#

Join table matching freight shipments and deliveries

Table Structure#

Field

Type

NULL allowed

Default Value

Foreign key

Description

shipment_id*

INTEGER

NO

Shipment id (foreign key to freight_shipment table)

tour_id

INTEGER

NO

Tour id (foreign key to freight_delivery table)

leg_id

INTEGER

NO

Leg id in a tour (foreign key to freight_delivery table)

(* - Primary key)

The SQL statement for table and index creation is below.

CREATE TABLE Freight_Shipment_Delivery (
    "shipment_id"  INTEGER NOT NULL,
    "tour_id"      INTEGER NOT NULL,
    "leg_id"       INTEGER NOT NULL,

    PRIMARY KEY (shipment_id, tour_id, leg_id)

)