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)

tour

INTEGER

NO

Tour id (foreign key to delivery table)

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,
    "tour"      INTEGER NOT NULL,
    "leg"       INTEGER NOT NULL,
    PRIMARY KEY (shipment, tour, leg)
)