trade flow table structure#
An intput table for the trade flows between supplier and receiver pairs, inclsuing commodity type, total tonnage, type of trade, and external FAF zone if exists (for non internal-internal flows)
Field |
Type |
NULL allowed |
Default Value |
Foreign key |
Description |
---|---|---|---|---|---|
trade_pair* |
INTEGER |
NO |
The unique identifier of this supplier-receiver pair |
||
supplier |
INTEGER |
NO |
0 |
The supplier establishment identifier (foreign key to establishment table) |
|
receiver |
INTEGER |
NO |
0 |
The receiver establishment identifier (foreign key to establishment table) |
|
commodity |
INTEGER |
NO |
0 |
The commodity type being exchanged between this trade pair Values at commodity. |
|
annual_demand |
REAL |
YES |
0 |
Total annual traded tonnage (units: metric tons) |
|
trade_type |
INTEGER |
NO |
0 |
Trade type (II, IE, EI, Import, Export) Values at trade_type. |
|
external_zone |
INTEGER |
YES |
0 |
External FAF Zone for trade types: IE, EI, Import, Export |
(* - Primary key)
The SQL statement for table and index creation is below.
CREATE TABLE Trade_Flow (
"trade_pair" INTEGER NOT NULL PRIMARY KEY ,
"supplier" INTEGER NOT NULL DEFAULT 0,
"receiver" INTEGER NOT NULL DEFAULT 0,
"commodity" INTEGER NOT NULL DEFAULT 0,
"annual_demand" REAL DEFAULT 0,
"trade_type" INTEGER NOT NULL DEFAULT 0,
"external_zone" INTEGER DEFAULT 0
);
Enums#
The following enums are used in this table.
commodity#
Value |
Description |
---|---|
1 |
Agriculture_and_Forestry_Products |
2 |
Mining_Products |
3 |
Petroleum_Products |
4 |
Chemical_and_Pharmaceutical_Products |
5 |
Wood_Products |
6 |
Paper_Products |
7 |
Nonmetallic_Mineral_Products |
8 |
Metal_and_Machinery_Products |
9 |
Electronic_Electrical_and_Precision_Equipment |
10 |
Motorized_and_Transportation_Vehicles_and_Equipment |
11 |
Household_and_Office_Furniture |
12 |
Plastic_Rubber_and_Miscellaneous_Manufactured_Products |
13 |
Textiles_and_Leather_Products |
14 |
Waste_and_Scrap |
15 |
Mixed_Freight |
trade_type#
Value |
Description |
---|---|
1 |
Internal_Internal |
2 |
Internal_External |
3 |
External_Internal |
4 |
Export |
5 |
Import |