national ports table structure

national ports table structure#

This table includes the attributes of all ports where international shipment goods exit or enter the modelled city, including the port name, county, geographic information, and annual import and export weights

Table Structure#

Field

Type

NULL allowed

Default Value

Foreign key

Description

national_port*

INTEGER

NO

The unique identifier of the port

name

TEXT

NO

Name of the port, as commonly known

county

INTEGER

NO

0

The county FIPS code of the port

x

NUMERIC

NO

0

x coordinate of the port. Automatically added by Polaris

y

NUMERIC

NO

0

y coordinate of the port. Automatically added by Polaris

imports

NUMERIC

NO

0

Annual import weights of the port (units: metric tons)

exports

NUMERIC

NO

0

Annual export weights of the port (units: metric tons)

(* - Primary key)

The SQL statement for table and index creation is below.

CREATE TABLE National_Ports (
    "national_port"       INTEGER NOT NULL  PRIMARY KEY,
    "name"                TEXT    NOT NULL,
    "county"              INTEGER NOT NULL DEFAULT 0,
    "x"                   NUMERIC NOT NULL DEFAULT 0,
    "y"                   NUMERIC NOT NULL DEFAULT 0,
    "imports"             NUMERIC NOT NULL DEFAULT 0,
    "exports"             NUMERIC NOT NULL DEFAULT 0
);
SELECT AddGeometryColumn( 'National_Ports', 'geo', SRID_PARAMETER, 'POINT', 'XY', 1);
SELECT CreateSpatialIndex( 'National_Ports' , 'geo' );
CREATE INDEX IF NOT EXISTS "NATIONAL_PORT_I" ON "National_Ports" ("national_port");