Document toolboxDocument toolbox

sp057_regions

Each record in this table represents a geographical region. 

Regions are organised into a three level hierarchy, represented by the region_level and owning_region_no columns. A level one region is a large region containing (owning) a number of smaller level two regions. Similarly, each level two region contains a number of smaller level three regions. 

Each level three region comprises a number of postcodes (or other user defined location codes). This mapping is contained in sp047_postcodes.

Regions in turn are mapped either explicitly or implicitly to zero or more responsibility units. This mapping is contained in table sp059_ru_regions.


 

Table Definition

Field
Type
Default
Nullable
region_nonumber(9) (error)
region_refvarchar2(26) (error)
owning_region_nonumber(9) (tick)
region_levelnumber(1) (error)
internal_travel_timenumber(6) (tick)
internal_travel_time2number(6) (tick)
internal_journey_typenumber(3) (tick)
earliest_startdate (tick)
latest_startdate (tick)
no_go_startdate (tick)
no_go_enddate (tick)
tz_nonumber(2) (tick)
controlnumber(1) (tick)
lat1number(18,9)null (tick)
lon1number(18,9)null (tick)
lat2number(18,9)null (tick)
lon2number(18,9)null (tick)

Keys

primary key (region_no)

unique (region_no, region_ref)

unique (region_ref)

foreign key (owning_region_no) references sp057_regions (region_no)

foreign key (internal_journey_type) references sp263_journey_types (journey_type)

foreign key (tz_no) references sp056_time_zones (tz_no)

Primary Key Referenced From

 

Column Descriptions

FieldDescription
region_noServiceOptimizer-generated unique identifier.
region_ref

End users' unique identifier.

(warning) This column does not support wide (i.e. multibyte) characters.

owning_region_noIdentifier of the larger region containing this region.
region_levelNumber indicating the level of the region within the hierarchy of regions. The largest regions have a region_level of 1; smaller regions have a level of 2; the smallest regions have a level of 3. 
internal_travel_timeTravel time in minutes between two appointments within the region.
internal_travel_time2Alternative travel time for journeys within a region. This value (same postcode travel) is only used if it is lower than the region internal travel time that would otherwise be used.
internal_journey_typeJourney type for journeys within the region.
earliest_startEarliest time of day an appointment may be made for the region. The schedulers will ensure that employees are not scheduled to start working in the region before this time. Uses this region's Time Zone.
latest_startLatest time of day an appointment may be made for the region. The schedulers will ensure that employees are scheduled so as to complete any work in the region before this time (i.e. "latest_start" is a misnomer.) Uses this region's Time Zone.
no_go_startNo longer supported.
no_go_endNo longer supported.
tz_no

The time zone associated with a particular region. A level 3 region can have an associated time zone. A level 2 region can have a time zone which is the default time zone of any of its constituent level 3 regions that have a null time zone. Ditto level 1 regions.

If this field is null, the time zone applied is found by recursively looking at the time zone of the owning region (up to level 1 region). Otherwise if no owning region has a time zone, sp083 'tz_Default' is used.

controlUsed by system to indicate use of postcode travel lookup.

lat1Coordinate system WGS84latitude of the top left corner of the region rectangle.
lon1Longitude of the top left corner of the region rectangle.
lat2Latitude of the bottom right corner of the region rectangle.
lon2Longtude of the bottom right corner of the region rectangle.