ev charging stations table structure

ev charging stations table structure#

Lists all electric vehicle charging stations available in the model.

The number of chargers and charger types are on EV_Charging_Station_Plugs and EV_Charging_Station_Plug_Types, respectively. The cost of charging at the specific station is defined in the EV_Charging_Station_Pricing table. The number of bays available at the charging station defined in the EV_Charging_Station_Service_Bays table.

Not required by all models.

Table Structure#

Field

Type

NULL allowed

Default Value

Foreign key

Description

ID*

INTEGER

NO

Unique identifier for the charging station

Latitude

REAL

YES

Latitude of the charging station, soon to be replaced with metric values such as ‘x’ in other spatial columns.

Longitude

REAL

YES

Longitude of the charging station, soon to be replaced with metric values such as ‘y’ in other spatial columns.

location

INTEGER

YES

Foreign key reference to the nearest record in the Location table, where this charging station is location in the model. Auto-generated with geo-consistency.

zone

INTEGER

YES

Foreign key reference to the Zone where this charging station is situated. Auto-generated with geo-consistency.

Public_Flag

BOOL

YES

1

Boolean describing if the charging station is meant for personal vehicles alone (1 = public) or for fleet-operated vehicles only (0 = private)

geo

POINT

YES

(* - Primary key)

The SQL statement for table and index creation is below.

CREATE TABLE IF NOT EXISTS "EV_Charging_Stations" (
    ID          INTEGER NOT NULL PRIMARY KEY,
    Latitude    REAL,
    Longitude   REAL,
    location    INTEGER,
    zone        INTEGER,
    Public_Flag BOOL DEFAULT 1
);

select AddGeometryColumn( 'EV_Charging_Stations', 'geo', SRID_PARAMETER, 'POINT', 'XY');

create INDEX IF NOT EXISTS "EV_Charging_Stations_ID_I" ON "EV_Charging_Stations" ("ID");

select CreateSpatialIndex( 'EV_Charging_Stations' , 'geo' );