shipment legs table structure

shipment legs table structure#

An output table for the trip paths of freight shipments including the number of internal trip legs, and the corresponding origin and destination locations of the leg

Table Structure#

Field

Type

NULL allowed

Default Value

Foreign key

Description

shipment

INTEGER

NO

0

The unique identifier of this shipment

leg

INTEGER

NO

0

The identifier of the internal trip leg for the shipment

leg_type

INTEGER

NO

0

The type of the internal trip leg

origin_location

INTEGER

NO

0

The trip leg origin location (foreign key to the Location table)

destination_location

INTEGER

NO

0

The trip leg destination location (foreign key to the Location table)

(* - Primary key)

The SQL statement for table and index creation is below.

CREATE TABLE Shipment_Legs (
    "shipment"                   INTEGER NOT NULL DEFAULT 0,
    "leg"                        INTEGER NOT NULL DEFAULT 0,
    "leg_type"                   INTEGER NOT NULL DEFAULT 0,
    "origin_location"            INTEGER NOT NULL DEFAULT 0,
    "destination_location"       INTEGER NOT NULL DEFAULT 0
);