shipment delivery table structure

shipment delivery table structure#

Join table matching freight shipments and deliveries

Table Structure#

Field

Type

NULL allowed

Default Value

Foreign key

Description

shipment*

INTEGER

NO

Shipment id (foreign key to shipment table)

shipment_leg

INTEGER

NO

The identifier of the internal trip leg for the shipment

tour

INTEGER

NO

Tour id (foreign key to delivery table)

tour_leg

INTEGER

NO

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

(* - Primary key)

The SQL statement for table and index creation is below.

CREATE TABLE Shipment_Delivery (
    "shipment"        INTEGER NOT NULL,
    "shipment_leg"    INTEGER NOT NULL,
    "tour"            INTEGER NOT NULL,
    "tour_leg"        INTEGER NOT NULL,
    PRIMARY KEY (shipment, shipment_leg, tour, tour_leg)
)