EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8
Table of Contents
Introduction ............................................................................................................... 1
1. General Information ............................................................................................ 1
2. Advanced Topics .................................................................................................. 1
3. Data Provision and Updates ............................................................................... 1
4. Appendices............................................................................................................ 2
Changes in the ECAD Product Guide version 2.8 ............................................... 2
1. General Information ............................................................................................ 3
1.1 Background ...................................................................................................... 3
1.2 What is an Eircode? ........................................................................................ 3
1.3 Who supplies Eircode? .................................................................................... 3
1.4 Sources of Data ............................................................................................... 4
1.5 Addressing in Ireland...................................................................................... 4
1.6 Eircode Structure and Presentation ............................................................. 6
1.7 Eircode Address Database (ECAD) ............................................................... 7
1.8 How Irish language is Integrated ............................................................... 25
1.9 Postal Address ............................................................................................... 29
1.10 Geographic Address ...................................................................................... 34
2. Advanced Topics ................................................................................................. 36
2.1 How to use Alias Information ...................................................................... 36
2.2 Spatial Data and Other Information .......................................................... 41
2.3 Address Validation ........................................................................................ 51
2.4 Sample ECAD Queries .................................................................................. 54
3. Data Provision and Updates ........................................................................... 57
3.1 ECAD ............................................................................................................... 57
4. Appendices ............................................................................................................ 61
4.1 Appendix 1 – Physical Model for Model ECAD V1 .................................... 61
4.2 Appendix 2 – Postal Address View ........................................................... 104
4.3 Appendix 3 – Geographic Address View .................................................. 112
Contact Information ................................................................................................. 116
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 1
Using the ECAD Product Guide
Introduction
This is the product guide to the Eircode Address Database (ECAD) data product. This guide
provides software programmers and database administrators’ information required to
incorporate ECAD data into their IT systems and is supported by sample data available on
request to [email protected]
The Code of Practice available at www.eircode.ie and outlines the acceptable usage of
Eircodes.
1. General Information
The information in this section covers the following topics:
The structure of an Eircode
The unique challenges of addressing in Ireland
How Eircodes are assigned
Recommendation for storage and presentation
Describes the ECAD data product
Describes how Irish language is integrated into the ECAD
Describes the nature of the Postal Address in the ECAD
2. Advanced Topics
This section provides more detail on certain technical aspects of ECAD.
How to use alias information
Spatial data and other data within the ECAD
Information concerning address validation
How to perform sample ECAD queries
3. Data Provision and Updates
This section covers the following topics:
Data supply format and options for receiving updates
Business process considerations
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 2
4. Appendices
This section contains the following Appendices:
Appendix 1 – ECAD Tables
This appendix provides a list and detailed specification of all files provided as part of
the ECAD data provision
Appendix 2 – Postal Address View
This appendix provides details of how to create the Postal Address View from the
ECAD information
Appendix 3 – Geographic Address View
This appendix provides details of how to create the Geographic Address View from the
ECAD information
Changes in the ECAD Product Guide version 2.8
We made the following changes in this release
1. NOTE ON SPATIAL_ACCURACY
See note in Section 2.2.1.1 on changes to Eircode allocation based on Spatial
Accuracy, and a general note on Spatial Accuracy of existing Eircodes.
2. ADMINISTRATIVE_INFO CHANGES
See Section 2.2.4 about upcoming changes to Administrative Info data in the next
quarterly release.
3. POSTAL & GEOGRAPHIC ADDRESS VIEWS
We have modified the Postal & Geographic address views (Appendix 4.2.2 and 4.3.2)
to include a clause to ensure the Eircode field is not blank (Eircode has been
assigned). This is for future proofing purposes, no data in this release is affected by
the clause.
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 3
1. General Information
1.1 Background
In July 2015 all 2.2 million residential and business addresses in Ireland received a letter
notifying them of the Eircode for their address. Eircode is a public database of unique
identifiers for all properties in Ireland that assists citizens, businesses and public bodies to
locate every individual address in the country.
Unlike other countries, where postcodes define clusters or groups of addresses, an Eircode
identifies an individual address – rural or urban - and shows exactly where it is located. An
Eircode is much more than just a postcode; it is a smart location code for all Irish addresses.
People and businesses do not need to change their address; they just add the Eircode to the
end of their current address. The use of Eircode is not mandatory on mail, but many
organisations and businesses ask people to provide their Eircode as a normal part of doing
business (e.g. to capture address details faster and more accurately, to improve delivery
accuracy).
1.2 What is an Eircode?
An Eircode is a smart location codes for all Irish addresses. An Eircode is assigned to every
residential and business address in Ireland that receives post, as defined by the Universal
Service Provider for postal services in Ireland. Throughout this document the term “Postal
Address” always refers to a delivery address as defined by Irish Standard - I.S. EN 14142-
1:2011 (Postal services. Address databases), as operated by the Universal Service Provider,
An Post.
One or more Eircodes are assigned per building depending on the number of unique
addresses within the building. For multi-occupancy residential premises, each individual
address, e.g. “Apartment 1” receives its own Eircode. For multi-occupancy business premises
unique address information is required, e.g. “Unit 1”, otherwise the businesses are assigned
the same Eircode.
For multi-occupancy mixed use buildings Eircodes are not shared between residential and
non-residential addresses. The only exception to this rule is where the entire address is both
residential and non-residential, e.g. a farm house.
1.3 Who supplies Eircode?
Eircode (the company), part of Capita Business Support Services (Ireland) Ltd, is the Postcode
Management Licence Holder (PMLH) and were awarded the government licence to design,
launch and manage a postcode system for Ireland. This included the design and assignment
of the postcode – now called “Eircode”.
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 4
This Eircode data is available to external organisations in two forms: a basic version Eircode
Address File (ECAF) and a richer version with more data elements Eircode Address Database
(ECAD) which is described in this document.
Software applications are available from third party suppliers who provide a variety of products
and services using Eircode data.
Find out more about the range of products and services available www.eircode.ie
1.4 Sources of Data
The source data is supplied by the following:
• Alias information: Eircode
• Administrative information: Ordnance Survey Ireland
• All Other Information: An Post GeoDirectory Limited, which sources information from
Ordnance Survey Ireland, the Placenames Branch (Department of Arts, Heritage and
the Gaeltacht) and the Universal Service Provider for postal services in Ireland, An
Post.
1.5 Addressing in Ireland
Ireland has a number of unique challenges when it comes to addressing. Firstly, people in
the same street, townland, apartment building, etc. may write their addresses in very different
ways. This arises for reasons of; local common naming conventions, historical reasons,
variations in spelling (notably anglicised versions of Gaelic names) and vanity addressing.
An Post, the Universal Service Provider, has prompted postal users to use the addressing
format required to maximise the effectiveness and efficiency of the postal service. Their
addressing guides comply with the Universal Postal Union’s (UPU) (the United Nations body
responsible for promoting standards in the postal industry across the World) addressing
guidelines. The postal address as defined by Irish Standard - I.S. EN 14142-1:2011 (Postal
services. Address databases), as operated by the Universal Service Provider, An Post,, is the
format used in the ECAD.
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 5
However, the various ways that people record their own address may differ from the Postal
Address. The following examples of the same address and the different ways in which it can
be recorded illustrate the problem.
Example:
42 Woodbrook Glen 42 Woodbrook Glen 42 Woodbrook Glen
Diswellstown Rd Riverwood Road Carpenterstown
Clonsilla Castleknock Dublin 15
Dublin 15 Dublin 15
In 2.1 we discuss how alias information available in the ECAD can be used to mitigate this
problem. 2.3 describes how the allocation of Eircodes to addresses follows a methodology
designed to optimise address verification.
Ireland has a very high level of non-unique addresses (NUA), i.e. the address does not contain
a unique building number or name. Approximately 35% of all Irish addresses are non-unique
which equates to 600,000 addresses.
The typical example of NUA addressing is where every address in a townland is the same.
The way that post is delivered is by local knowledge of postal delivery personnel of which
addressee lives in which house.
N.B. For a NUA address, it is impossible to match to a unique record in the ECAD and
assign an Eircode.
We can clearly see the issue below where four separate houses in a townland have the same
address, but a different Eircode. Knowing the address isn’t sufficient information to determine
the Eircode.
Address 1 Address 2 Address 3 Address 4
Ballinroamin Ballinroamin Ballinroamin Ballinroamin
Holycross Holycross Holycross Holycross
Tipperary Tipperary Tipperary Tipperary
A65 TF12 A65 DE34 A65 TA33 A65 HN88
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 6
1.6 Eircode Structure and Presentation
An Eircode is a seven-character postcode consisting of two elements:
1. Three-character Routing Key
2. Four-character Unique Identifier
1.6.1 Recommendations for Storage and Presentation
An Eircode should always be stored as a single string of seven upper case characters
in IT systems, i.e. A65F4E2.
An Eircode should always be presented in upper case as two parts separated by a
space, on stationary, mail items, computer forms, etc. i.e. A65 F4E2 and never
A65F4E2.
1.6.2 Routing Key
The Routing Key is the first part of an Eircode and is consistently three characters long. The
Universal Service Provider identified principal post towns through which mail is distributed and
Eircode assigned Routing Key codes to those principal post towns. The Routing Key format
is Letter-Number-Number with the single exception of D6W for the Dublin 6W postal district.
The existing Dublin Postal Districts 1 to 24 have been retained as D01 to D24. The Routing
Key letter and numbers assigned to the remainder of the 139 Routing Keys are not directly
linked to counties, towns or any other geographic boundaries. A Routing Key will be shared
by many properties in an area. Routing keys are fixed once assigned to an address and do
not change.
1.6.3 Unique Identifier
The Unique Identifier is the second part of an Eircode and consistently comprises four
characters. The Unique Identifier is unique within each Routing Key, but not across Routing
Keys. Unique Identifiers are not assigned in any sequence order, nor is there any hierarchical
grouping information contained in the Unique Identifier. Unique Identifiers are fixed once
generated for an Eircode, and are only retired if there is a change of building use, e.g. A
Georgian House is converted into a block of apartments.
The Unique Identifier has the same allowable characters in each position, twenty five
characters in total defined from the following available list of numbers and letters:
6
Number
5
Number*
4
Alpha- Numeric
A
Letter
F
Alpha- Numeric
E
Alpha- Numeric
2
Alpha- Numeric
* “W” allowed for only in D6W
Routing Key Unique Identifier
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 7
NUMBERS: 0,1,2,3,4,5,6,7,8,9
LETTERS: A,C,D,E,F,H,K,N,P,R,T,V,W,X,Y
This provides 25 x 25 x 25 x 25 possible combinations, which allows a maximum of 390,625
Eircodes per Routing Key.
1.6.4 Character Set
The characters allowed in each position in an Eircode are as below:
Component Position Allowed Characters
Routing Key 1 A,C,D,E,F,H,K,N,P,R,T,V,W,X,Y
2 0-9
3 0-9 with the exception of W for D6W
Unique Identifier 4 0-9 and A,C,D,E,F,H,K,N,P,R,T,V,W,X,Y
5
6
7
1.7 Eircode Address Database (ECAD)
The ECAF contains the base reference data for over 2 million Irish addresses and is a
prerequisite to the purchase of the ECAD. The ECAD contains additional data for each
address. For ease of use the two products are delivered in a relational database. The ECAD
contains no software; the data within it must be processed for use in IT applications.
The ECAD is comprised of a number of database tables. The tables are divided into a number
of categories based on the role they perform within the database. The categories are:
Address – Contains the information that is used to make up an address
Alias – Provides information on address alias information
Lookup – Contains lookup information that has been normalised into separate tables
Information – Holds non address information related to the Address Tables
History – Provides detail of retired address records and their related Eircodes
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 8
The tables in the ECAD are described in more detail below (detailed table definition for each
table is available in Appendix 1.)
1.7.1 Address Tables
The following is the list of tables that contain the address information stored in the ECAD:
Address Group Address Table
Premises Tables ORGANISATION
SUB_ADDRESS_POINT
ADDRESS_POINT
BUILDINGS
Thoroughfare Tables BUILDING_GROUP
THOROUGHFARE
Locality Tables LOCALITY
POST_TOWN
COUNTY
Address POSTAL_ADDRESS
GEOGRAPHIC_ADDRESS
The address information stored in these tables is stored in upper case only for English and
Irish versions of the address element. Provision has been made to receive Official Irish
language versions (Type 3 and 4) in the future, which uses mixed case for Irish versions of
the address where required. Address elements always have an associated address type that
is stored in the ADDRESS_TYPE Lookup Table.
Address
ORGANISATION
SUB_ADDRESS_POINT
ADDRESS_POINT
BUILDING
BUILDING_GROUP
THOROUGHFARE
LOCALITY
POST_TOWN
COUNTY
POSTAL_ADDRESS
GEOGRAPHIC_ADDRESS
Alias
ALIAS_TYPE
ORGANISATION_ALIAS
ADDRESS_POINT_ALIAS
BUILDING_ALIAS
BUILDING_GROUP_ALIAS
THOROUGHFARE_ALIAS
LOCALITY_ALIAS
POST_TOWN_ALIAS
COUNTY_ALIAS
Lookup
ADDRESS_TYPE
BUILDING_TYPE
DESCRIPTOR
GEOGRAPHIC
QUALIFIER
IRISH_VERFICATION
ROUTING_KEY
GEODIRECTORY_LOOKUP
Information
SPATIAL_INFO
BUILDING_INFO
ORGANISATION_INFO
ADMINISTRATIVE_INFO
History
HISTORY_DETAIL
HISTORY_POSTAL_ADDRESS
HISTORY_TYPE
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 9
The Entity Relationship Diagram for Address Tables is shown below, and the tables are
described in the following sections.
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 10
BUILDING
A record in the BUILDING table generally refers to a permanent physical building, however
some records may refer to other entities, e.g. a halting site bay. The BUILDING table is the
central hub of the Address Tables, defining the thoroughfare and locality elements of a
building. A locality may cross county boundaries, or a thoroughfare may cross multiple post
towns, therefore the post town or county information resides solely at the building level.
ADDRESS TYPE Description
Single Occupancy Residential Building
This type of building contains one residential address.
Multi Occupancy Residential Building
This type of building contains multiple residential addresses.
Single Occupancy Non-Residential Building
This type of building contains one non-residential address (business, club or other organisation).
Multi Occupancy Non-Residential Building
This type of building contains multiple non-residential addresses (business, club or other organisation).
Multi Occupancy Mixed Use Building
This type of building contains multiple residential and non-residential addresses.
Buildings can also have a more specific address types such as a Hospital, School, Shopping
Centre, etc.
BUILDING_GEOGRAPHIC
There is a one-to-one relationship between the BUILDING_GEOGRAPHIC table and the
BUILDING table, joining on BUILDING_ID. The BUILDING_GEOGRAPHIC effectively
contains replacement values for the BUILDING table if you wish to create GEOGRAPHIC
addresses rather than POSTAL addresses.
ADDRESS_POINT
An address point record exists for every unique address within a building. A standard
residential property will have one address point. Apartment buildings and multi-unit
commercial buildings will have one address point for every unique address within the building.
Eircodes are assigned at the address point level and reside in the ADDRESS_POINT table.
There are a number of address points that do not have an associated Eircode. This is due to
the building not receiving a direct delivery of mail by the Universal Service Provider. In these
cases mail is generally delivered centrally and distributed to each building by internal mail
processes, e.g. a University Campus. These addresses do not have a Postal Address as
defined by Irish Standard - I.S. EN 14142-1:2011 (Postal services. Address databases), as
operated by the Universal Service Provider, An Post. The BUILDING table has a STATUS
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 11
field to indicate this information. If it is set to a value of ‘1’ then the building is included in the
Postal Address table, if it has a status of ‘2’ it is excluded.
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 12
Address points can be one of the following address types:
ADDRESS TYPE Description
Residential Address Point This type of address point has one or more residential addresses associated with it.
Non-Residential Address Point This type of address point has one or more non-residential address (business, club or other organisation) associated with it.
Mixed Address Point This is a special case where the residential and non residential addresses in the building are essentially the same address. The typical example is a farm house on an active farm.
It is important to note that this is a special case. In general a building with both residential and non-residential addresses (e.g. an apartment over a shop) will receive two address points, one commercial and one residential, and hence two Eircodes.
Buildings can contain multiple address points of type Residential and/or Non-Residential.
SUB_ADDRESS_POINT
A sub address point is an address within a building that has no underlying address information.
This information indicates that there are multiple flats within a building without discrete
addresses (e.g. without Flat 1, Flat 2, etc. indicators). These records are inserted into the
SUB_ADDRESS_POINT table to indicate their existence. The address point associated with
the records is generally of type Residential Address Point, but can also be associated with
type Non-Residential Address Point. The SUB_ADDRESS_POINT records are never used to
generate a Postal Address and can be ignored for most purposes.
If a building had one postal address and 5 sub address points, there would be five
records in table SUB_ADDRESS_POINT and each would have the ADDRESS_POINT_ID of
the parent address point, ie. The one associated with the postal address.
ORGANISATION
The ORGANISATION table contains a record for every non-residential address in the ECAD.
The organisation name is present unless the address is vacant or the organisation name is
unknown in the case of organisations associated with Non-Residential Address Point. For
Mixed Address Points, there is always a reference in the Organisation table and the
organisation name is always null.
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 13
BUILDING_GROUP
A building group is a collection of buildings with a collective name, located on or near the same
thoroughfare.
Building groups can be one of the following generic address types:
ADDRESS TYPE Description
Residential Building Group This type of building group contains buildings with residential addresses only.
Non-Residential Building Group This type of building group contains buildings with non-residential addresses (business, club or other organisation) only.
Mixed Building Group This type of building group contains buildings with residential and non-residential addresses.
Building groups can also have a more specific address type such as a Hospital, School,
Shopping Centre, etc.
THOROUGHFARE
Thoroughfares generally refer to the street, road, avenue, etc. on which a building resides.
The BUILDINGS table has a reference to both PRIMARY and SECONDARY thoroughfares (if
populated), which both reference this THOROUGHFARE table.
LOCALITY
A locality refers to areas, districts, towns, etc. and is generally one of the following address
types:
ADDRESS TYPE Description
Rural Locality This is generally a townland.
Industrial Estate Industrial Estate, Industrial Park, Business Campus, etc.
Shopping District Shopping Centre.
Housing Estate Residential Housing Estate.
Village Based on Census 2011 population < 1,500.
Town Based on Census 2011 population > 1,500.
Urban Area Wholly within a village/town/city e.g. Rathmines.
Suburban Locality This is an area that is both rural and urban, as it is both a townland, and also an area name applied to houses in a town, as the town has extended partially into the townland.
The BUILDINGS table has a reference to PRIMARY and SECONDARY localities (if
populated), which all reference this LOCALITY table.
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 14
All records in the POST_TOWN table are duplicated in the LOCALITY table, where the
LOCALITY_ID in the LOCALITY table is equal to the POST_TOWN_ID in the POST_TOWN
table. These LOCALITY records have one of the following address types:
ADDRESS TYPE Description
Village Based on Census 2011 population < 1,500
Town Based on Census 2011 population > 1,500
Postal District Dublin 1 to 24
City Dublin, Cork, Limerick, Galway or Waterford
POST_TOWN
The POST_TOWN table contains a record for every post town in the ECAD. The post town is
a significant element of the Postal Address, however it is not always populated in an address.
The official post office guide, Eolaí an Phoist1, describes post towns in the following manner;
“A provincial postal address may include the name of a town or village several miles distant, with which the addressee has little or no connection, and, in some places, especially if this residence happens to be near a county boundary, the name of the neighbouring county instead of the county in which he actually resides. The explanation is that the main mail despatches have to be sent for more detailed sub division to certain centres known as POST TOWNS, chosen because of their accessibility and convenience.”
The POST TOWN record always has an address type of post town.
COUNTY
The COUNTY table contains a row for each of the 26 counties in Ireland.
A COUNTY record always has an address type of County.
1 Ireland. Eolaí an phoist: Post office guide. Dublin
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 15
POSTAL_ADDRESS
The POSTAL ADDRESS Table contains a row for every Postal Address in the ECAD. It
contains the following fields:
POSTAL_ADDRESS field
ECAD_ID
ORGANISATION_ID
ADDRESS_POINT_ID
BUILDING_ID
BUILDING_GROUP_ID
PRIMARY_THOROUGHFARE_ID
SECONDARY_THOROUGHFARE_ID
PRIMARY_LOCALITY_ID
SECONDARY_LOCALITY_ID
POST_TOWN_ID
POST_COUNTY_ID
EIRCODE
NUA
GAELTACHT
ADDR_LINE_1
ADDR_LINE_2
ADDR_LINE_3
ADDR_LINE_4
ADDR_LINE_5
ADDR_LINE_6
ADDR_LINE_7
ADDR_LINE_8
ADDR_LINE_9
IRISH_ADDR_LINE_1
IRISH_ADDR_LINE_2
IRISH_ADDR_LINE_3
IRISH_ADDR_LINE_4
IRISH_ADDR_LINE_5
IRISH_ADDR_LINE_6
IRISH_ADDR_LINE_7
IRISH_ADDR_LINE_8
IRISH_ADDR_LINE_9
ADDRESS_REFERENCE
An ECAD_ID referred to in the POSTAL_ADDRESS table is either the ORGANISATION_ID if
it is not Null, or the ADDRESS_POINT_ID which is never Null. ECAD_ID is simply a generic
name that covers all of the primary keys in the address tables (ORGANISATION_ID,
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 16
ADDRESS_POINT_ID, BUILDING_ID, BUILDING_GROUP_ID, etc.) and allows joining to the
various _INFO table.
You don’t join the ECAD_ID in the POSTAL_ADDRESS table to any of the _INFO tables, you
use the appropriate ID. For example to get coordinates you join to the SPATIAL_INFO table
on POSTAL_ADDRESS.BUILDING_ID = SPATIAL_INFO.ECAD_ID.
The individual address elements (i.e. BUILDING_ID, THOROUGHFARE_ID, etc.) make up
the address lines. Some address elements are combined for an address line (e.g. Building
Number and Thoroughfare Name). Address creation rules have been applied to create
Address Line 1-8 in both English and Irish. The final line in every Postal Address in the table
is the Eircode. For inbound international mail the country name IRELAND should be appended
as the last line of the Postal Address.
The NUA field contains a Y value when the address is a non-unique address, and N when it
is a unique address.
The GAELTACHT field contains a Y value when the address is in a Gaeltacht area, and N
when it is isn’t.
The ADDRESS_REFERENCE is the An Post GeoDirectory address reference identifier used
by the Universal Service Provider.
GEOGRAPHIC_ADDRESS
The GEOGRAPHIC ADDRESS Table contains a row for every Geographic Address in the
ECAD. It contains the following fields:
GEOGRAPHIC_ADDRESS field
ECAD_ID
ORGANISATION_ID
ADDRESS_POINT_ID
BUILDING_ID
BUILDING_GROUP_ID
PRIMARY_THOROUGHFARE_ID
SECONDARY_THOROUGHFARE_ID
PRIMARY_LOCALITY_ID
SECONDARY_LOCALITY_ID
POST_TOWN_ID
POST_COUNTY_ID
EIRCODE
NUA
GAELTACHT
ADDR_LINE_1
ADDR_LINE_2
ADDR_LINE_3
ADDR_LINE_4
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 17
ADDR_LINE_5
ADDR_LINE_6
ADDR_LINE_7
ADDR_LINE_8
ADDR_LINE_9
IRISH_ADDR_LINE_1
IRISH_ADDR_LINE_2
IRISH_ADDR_LINE_3
IRISH_ADDR_LINE_4
IRISH_ADDR_LINE_5
IRISH_ADDR_LINE_6
IRISH_ADDR_LINE_7
IRISH_ADDR_LINE_8
IRISH_ADDR_LINE_9
ADDRESS_REFERENCE
An ECAD_ID referred to in the GEOGRAPHIC_ADDRESS table is either the
ORGANISATION_ID if it is not Null, or the ADDRESS_POINT_ID which is never Null.
ECAD_ID is simply a generic name that covers all of the primary keys in the address tables
(ORGANISATION_ID, ADDRESS_POINT_ID, BUILDING_ID, BUILDING_GROUP_ID, etc.)
and allows joining to the various _INFO table.
You don’t join the ECAD_ID in the GEOGRAPHIC _ADDRESS table to any of the _INFO
tables, you use the appropriate ID. For example to get coordinates you join to the
SPATIAL_INFO table on POSTAL_ADDRESS.BUILDING_ID = SPATIAL_INFO.ECAD_ID.
The individual address elements (i.e. BUILDING_ID, THOROUGHFARE_ID, etc.) make up
the address lines. Some address elements are combined for an address line (e.g. Building
Number and Thoroughfare Name). Address creation rules have been applied to create
Address Line 1-8 in both English and Irish. The final line in every Geographic Address in the
table is the Eircode.
The NUA field contains a Y value when the address is a non-unique address, and N when it
is a unique address.
The GAELTACHT field contains a Y value when the address is in a Gaeltacht area, and N
when it is isn’t.
The ADDRESS_REFERENCE is the An Post GeoDirectory address reference identifier used
by the Universal Service Provider.
1.7.2 Lookup Tables
The Lookup Tables are used to tie together the Address Tables. They have been created
when the Address Tables were normalised. The Lookup Tables are as follows:
ADDRESS_TYPE
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 18
BUILDING_TYPE
DESCRIPTOR
GEOGRAPHIC
QUALIFIER
IRISH_VERIFICATION
ROUTING_KEY
GEODIRECTORY_LOOKUP
ADDRESS_TYPE
This table contains one record for each Address Type. Address Types categorise addresses.
The address type is a field in every Address Table and thus allows for addresses to be
consistently queried.
For example a BUILDING, a BUILDING GROUP or a LOCALITY may all have an Address
Type of “Industrial Estate”. The Address Type of a BUILDING has a bearing on what other
information is available for an address. For example if a building has an address type of
SINGLE OCCUPANCY RESIDENTIAL BUILDING this means that there will be no entries in
the ORGANISATION table for that building. All Address Tables contain an
ADDRESS_TYPE_ID that references the ADDRESS_TYPE table.
BUILDING_TYPE
The BUILDING_TYPE table contains one record for each building type, e.g. Detached,
Terraced, etc. The BUILDING_INFO table contains a BUILDING_TYPE_ID that references
the BUILDING_TYPE table.
DESCRIPTOR
This table contains one record for each Descriptor. A Descriptor is the part of a thoroughfare
or building group address such as the examples below.
NAME Irish Name
AVENUE ASCAILL
GROVE GARRÁN
STREET SRÁID
ROAD BÓTHAR
GEOGRAPHIC
This table contains one record for each Geographic. A geographic element is North, South,
East or West, which can be appended or prepended to an address element.
Name Irish Name
EAST THOIR
NORTH THUAIDH
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 19
SOUTH THEAS
WEST THIAR
QUALIFIER
This table contains one record for each Qualifier. Qualifiers are appended of prepended to
address elements, and are listed in the table below.
NAME Irish Name
EXTENSION SÍNEADH
GREAT MHÓR
LITTLE BHEAG
LOWER ÍOCHTARACH
MIDDLE LÁIR
UPPER UACHTARACH
For the BUILDING_GROUP, THOROUGHFARE and LOCALITY tables the
DESCRIPTOR_ID, QUALIFIER_ID and GEOGRAPHIC_ID fields are deconstructed from the
NAME and NAME_IRISH fields. The tables also contain a variation of the following two fields
(THOROUGHFARES table used as an example).
THOROUGHFARE_NAME
The element of NAME that remains after Descriptor, Qualifier and Geographic elements have
been removed.
THOROUGHFARE_NAME_IRISH
Same as THOROUGHFARE_NAME but using NAME_IRISH.
THOROUGHFARE Example 1 Example 2
NAME ABBEY STREET MIDDLE
O'CONNELL STREET LOWER
NAME_IRISH SRÁID NA MAINISTREACH LÁIR
SRÁID UÍ CHONAILL ÍOCHTARACH
THOROUGHFARE_NAME ABBEY O'CONNELL
THOROUGHFARE_NAME_IRISH NA MAINISTREACH UÍ CHONAILL
As the NAME field contains these elements in a variety of order permutations, it is not possible
to re-create the NAME or NAME_IRISH fields in their original order. Please note that the aim
of THOROUGHFARE_NAME_IRISH field is to assist parsing of address elements only, not to
create syntactically correct Irish, as evidenced by the examples above.
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 20
IRISH_VERIFICATION
All Address Tables contain a field called NAME, this contains the English language version for
the address element. Each table also contains a NAME_IRISH field which contains the
equivalent address element in Irish.
Each Address Table also contains an IRISH_VERIFICATION_ID field. This field denotes the
validation status of the Irish language address element. This information is stored in the
IRISH_VERIFICATION table as displayed;
IRISH_VERIFICATION_ID VALIDATION_LIFECYCLE
0 NO IRISH - ENGLISH USED
1 EIRCODE TRANSLATION2
2 UNOFFICAL TRANSLATION
3 OFFICIAL IRISH LANGUAGE VERSION
4 LEGAL OFFICIAL IRISH LANGUAGE VERSION
The Irish Validation lifecycle gives the developer the option of choosing the Irish language
version where the validation level is appropriately high. Irish language versions of placenames
are determined by The Placenames Branch (Department of Arts, Heritage and the Gaeltacht)
and given legal status by means of a placenames order signed by the Minister of State at the
Department of Arts, Heritage and the Gaeltacht. They are published on www.logainm.ie,
developed by Fiontar, DCU. This research is generally undertaken on a County by County
basis, with translations moving from official Irish language versions of placenames to legal
status when the entire County has been completed and the appropriate Government order
enacted.
It is planned that the official Irish language version provided by The Placenames Branch will
replace the current unofficial translations provided by GeoDirectory.
ROUTING_KEY
The Routing Key is the first part of an Eircode and is consistently three characters long.
Routing Keys are defined by the Universal Service Provider for postal services which reflect
the sortation requirements of the mail distribution network. The Routing Key format is Letter-
Number-Number with the single exception of D6W for the Dublin 6W postal district. The
existing Dublin Postal Districts 1 to 24 have been retained as D01 to D24. The Routing Key
2 In a small number of cases Eircode has generated a translation without recourse to official sources. These
generally apply to simple lookup table entries (e.g. East, West, etc.). Eircode plan to have these translations
verified, but do not expect the values to change.
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 21
letters and number assigned to the remainder of the 139 Routing Keys are not directly linked
to counties, towns or any other geographic boundaries. A Routing Key will be shared by many
properties in an area. Routing keys are fixed once assigned to an Eircode and do not change.
The BUILDING table contains a ROUTING_KEY_ID column that links to the ROUTING_KEY
table which contains 139 Routing Key Names (e.g. D01, Y14, etc.).
GEODIRECTORY_LOOKUP
For users of GeoDirectory, this table provides a lookup to determine the relevant GeoDirectory
GEO_ID for each Eircode ECAD_ID as illustrated by the sample rows below.
GEODIRECTORY_LOOKUP_ID
ECAD_ID GEO_ID ECAD_TABLE GEO_TABLE
1 1000548185
36650520
ADDRESS_POINT
ADDRESS_POINT
2 1000548186
36650521
ORGANISATION
ADDRESS_POINT
3 1000548187
36650522
ADDRESS_POINT
BUILDINGS
4 1000548188
36650523
BUILDING BUILDINGS
Similarly, you can also look up the relevant ECAD_ID if you have an existing GeoDirectory
GEO_ID. If you have a GeoDirectory ADDRESS_POINT_ID this will point to either an ECAD
ADDRESS_POINT_ID or an ORGANISATION_ID which will both allow you to determine the
Eircode for the GeoDirectory ADDRESS_POINT_ID.
If you have an existing GeoDirectory BUILDING_ID this will point to either an ECAD
ADDRESS_POINT_ID or a BUILDING_ID or both. If the Building has only one Address Point
(and therefore only one Eircode) we also provide the ADDRESS_POINT_ID reference to allow
you to determine the Eircode. If the Building has more than one Address Point (and thus we
can’t tell you the Eircode for the building as it has many) then we only provide the ECAD
BUILDING_ID.
1.7.3 Information Tables
The information tables provide extra information that adds value to the addresses.
INFORMATION TABLES
SPATIAL_INFO
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 22
BUILDING_INFO
ORGANISATION_INFO
ADMINISTRATIVE_INFO
SPATIAL_INFO
The SPATIAL_INFO table contains spatial data. This data includes map coordinates of
buildings and also the extents of non-buildings, e.g. Town, Thoroughfare. The spatial
information is provided in a number of coordinate formats. The SPATIAL_INFO table is
described in detail in section 2.2.1 of this document. This table links to all Address Tables at
BUILDING level and below.
BUILDING_INFO
The BUILDING_INFO table contains extra information about buildings such as if it is under
construction or vacant. This links to the BUILDING table.
ORGANISATION_INFO
The ORGANISATION_INFO table contains extra information about an Organisation. The
ORGANISATION_INFO is explained in detail in section 2.2.3 of this document.
ADMINISTRATIVE_INFO
The ADMINISTRATIVE_INFO table contains information that is useful from a governmental
and local administration perspective. It includes census and other boundary information. The
ADMINISTRATIVE_INFO is explained in detail in section 2.2.4 of this document.
These tables are described in detail in section 2.2.
1.7.4 Alias Tables
There is an alias table for each of the Address Tables as listed in the table below:
ADDRESS GROUP ALIAS TABLE
Premises Tables ORGANISATION_ALIAS
ADDRESS_POINT_ALIAS
BUILDINGS_ALIAS
Thoroughfare Tables BUILDING_GROUP_ALIAS
THOROUGHFARE_ALIAS
Locality Tables LOCALITY_ALIAS
POST_TOWN_ALIAS
COUNTY_ALIAS
Aliases fall into the following categories:
1. Common Misspelling
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 23
Either English or Irish common misspellings of an address element. The address element
should be corrected to the proper spelling.
2. Alternative Spelling
Alternative spelling of an address element. The address element does not need to be
corrected to the proper spelling.
3. Alternative Format
The address is commonly written in a different format to the Postal Address.
4. Alternative Format and Spelling
The address element has an alternative spelling, but only when written in a different format to
the Postal Address.
For a more in depth description of Aliases see section 2.1 How to use Alias Information.
1.7.5 History Tables
History tables provide detail of retired ECAD records. There are three HISTORY tables in
ECAD as follows:
HISTORY_TYPE
This table stores the reason that the ECAD record has been removed from the
database. In the Q315 release the HISTORY Types are as follows:
• DEMOLISHED
The building has been demolished
• DERELICT
The building has been marked as derelict.
• CHANGED EIRCODE
The original Eircode for a building has changed.
• DUPLICATE
The ECAD_ID for an address element has been merged with another
ECAD_ID.
• GEODIRECTORY UPDATE
Where a record has been retired due to updated source data from
GeoDirectory, and the update is believed to be correct, but not caused by a
building being marked as demolished or derelict then the HISTORY TYPE is
GEODIRECTORY UPDATE.
• GEODIRECTORY ERROR
Where a record has been retired due to updated source data that corrects
previous source data errors from GeoDirectory then the HISTORY TYPE is
GEODIRECTORY ERROR
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 24
HISTORY_DETAIL
This table contains the following fields:
ECAD_ID Unique Identifier that is no longer in ECAD.
TABLE_NAME The table that the record has been removed from, e.g. BUILDING
HISTORY_TYPE_ID The reason as defined in the HISTORY_TYPE table.
EIRCODE If a record is associated with an Eircode it is filled in. If you are looking for retired Eircodes only then non-null values in this column where TABLE_NAME = ‘ADDRESS_POINT’ will yield the result.
BUILDING_ID This is completed is the TABLE_NAME is ADDRESS_POINT or ORGANISATION
NEW_ECAD_ID If the record has been merged, or a replacement record has been issued (e.g. Changed Eircodes)
HISTORY_ETRS89_LAT The Latitude of the retired ECAD_ID
HISTORY_ETRS89_LONG The Longitude of the retired ECAD_ID
HISTORY_SOURCE Comment (if any) supplied by ECAD Maintenance Team.
HISTORY_POSTAL_ADDRESS
The complete POSTAL_ADDRESS records that were attached to retired BUILDING
records.
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 25
1.8 How Irish language is Integrated
The ECAD is bilingual by design. Every ECAD table that contains address fields has both
English and Irish language versions side by side.
All Address Tables contain a field called NAME, this contains the English language version for
the address element. Each table also contains a NAME_IRISH field which contains the
equivalent address element in Irish.
Each Address Table contains an IRISH_VERIFICATION_ID field. This field denotes the
validation status of the Irish language address element. This information is stored in the
IRISH_VERIFICATION table as displayed below:
IRISH_VERIFICATION_ID VALIDATION_LIFECYCLE
0 NO IRISH - ENGLISH USED
1 EIRCODE TRANSLATION3
2 UNOFFICIAL TRANSLATION
3 OFFICIAL IRISH LANGUAGE VERSION
4 LEGAL OFFICIAL IRISH LANGUAGE VERSION
The Irish Validation lifecycle gives the developer the option of choosing the Irish language
version where the validation level is appropriately high. Irish language versions of placenames
are determined by The Placenames Branch (Department of Arts, Heritage and the Gaeltacht)
and given legal status by means of a placenames order signed by the Minister of State at the
Department of Arts, Heritage and the Gaeltacht. They are published on www.logainm.ie,
developed by Fiontar, DCU. This research is generally undertaken on a County by County
basis, with translations moving from official Irish language versions of placenames to legal
status when the entire County has been completed and the appropriate Government order
enacted
It is planned that the official Irish language version provided by The Placenames Branch will
replace unofficial translations provided by GeoDirectory.
The Irish Postal Address currently contains the unofficial translations provided by
GeoDirectory (Type 2) and if unavailable uses the English version of the address.
The English and Irish versions of address elements are displayed per Address Table below.
3 In a small number of cases Eircode has generated a translation without recourse to official sources. These
generally apply to simple Lookup Table entries (e.g. East, West, etc.). Eircode plan to have these translations
verified, but do not expect the values to change.
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 26
ADDRESS TABLE NAME IRISH LANGUAGE
ORGANISATION NAME SUB_ADDRESS_NAME DEPARTMENT
NAME_IRISH SUB_ADDRESS_NAME_IRISH DEPARTMENT_IRISH
SUB_ADDRESS_POINT NAME NAME_IRISH
ADDRESS_POINT NAME NAME_IRISH
BUILDING NAME NAME_IRISH
BUILDING_GROUP NAME BUILDING_GROUP_NAME
NAME_IRISH BUILDING_GROUP_NAME_IRISH
THOROUGHFARE NAME THOROUGHFARE_NAME
NAME_IRISH THOROUGHFARE_NAME_IRISH
LOCALITY NAME LOCALITY_NAME
NAME_IRISH LOCALITY_NAME_IRISH
POST_TOWN NAME NAME_IRISH
COUNTY NAME NAME_IRISH, NAME_IRISH_CO
In the case of COUNTY, we have included the NAME_IRISH_CO field which is how the
COUNTY is displayed in Irish in an address when CO. is placed in front of it. For example
“MEATH” is “AN MHÍ” but “CO. MEATH” is “CO. NA MÍ”, therefore “NA MÍ” appears in the
NAME_IRISH_CO field.
Irish translations are also available in the various Lookup Tables.
LOOKUP TABLE ENGLISH LANGUAGE IRISH LANGUAGE
QUALIFIER NAME NAME_IRISH
DESCRIPTOR NAME NAME_IRISH
GEOGRAPHIC NAME NAME_IRISH
Address Tables store QUALIFIER_ID, DESCRIPTOR_ID or GEOGRAPHIC_ID as a key to
the equivalent Lookup Table. This means that the English and Irish equivalent for each of the
values is equally available and is consistently stored.
For example, the thoroughfare OAKWOOD STREET UPPER would be stored in the
THOROUGHFARE Table as:
THOROUGHFARE Fictional Example
NAME OAKWOOD STREET UPPER
NAME_IRISH SRÁID CHOILL NA DARACH UACHTARACH
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 27
QUALIFIER_ID 123
GEOGRAPHIC_ID NULL
DESCRIPTOR_ID 777
THOROUGHFARE_NAME OAKWOOD
THOROUGHFARE_NAME_IRISH CHOILL NA DARACH
The QUALIFIER_ID in the THOROUGHFARE table links to the Qualifier record that contains
the English and Irish version of the Qualifier.
QUALIFIER Fictional Example
QUALIFIER_ID 123
NAME UPPER
NAME_IRISH UACHTARACH
IRISH_VERIFICATION_ID 1
The DESCRIPTOR_ID in the THOROUGHFARE table links to the Descriptor record that
contains the English and Irish version of the Descriptor.
DESCRIPTOR Fictional Example
DESCRIPTOR_ID 777
NAME STREET
NAME_IRISH SRÁID
IRISH_VERIFICATION_ID 777
This allows Irish versions of addresses to be searched in the exact same manner as English
versions of addresses. For Example:
THOROUGHFARE Example 1 Example 2
NAME MARY STREET NORTH O'CONNELL STREET LOWER
NAME_IRISH SRÁID MHUIRE THUAIDH SRÁID UÍ CHONAILL ÍOCHTARACH
THOROUGHFARE_NAME MARY O'CONNELL
THOROUGHFARE_NAME_IRISH MHUIRE UÍ CHONAILL
QUALIFIER_ID 0 14
DESCRIPTOR_ID 194 194
GEOGRAPHIC_ID 2 0
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 28
The two thoroughfares above have their full name stored in both English and Irish. The
descriptor, qualifier and geographic is removed from the full name and the remainder is stored
in THOROUGHFARE_NAME and THOROUGHFARE_NAME_IRISH.
A link to the DESCRIPTOR (STREET, ROAD, AVENUE etc.) table is stored with the
thoroughfare. This link allows the Irish and English to be equally searchable.
DESCRIPTOR Example 1 EXAMPLE 2
DESCRIPTOR_ID 194 194
NAME STREET STREET
NAME_IRISH SRÁID SRÁID
A link to the QUALIFIER (LITTLE, MIDDLE, GREAT, etc.) is stored with the thoroughfare. This
link allows the Irish and English to be equally searchable.
QUALIFIER Example 1 Example 2
QUALIFIER_ID 13
NAME LOWER
NAME_IRISH ÍOCHTARACH
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 29
A link to the GEOGRAPHIC (NORTH, SOUTH, EAST, WEST) is stored with the thoroughfare.
This link allows the Irish and English to be equally searchable.
GEOGRAPHIC Example 1 Example 2
GEOGRAPHIC_ID 2
NAME NORTH
NAME_IRISH THUAIDH
This model allows the main elements of the thoroughfare to be stored and searched efficiently.
It also removes common items to separate tables to improve data accuracy and search
capabilities.
1.9 Postal Address
An Post, the Universal Service Provider, has prompted postal users to use the addressing
format required to maximise the effectiveness and efficiency of the postal service. Their
addressing guides comply with the Universal Postal Union’s (UPU) (the United Nations body
responsible for promoting standards in the postal industry across the World) addressing
guidelines. The postal address as defined by Irish Standard - I.S. EN 14142-1:2011 (Postal
services. Address databases), as operated by the Universal Service Provider, An Post., is the
format used in the ECAD.
The Postal Address is made up of a number of parts as outlined in the table below.
Address Parts
Department
Organisation
Sub Building Name (e.g. ‘Flat 1’)
Building Name (e.g. ‘Rose Cottage’)
Building Number (e.g. 22)
Building Group (e.g. ‘Marian Terrace’)
Primary Thoroughfare (e.g. ‘Griffith Road’)
Secondary Thoroughfare (e.g. Navan Road’)
Primary Locality (e.g. ‘Cookstown Industrial Estate’)
Secondary Locality (e.g. ‘Manorhamilton’)
Post Town (e.g. ‘Dublin 14’)
Post County (e.g. ‘Cork’)
Eircode (e.g. ‘A65R2AF’)
There are twelve possible address parts but no Postal Address contains more than eight
address lines. A set of rules is applied to the twelve possible address parts to construct an
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 30
address with a maximum of eight lines plus a line for the Eircode. The results are stored in
the POSTAL_ADDRESS table as described in 1.7.1.
1.9.1 Address Elements & Rules for Construction
Department
The department or division within an organisation. If the department element exists, then the
organisation must also exist.
Field in ECAD Fictional Example
Department ACCOUNTS DEPARTMENT
Organisation ENERGY FOR YOU
Sub Building UNIT 8
Building MIDDLETON CENTRE
Primary Thoroughfare MAIN STREET
Post Town TRIM
Post County MEATH
Postcode T22 FNT4
Organisation
The name of an organisation, commercial or non-commercial.
Field in ECAD Fictional Example
Organisation OAK TREE LIMITED
Primary Thoroughfare SAINT ANDREW STREET
Post Town DUBLIN 1
Postcode T22 FNT4
Sub-Building
The sub-building refers to an apartment, flat or unit within a building.
Field in ECAD Fictional Example
Sub Building APARTMENT 114
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 31
Building THE MIDDLETON
Primary Thoroughfare MAIN STREET
Post Town TRIM
Post County MEATH
Postcode T22 FNT4
Building Name
The name given to the building. Prepended by sub building, if any, when the sub building
does not appear on a line to itself. The building name is omitted if it is the same as either the
Organisation or Building Group.
Building Number
A number associated with the whole building. The building number may have a numeric and
an alphanumeric component, which are concatenated e.g. 2A, or alternatively will have a
simple building number or a complex building number. The building number always relates to
the whole building and not a sub-unit within it.
A complex building number may be one of the following:
Dual
Two number separated by '/' e.g. 63/64 = 63, 64
Sequence
An odd or even sequence of numbers with lower and upper bound separated by an
underscore '_' e.g. 1_5 = 1,3,5 and 2_6 = 2,4,6
Range
A range of consecutive numbers with lower and upper bound separated by a dash '-'
e.g. 63-66 = 63, 64, 56, 66
The building number never appears on a line by itself and can prepend Building Group,
Primary Thoroughfare or Primary Locality.
THOROUGHFARE ELEMENTS
Building Groups
A collection of buildings with a collective name, located on or near the same thoroughfare.
The buildings in a Building Group, if numbered, are numbered within the Building Group, not
within the thoroughfare. Examples include universities, hospitals, some industrial estates,
some terraces, shopping centres, apartment complexes etc.
It may be appended to a building number, if any, otherwise it is output on a line by itself. It is
omitted if the same as organisation.
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 32
Primary Thoroughfare
The name of the thoroughfare on which premises are located. It may appear on a line by itself
or be appended to either a sub building or building number.
Addresses with thoroughfares can sometimes have the thoroughfare excluded where a
Building Group exists, such as a Retail Centre or Business Park, and the thoroughfare is not
part of the Postal Address.
Secondary thoroughfare
It is never present without a primary thoroughfare. The primary thoroughfare is dependent on
the secondary thoroughfare and appears before the secondary thoroughfare in any address.
Secondary thoroughfare are generally used to assist locating a primary thoroughfare. For
example:
ADDRESS Fictional Example
Primary Thoroughfare LOVE LANE EAST
Secondary Thoroughfare MOUNT STREET LOWER
Post Town DUBLIN 2
This example shows that LOVE LANE EAST is a small thoroughfare that can be found off
MOUNT STREET LOWER in DUBLIN 2.
LOCALITY ELEMENTS
Locality elements are:
Primary Locality
Secondary Locality
Post Town
County
The first two locality elements refer to areas, districts, industrial estates, towns, etc. For a
complete list of address types query the ADDRESS_TYPES table.
For example:
ADDRESS Fictional Example
Primary Locality KILLARAINY
Secondary Locality MOYCULLEN
The primary locality refers to the specific place the address is. The secondary locality helps
identify where the primary locality is located.
Primary Locality
The name of the locality in which the address resides.
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 33
In urban areas, the primary locality can be required to distinguish between two thoroughfares
of the same name in the same district or town. Industrial estates with named thoroughfares
are also held as localities. In rural areas the primary locality is generally a townland name.
Secondary Locality
Never present without a primary locality. The secondary locality has a wider geographic scope
than the primary locality.
It is the secondary locality therefore which differentiates addresses with the same primary
locality name within the same county.
Secondary localities are more likely to be required for rural addresses.
Post Town
The name of the post town associated with the premises for postal delivery purposes. This
includes Dublin Postal Districts “Dublin 1” to “Dublin 24”.
The post town is a significant element of the Postal Address, however it is not always
populated in an address. The official post office guide, Eolaí an Phoist4, describes post towns
in the following manner
“A provincial postal address may include the name of a town or village several miles distant, with which the addressee has little or no connection, and, in some places, especially if this residence happens to be near a county boundary, the name of the neighbouring county instead of the county in which he actually resides. The explanation is that the main mail despatches have to be sent for more detailed sub division to certain centres known as POST TOWNS, chosen because of their accessibility and convenience.”
Post County
One of the 26 Counties in the Republic of Ireland. These counties are sub-national divisions
used for the purposes of administrative, geographical and political demarcation. Post County
is the County associated with the Post Town, not the geographic county in which the building
is located. The Post County is normally used as part of the Postal Address with some
exceptions e.g. Dublin Postal Districts where the Post County is not used and some Post
Towns (e.g. Tipperary, Kildare, etc.) that have the same name as the Post County.
EIRCODE ELEMENT
Eircode
The seven character Eircode has an A65F4E2 format. The Eircode is a mandatory address
element. The last line of a Postal Address will contain the Eircode, displayed with a space.
e.g. A65 F4E2.
4 Ireland. Eolaí an phoist: Post office guide. Dublin
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 34
1.10 Geographic Address
An Post, the Universal Service Provider, has prompted postal users to use the addressing
format required to maximise the effectiveness and efficiency of the postal service. Their
addressing guides comply with the Universal Postal Union’s (UPU) (the United Nations body
responsible for promoting standards in the postal industry across the World) addressing
guidelines. The ECAD also contains the Geographic Address
The Geographic Address is made up of the same parts as a Postal Address, and has an
identical table structure.
There are twelve possible address parts but no Geographic Address contains more than eight
address lines. A set of rules is applied to the twelve possible address parts to construct an
address with a maximum of eight lines plus a line for the Eircode.
It is important to note that Eircode is providing the Geographic Address as an additional
address format in ECAD, it is not an alternative postal address. The Geographic
Address is provided by An Post GeoDirectory.
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 35
Examples of differences between Geographic Address and Postal Address.
POSTAL ADDRESS GEOGRAPHIC ADDRESS
MAYNOOTH BUSINESS PARK MAYNOOTH BUSINESS PARK
STRAFFAN ROAD STRAFFAN ROAD
MAYNOOTH MAYNOOTH
NAAS CO. KILDARE
CO. KILDARE
TERMINAL BUILDING TERMINAL BUILDING
SHANNON AIRPORT SHANNON AIRPORT
SHANNON SHANNON
LIMERICK CO. CLARE
In the Postal Address table the Post County is related to the Post Town and not the location
of the building. In Geographic Address the Post County relates to the building location. A
Geographic Address may differ from a Postal Address in one or more of the following address
elements
• Primary Locality
• Secondary Locality
• Post Town
• Post County
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 36
2. Advanced Topics
This section is aimed at ECAD users, and provides more detail on the following technical
aspects of ECAD:
How to use Alias information
Spatial data and other data within the ECAD
Information concerning address validation
How to perform sample ECAD queries
2.1 How to use Alias Information
How the Irish Public currently provide and use addresses can differ from the Postal Address
format. While the first address line is usually (but not always) the same, the subsequent
address lines can vary in number and content. One of the issues is a difference to the Post
County in the Postal Address. For example the address below is geographically located in
Co. Offaly but has a postal county of Co. Laois.
ADDRESS GEOGRAPHIC ADDRESS POSTAL ADDRESS
ADDRESS LINE 1 123 ROWAN STREET 123 ROWAN STREET
ADDRESS LINE 2 TULLAMORE ROAD TULLAMORE ROAD
ADDRESS LINE 3 PORTARLINGTON PORTARLINGTON
ADDRESS LINE 4 CO. OFFALY CO. LAOIS
The BUILDING table contains a POST_COUNTY_ID and a COUNTY_ID to indicate the
County used in the Postal Address differs from the Geographic County used in the Geographic
Address.
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 37
Alias Tables provide a solution to the remaining address differences with addresses that do
not conform to the correct Postal Address.
Each of the Address Tables have an associated Alias table as listed below.
ADDRESS TABLE ALIAS TABLE
ORGANISATION ORGANISATION_ALIAS
ADDRESS_POINT ADDRESS_POINT_ALIAS
BUILDINGS BUILDINGS_ALIAS
BUILDING_GROUP BUILDING_GROUP_ALIAS
THOROUGHFARE THOROUGHFARE_ALIAS
LOCALITY LOCALITY_ALIAS
POST_TOWN POST_TOWN_ALIAS
COUNTY COUNTY_ALIAS
The aliases fall into 4 types as described in the table below:
# ALIAS TYPE
1 Common Misspelling
2 Alternative Name
3 Alternative Format
4 Alternative Name and Format
The following sections describe the different Alias Types.
2.1.1 Common Misspelling Alias Type
This Alias Type covers situations where common misspellings of addresses are outside
normal “fuzzy tolerance” settings. If searching for an address element does not yield a result,
the recommended approach is to perform a search on the relevant Alias Table. This will allow
matching an address that has been incorrectly spelt. The alias table contains the incorrect
spelling of the address element and a link to the relevant record containing the correct
element it represents. In a common misspelling scenario it would be normal procedure to
feedback the corrected address rather than perpetuating the spelling mistake. Care must be
taken in this scenario to highlight the correction back to the originator.
This example shows a common misspelling of a locality and how it is corrected.
Entered Address:
Fictional Example
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 38
ROCK STREET
DUNLAOGHIRE
Entry in LOCALITY_ALIAS Table:
LOCALITY_ID ALIAS_TYPE_ID NAME
132165468 1 DUNLAOGHIRE
Entry in LOCALITY Table
LOCALITY_ID NAME
132165468 DUN LAOGHAIRE
This allows us to match the address and correct its spelling.
Corrected Address
ROCK STREET
DUN LAOGHAIRE
2.1.2 Alternative Name Alias Type
This alias type covers situations where address elements have more than one way of being
spelt that are accepted as correct. The Alias Table will contain the name that the address
element is also known as. In alternative spelling scenarios it would be normal procedure to
not correct the inputted address.
This example shows an alternative spelling of a locality.
Entered Address:
Fictional Example
ROCK STREET
BUNNYCONNELLAN
MAYO
Entry in LOCALITY_ALIAS Table:
LOCALITY_ALIAS_ID LOCALITY_ID ALIAS_TYPE_ID NAME
1546 132164558 2 BUNNYCONNELLAN
Entry in LOCALITY Table:
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 39
LOCALITY_ID NAME
132164558 BONNICONLON
In the Postal Address this is spelt BONNICONLON but in this case it is not advisable to correct
the locally used spelling of the input address.
Unchanged Address
ROCK STREET
BUNNYCONNELLAN
MAYO
It is important to note that this advice pertains where there is a requirement to maintain
the input address as is, and does not indicate an alternative postal address to the postal
address as defined by Irish Standard - I.S. EN 14142-1:2011 (Postal services. Address
databases), as operated by the Universal Service Provider, An Post.
2.1.3 Alternative Format Alias Type
This alias type covers situations where an address is often written using different address lines
to the Postal Address.
In this alias type each Alias Table with contain links to the records that make up the alternative
format of an address.
Alternative format aliases can be used in all Alias Tables and this example shows a
THOROUGHFARE_ALIAS example.
Field Type Fictional Example Alias Postal Address
Thoroughfare STONEWALL DRIVE STONEWALL DRIVE
Primary Locality SAGGART ABBEY
Post Town DUBLIN 24
Post County CO. DUBLIN
Entry in THOROUGHFARE_ALIAS Table:
ALIAS_TYPE_ID THOROUGHFARE_ID PRIMARY_LOCALITY_ID POST_TOWN_ID COUNTY_ID
3 132164558 543216 20
Thus the Thoroughfare of STONEWALL DRIVE(132164558) can be followed by SAGGART
ABBEY(543216), CO. DUBLIN (20).
This alias type allows you to match/verify addresses in an alternative format to the Postal
Address by using the Address IDs in the tables. It is important to note that Eircode is
providing this alias information as a method to assist address matching/verification
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 40
only. The alias information does not indicate an alternative postal address to the postal
address as defined by Irish Standard - I.S. EN 14142-1:2011 (Postal services. Address
databases), as operated by the Universal Service Provider, An Post.
2.1.4 Alternative Name and Format Alias Type
This alias type covers situations where an address can be written using different address lines
to the Postal Address including an alternative name for the current address element. This
commonly occurs where there are alternative names for certain roads or housing estates that
have an implied relationship with or shortened next address line.
This example shows the same address displayed in two different formats.
Entered Address:
Field Type Fictional Example Alias Postal Address
Thoroughfare THE DRIVE CASTLETOWN DRIVE
Locality CASTLETOWN
Post Town ASHBOURNE ASHBOURNE
Post County CO. MEATH CO. MEATH
Entry in the THOROUGHFARE_ALIAS Table:
FIELD NAME VALUE
ALIAS_TYPE_ID 4
THOROUGHFARE_ID
132164558
NAME THE DRIVE
PRIMARY_LOCALITY_ID 543216
POST_TOWN_ID 252
POST_COUNTY_ID 20
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 41
It is important to note that by making this an ALIAS_TYPE of 4 instead of 2 you are being told
to only match/validate an address written as THE DRIVE to CASTLETOWN DRIVE when the
following line in the address is CASTLETOWN.
It is important to note that Eircode is providing this alias information as a method to
assist address matching/verification only. The alias information does not indicate an
alternative postal address to the postal address as defined by Irish Standard - I.S. EN
14142-1:2011 (Postal services. Address databases), as operated by the Universal
Service Provider, An Post.
2.2 Spatial Data and Other Information
This section explains the additional non-address related information that the ECAD provides.
There are four tables:
Spatial Information, i.e. geographical co-ordinates
Extra non address related Building Information
Extra non address related Organisation Information
Administrative Information, i.e. local authorities.
The main link between these additional information tables and the address type entities will
be the primary key of these Address Tables, i.e. BUILDING_ID, THOROUGHFARE_ID, etc.
Each of the four additional information tables has a list of address types which it supports. For
the included Address Tables, you can simply use the primary key of the Address Table to look
up information in the respective tables by linking to its primary key; ECAD_ID.
Figure 1 Example of how sample Address Tables link to SPATIAL_INFO table using primary
keys.
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 42
Table Name Address Tables
SPATIAL_INFO Building
Building Group
Thoroughfare
Locality
Post Town
County
BUILDING_INFO Building
ORGANISATION_INFO Organisation
ADMINISTRATIVE_INFO Building
The data in these tables is updated independently from the address related tables. Each table
has their own LAST_UPDATED and CREATED_DATE columns to reflect these changes.
In the next sections the above Additional Information Tables are described in more detail,
listing the columns and descriptions for each.
2.2.1 Spatial Data
The ECAD supports multiple geographical co-ordinate options for mapping locations. These
co-ordinates are available as Easting/Northing or Latitude/Longitude depending on the
reference system used.
The following geographic co-ordinate systems are currently supported in the ECAD:
Irish National Grid (Easting/Northing)
Irish Transverse Mercator (Easting/Northing)
ETRS89 Reference System (Latitude/Longitude)
These are described in more detail below and further detail can be found on the Ordnance
Survey website (www.osi.ie).
Figure 1 in section 2.2 shows how to join to the SPATIAL_INFO table to get coordinates given
a specific ECAD_ID (e.g. ORGANISATION_ID, BUILDING_ID, THOROUGHFARE_ID, etc.)
To get a coordinate for an Eircode you simply link ADDRESS_POINT.BUILDING_ID =
SPATIAL_INFO.ECAD_ID, bearing in mind that SPATIAL_ACCURACY = 3 is reliable and 4
means the coordinate is unreliable. To perform the link from the POSTAL_ADDRESS table,
you simply link the POSTAL_ADDRESS.BUILDING_ID = SPATIAL_INFO.ECAD_ID.
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 43
2.2.1.1 Spatial Accuracy
The accuracy of the geo-coordinate provided for a building is determined by An Post based
on the source of the information and the methodology employed. The accuracy levels are
described in the following table:
ACCURACY LEVEL DESCRIPTION
1 – OSI MAP This is the highest level of accuracy. The position has been determined by Ordnance Survey Ireland using their most up to date mapping. The position is located in the centroid of the building outline.
2 – OSI ORTHO The position has been determined by Ordnance Survey Ireland using ortho photography.
3 – GENERAL An initial approximate position has been generated by An Post
4 – UNVERIFIED The co-ordinates provided, if any, have not been certified by the source provider. This means that the final quality control process has not been completed, and you should not rely on the accuracy of the provided co-ordinates.
NOTE:
Prior to the Q217 release Eircodes were assigned to new buildings as required, independent
of the Spatial Accuracy of the building in which they were contained. From Q217 release
onwards Eircodes are not assigned to addresses where the Spatial Accuracy is Unverified
(value=4). However, there are still Eircodes in the database within buildings that have
unverified coordinates for the following reasons:
1. Existing Eircodes whose buildings are still unverified
2. Existing Eircodes moved to buildings that are now unverified
The first category is obvious, but the second category requires more explanation. There are
4,134 Eircodes that existed in Q117 that have been moved to a new building in Q217. 1,874
of those Eircodes were in buildings with verified coordinates, but are now in buildings with
unverified coordinates. These changes are a reflection of the source An Post GeoDirectory
data.
These 1,874 Eircodes were displayed on a map in Eircode Finder in Q117. The buildings
they are now in have unverified coordinates, therefore none of these Eircodes are displayed
on a map in Eircode Finder.
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 44
2.2.1.2 Specific Geo-coordinates Vs. Bounding Box Geo-coordinates
For buildings the SPATIAL_INFO table contains geo-coordinates for the specific building
location. For the remaining address types that encompass multiple buildings the specific geo-
co-ordinate fields contain statistical mean values of the co-ordinates and also bounding box
information. The bounding box fields contain the minimum and maximum coordinate values
for all the buildings associated with the address.
The SPATIAL_INFO table has the following fields:
FIELD INFO DESCRIPTION
ECAD_ID Unique 10 digit identification number
ING_EAST Irish National Grid Easting Co-ordinate
ING_NORTH Irish National Grid Northing Co-ordinate
ITM_EAST ITM Easting Co-ordinate
ITM_NORTH ITM Northing Co-ordinate
ETRS89_LAT ETRS89 Latitude Co-ordinate
ETRS89_LONG ETRS89 Longitude Co-ordinate
ING_MIN_EAST Irish National Grid Minimum Easting Coordinate
ING_MIN_NORTH Irish National Grid Minimum Northing Coordinate
ING_MAX_EAST Irish National Grid Maximum Easting Coordinate
ING_MAX_NORTH Irish National Grid Maximum Northing Coordinate
ITM_MIN_EAST ITM Minimum Easting Coordinate
ITM_MIN_NORTH ITM Minimum Northing Coordinate
ITM_MAX_EAST ITM Maximum Easting Coordinate
ITM_MAX_NORTH ITM Maximum Northing Coordinate
ETRS89_MIN_LAT ETRS89 Minimum Latitude Coordinate
ETRS89_MIN_LONG ETRS89 Minimum Longitude Coordinate
ETRS89 _MAX_LAT ETRS89 Maximum Latitude Coordinate
ETRS89 _MAX_LONG ETRS89 Maximum Longitude Coordinate
SPATIAL_ACCURACY Describes Accuracy Level of Geo-Coordinates
CREATED_DATE Date Created for the record
LAST_UPDATED Date Updated for the record
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 45
2.2.1.3 Irish National Grid
The Irish National Grid reference system was derived by the Ordnance Survey of Ireland, it is
a plane co-ordinate system based on a modified Transverse Mercator Map Projection on the
Airy Modified ellipsoid.
Within the grid any location can be mapped using two dimensions Easting (E) and Northings
(N) relative to the false origin. The Irish grid false origin is originated at 200 kilometres west
and 250 kilometres south of true origin. The true origin is located at Latitude: 53°30'00 N and
Longitude: 8°00'00 W.
2.2.1.4 Irish Transverse Mercator (ITM)
ITM is a new co-ordinate system devised for Ireland jointly implemented by the Ordnance
Survey of Ireland (OSI) and the Ordnance Survey of Northern Ireland (OSNI) in 2001. The
name is derived from the Transverse Mercator projection it uses.
It maintains the true origin and central meridian as set in the Irish National Grid but has a
different False Origin, thus distributing the differences between the previous National Irish Grid
distortions due to the projection evenly.
2.2.1.5 ETRS89 European Terrestrial Reference System
The European Terrestrial Reference system is a precise subset of the IRTF (International
Terrestrial Reference Frame) with geographic co-ordinates (latitudes and longitudes) based
on the GRS80 ellipsoid and has become the adopted reference system for Europe. The ETRS
coordinates provided have been calculated from ITM coordinates using MapInfo Professional
version 12.
2.2.1.6 WGS84 Reference System
The Reference System WGS84 is commonly used with GPS devices. It and the European
Reference System ETRS89 are virtually identical and Coordinate Transformation between the
two systems is unnecessary as the positions calculated by these two Reference Systems
currently deviate by far less than one metre.
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 46
2.2.2 Additional Building Information
The following table lists the fields available in the BUILDING_INFO table. The unique identifier
for this table is the BUILDING_ID which is the primary key of the BUILDING table.
FIELD INFO DESCRIPTION
BUILDING_ID Unique 10 digit identification number for the Building.
BUILDING_TYPE_ID The Type of Building e.g. Bungalow, Detached etc.
HOLIDAY_HOME A Yes/No field, indicating whether or not the building is a holiday home. NOTE: This field currently provided for future proofing, no data currently available to Eircode.
UNDER CONSTRUCTION
A Yes/No field, indicating whether or not the building is under construction.
BUILDING_USE R- Residential, C-Commercial, B-Both or U-Unknown.
VACANT A Yes/No field, indicating whether or not the building is vacant.
CREATED_DATE Date Created for the record.
LAST_UPDATED Date Updated for the record.
2.2.3 Additional Organisation Information
The following table lists the fields available in the ORGANISATION_INFO table. The unique
identifier for this table is the ORGANISATION_ID which is the primary key of the
ORGANISATION table.
FIELD INFO DESCRIPTION
ORGANISATION_ID Unique 10 digit identification number for Organisations
VACANT A Yes/No field, indicating whether or not the organisation is vacant.
NACE_CODE The NACE Code for the Category. NOTE: This field currently provided for future proofing, no data currently available to Eircode.
NACE_CATEGORY Name of the NACE Category. NOTE: This field currently provided for future proofing, no data currently available to Eircode.
CREATED_DATE Date Created for the record.
LAST_UPDATED Date Updated for the record.
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 47
NACE CODE
The NACE (Nomenclature of Economic Activities) Classification list for economic activities is
divided into separate categories such as Manufacturing, Agriculture, etc.
2.2.4 Additional Administrative Information
The ADMINISTRATIVE INFO table contains additional generic information for different types
of ECAD Address Information Entities.
The ECAD ID relates to the BUILDING_ID of the Building table.
FIELD INFO DESCRIPTION
ECAD_ID Unique 10 digit identification
LA_ID Unique Identifier for Local Authority
DED_ID Unique Identifier for Electoral Divisions
SMALL_AREA_ID Unique Identifier for the Small Area
TOWNLAND_ID Unique Identifier for townland
GAELTACHT_ID Unique Identifier for the 7 Gaeltacht areas
CREATED_DATE Date Created for the record
LAST_UPDATED Date Updated for the record
The ADMINISTRATIVE INFO table has been populated using boundary data supplied by
Ordnance Survey Ireland. The ITM coordinates for Buildings have been used in SQL Server
2012 to apply the ID’s to the table.
NOTE:
In Q317 release of Eircode Address Database additional fields will be appended to the
ADMINISTRATIVE_INFO tables. Census 2016 has been released at Small Area level, and
updated boundary data has been supplied. Updated boundaries are also available for the
other Administrative information. The Ordnance Survey data used is open data available on
the https://data.gov.ie website. The values in the existing fields will be overwritten with the
latest data. To assist Eircode Address Database users in upgrading their information in a
controlled manner, we will append additional columns to the table that will continue to be
populated with the existing dataset (2015). The new table definition will be as follows:
FIELD INFO DESCRIPTION
ECAD_ID Unique 10 digit identification
LA_ID Unique Identifier for Local Authority 2017 data
DED_ID Unique Identifier for Electoral Divisions 2017 data
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 48
SMALL_AREA_ID Unique Identifier for the Small Area 2017 data
TOWNLAND_ID Unique Identifier for townland 2017 data
GAELTACHT_ID Unique Identifier for the 7 Gaeltacht areas 2017 data
LA_2015_ID Unique Identifier for Local Authority 2015 data
DED_2015_ID Unique Identifier for Electoral Divisions 2015 data
SMALL_AREA_2015_ID Unique Identifier for the Small Area 2015 data
TOWNLAND_2015_ID Unique Identifier for townland 2015 data
GAELTACHT_2015_ID Unique Identifier for the 7 Gaeltacht areas 2015 data
CREATED_DATE Date Created for the record
LAST_UPDATED Date Updated for the record
Local Authority
There are 31 local authorities in Ireland including 26 county councils, 2 city and county
councils, and 3 city councils. Local authorities are multi-purpose bodies charged with the
responsibility for a large range of services within their area, e.g. Housing, Planning, Roads,
etc.
LA_ID LOCAL AUTHORITY
1 CARLOW
2 CAVAN
3 CLARE
4 CORK
5 DONEGAL
6 GALWAY
7 KERRY
8 KILDARE
9 KILKENNY
10 LAOIS
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 49
11 LEITRIM
12 LIMERICK
13 LONGFORD
14 LOUTH
15 MAYO
16 MEATH
17 MONAGHAN
18 OFFALY
19 ROSCOMMON
20 SLIGO
21 TIPPERARY
22 WATERFORD
23 WESTMEATH
24 WEXFORD
25 WICKLOW
26 SOUTH DUBLIN
27 FINGAL COUNTY COUNCIL
28 DUN LAOGHAIRE
29 DUBLIN CITY
30 CORK CITY
31 GALWAY CITY
Electoral Divisions
Electoral Divisions (ED) are legally defined administrative areas in Ireland. There are 3,441
Electoral Divisions. Electoral Divisions are sub-divisions of Counties.
Small Area
Small Area boundaries are sub-divisions of Electoral Divisions and offer a much greater level
of detail in terms of analysing data spatially. A normal Small Area is comprised of
approximately 80-120 dwellings created by the National Institute of Regional and Spatial
Analysis (NIRSA) on behalf of the Ordnance Survey Ireland (OSi) in consultation with the
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 50
Central Statistics Office (CSO). CSO’s Census 2011 publishes SAPS at the Small Area level.
There are 18,488 Small Areas in the ECAD.
Townland
A townland is a small geographical division of land commonly used in Ireland and form the
building blocks for higher-level Electoral Divisions.
Townland names may not be unique within a County.
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 51
2.3 Address Validation
The Eircode is designed to optimise validation against its corresponding address. The Eircode
design and allocation has a number of built-in rules to minimise issues with verbal and written
miscommunication.
2.3.1 Character Set
The character set selected to make up the Eircode was carefully chosen to minimise the
confusion caused by characters that are similar physically or phonetically. This will assist the
accuracy of written and verbal communication of an Eircode.
2.3.2 Rules for Assigning Eircodes
The main aim of the allocation process is to ensure that similar addresses have very different
Eircodes to allow ease of validation of an Eircode against its address.
Let’s consider the following Postal Address to illustrate the concept:
Postal Address
DUNROAMIN
21 STONEWALL DRIVE
DUBLIN 24
D24 TF12
If the Eircode has a data entry error, then we may have examples like the following:
Captured Eircode Entry Error
D24 FT12 Characters transposed
D22 TF12 Incorrect character entered
D24 TF13 Incorrect character entered
D24 TF21 Characters transposed
Etc.
Eircodes have been assigned in a manner to ensure the following is true for all the addresses
associated with Eircodes similar to D24 TF12
None will have a house name of Dunroamin
None will be on street called Stonewall Drive
None will have the same house number and similar street stems, e.g. none of the
following; 21 Stonewall Road, 21 Stonewall Lane, 21 Stonewall Grove, etc.
In the case of a non-unique address:
Postal Address
BALLINROAMIN
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 52
THURLES
CO. TIPPERARY
A65 TF12
Eircodes have been assigned in a manner to ensure the following is true for all the addresses
associated with similar Eircodes to A65 TF12
None will be in the same townland of Ballinroamin
None will be in any townland in Ireland called Ballinroamin
None will be in any similar townland name of Ballinroamin North, Ballinroamin Upper,
etc.
So how does this help us with address validation? Consider the following four input addresses
and their Eircodes:
Example 1 Example 2 Example 3 Example 4
12 STONEWALL DRIVE
BALLINROAMIN 21 STONEWALL DRIVE 21 STONEWALL DRIVE
DUBLIN 24 HOLYCROSS SAGGART ABBEY DUBLIN 24
D24 TF12 TIPPERARY DUBLIN D24 FT12
A65 TF12 D24 TF12
Example 1
In this example we can be confident that the number 12 in the address is an error and should
be corrected to 21.
Example 2
In this example we can confidently validate this address even though the second address line
doesn’t match the Postal Address.
Example 3
In this example we can confidently validate the address even though the second and third
address lines don’t match the Postal Address.
Example 4
In this example we can confidently correct the Eircode from D24 FT12 to D24 TF12.
The following are the complete list of rules that have been implemented when allocating
Eircodes:
Not similar to other Eircodes in the same building
Not similar to Eircodes with the same building name, group of buildings, street, or
townland
Not similar to Eircodes with the same building number and similar street names
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 53
Where adjoining Routing Keys meet, the same Unique Identifier segment of the
Eircode within each are not physically close, designed to be at least 300 metres apart.
Where the address entered cannot be easily verified with the corresponding address, it is
recommended that alias address information is checked to assist verification. Alias
information is covered in section 2.1.
If Eircodes were simply allocated randomly, rather than our rules based approach, then our
calculations indicate that eight percent of addresses would have Eircodes that would be liable
to address verification issues. While every effort has been made to mitigate this issue, we
cannot guarantee 100% that all instances of address/Eircode verification confusion have been
resolved.
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 54
2.4 Sample ECAD Queries
The sample database queries below demonstrate some commonly requested address
queries. The SQL is for a SQL Server database or similar relational database.
2.4.1 Querying Towns by County
Show all the town in a given county:
-- all post towns in Wexford SELECT C.NAME as county, PT.NAME as post_town FROM BUILDING b INNER JOIN POST_TOWN PT ON PT.POST_TOWN_ID = b.POST_TOWN_ID INNER JOIN COUNTY C ON b.COUNTY_ID = C.COUNTY_ID WHERE C.NAME = 'WEXFORD' GROUP BY C.NAME, PT.NAME ORDER BY POST_TOWN
Determine number of buildings in each town in a given county:
-- number of buildings in each post town in Wexford SELECT C.NAME as county, PT.NAME as post_town, COUNT(*) as building_count FROM BUILDING b INNER JOIN POST_TOWN PT ON PT.POST_TOWN_ID = b.POST_TOWN_ID INNER JOIN COUNTY C ON b.COUNTY_ID = C.COUNTY_ID WHERE C.NAME = 'WEXFORD' GROUP BY C.NAME, PT.NAME ORDER BY POST_TOWN
2.4.2 Querying Industrial Estates in a County
Show industrial estates in Dublin:
SELECT DISTINCT l.NAME as Industrial_Estate FROM BUILDING b INNER JOIN COUNTY c ON b.COUNTY_ID = c.COUNTY_ID INNER JOIN LOCALITY l ON (b.PRIMARY_LOCALITY_ID = l.LOCALITY_ID OR b.SECONDARY_LOCALITY_ID = l.LOCALITY_ID) WHERE c.NAME = 'DUBLIN' AND l.ADDRESS_TYPE_ID = 1080 -- Industrial Estate UNION
SELECT DISTINCT b.NAME as Industrial_Estate FROM BUILDING b INNER JOIN COUNTY c ON b.COUNTY_ID = c.COUNTY_ID WHERE c.NAME = 'DUBLIN' AND b.ADDRESS_TYPE_ID = 1080 -- Industrial Estate UNION SELECT DISTINCT bg.NAME as Industrial_Estate FROM BUILDING b INNER JOIN COUNTY c ON b.COUNTY_ID = c.COUNTY_ID INNER JOIN BUILDING_GROUP bg ON (b.BUILDING_GROUP_ID = bg.BUILDING_GROUP_ID) WHERE c.NAME = 'DUBLIN' AND bg.ADDRESS_TYPE_ID = 1080 -- Industrial Estate
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 55
2.4.3 Querying Thoroughfares in a Town
Show roads in Bantry:
SELECT DISTINCT T.THOROUGHFARE_ID , T.NAME FROM (SELECT POST_TOWN_ID FROM POST_TOWN WHERE NAME = 'BANTRY') PT INNER JOIN BUILDING B ON B.POST_TOWN_ID = PT.POST_TOWN_ID INNER JOIN THOROUGHFARE T ON (T.THOROUGHFARE_ID = B.PRIMARY_THOROUGHFARE_ID OR T.THOROUGHFARE_ID = B.SECONDARY_THOROUGHFARE_ID) LEFT OUTER JOIN LOCALITY LOC1 ON (LOC1.LOCALITY_ID = B.PRIMARY_LOCALITY_ID) LEFT OUTER JOIN LOCALITY LOC2 ON (LOC2.LOCALITY_ID = B.SECONDARY_LOCALITY_ID) WHERE (LOC1.LOCALITY_ID IS NULL OR LOC1.ADDRESS_TYPE_ID NOT IN (3400,3600,3800)) and (LOC2.LOCALITY_ID IS NULL OR LOC2.ADDRESS_TYPE_ID NOT IN (3400,3600,3800)) GROUP BY T.THOROUGHFARE_ID, T.NAME, LOC1.LOCALITY_ID, LOC2.LOCALITY_ID
2.4.4 Postal Address View
The Postal Address View is a view of data from the ECAD address tables in the ECAD
database that replicates the ECAD Postal Address table.
The extract requires two primary steps:
1. get the address data from the tables
2. construct address lines 1 to 8 from the address data
Construction of the eight columns for address lines 1 to 8 requires conditional logic and is
therefore best suited to a function or other programming construct in either SQL or any other
programming language.
The following sub-sections describe an example of how a Postal Address View might be
constructed on a relational database, in this case a SQL Server database. Comments are
embedded in the SQL for clarification: The SQL is contained in Appendix 3.
Postal Address Line View
The nine address lines are constructed from the following address elements:
Department
Organisation
Sub Building
Building Number
Building Group
Primary Thoroughfare
Secondary Thoroughfare
Primary Locality
Secondary Locality
Post Town
County
Eircode
The Irish language version of the Postal Address is to be produced in the same manner as
the English version simply by replacing references to any NAME column to NAME_IRISH.
The exception is the COUNTY table where NAME_IRISH_CO is used.
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 56
There are a number of address points that do not have an associated Eircode. This is due to
the building not receiving a direct delivery of mail by the Universal Service Provider. In these
cases mail is generally delivered centrally and distributed to each building by internal mail
processes, e.g. a University Campus. These addresses do not have a Postal Address as
defined by Irish Standard - I.S. EN 14142-1:2011 (Postal services. Address databases), as
operated by the Universal Service Provider, An Post. The BUILDING table has a STATUS
field to indicate this information. If it is set to a value of ‘1’ then the building is included in the
Postal Address table, if it has a status of ‘2’ it is excluded.
The construction of the eight address lines is conditional upon the content of these elements
and so typically the conditional logic is put in a function. Each value present appears on the
next available address line, except for sub building which may prefix another element, and
building number which always prefixes the next available address line after building name.
Having constructed the eight address line rows, they are “pivoted” to convert them from rows
into columns which can then be appended to each row in the view, as described above. The
example SQL function (f_get_address_cols) gets the address lines (f_get_address_lines) and
pivots them into 7 columns. See Appendix 3 for details.
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 57
3. Data Provision and Updates
Updates are available from Eircode on a quarterly basis. These are available for secure
download via the Eircode website www.eircode.ie
3.1 ECAD
There are two types of update available for the ECAD:
Complete dataset
Update only
The data files are tab delimited with column headers as the first line and each subsequent line
is a row of data. The lines are separated by newline characters. The character encoding is
Windows 1252.
Description Character Ascii values
Delimiter Tab (\t) 0x09
Newline Newline (\r \n) 0x0A , 0x0D
3.1.1 Complete Dataset
The complete dataset consists of a single zip file that contains a text file for each table in the
ECAD, each containing the full record set. The schema is described in Appendix 1. The file
size estimate for the Complete Dataset zip file is 150Mb, the unzipped contents are
approximately 2 GB.
When updating an ECAD with the complete dataset, the existing data for the all ECAD tables
should be removed, leaving an empty schema. Then each text file is imported into the relevant
table.
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 58
The tables included are (Structures for and descriptions of all these tables are contained in
Appendix 1):
# TABLENAME
1 ADDRESS_POINT
2 ADDRESS_POINT_ALIAS
3 ADDRESS_TYPE
4 ADMINISTRATIVE_INFO
5 ALIAS_TYPE
6 BUILDING
7 BUILDING_ALIAS
8 BUILDING_GEOGRAPHIC
9 BUILDING_GROUP
10 BUILDING_GROUP_ALIAS
11 BUILDING_INFO
12 BUILDING_TYPE
13 COUNTY
14 COUNTY_ALIAS
15 DESCRIPTOR
16 GEODIRECTORY_LOOKUP
17 GEOGRAPHIC
18 GEOGRAPHIC_ADDRESS
19 HISTORY_DETAIL
20 HISTORY_POSTAL_ADDRESS
21 HISTORY_TYPE
22 IRISH_VERIFICATION
23 LOCALITY
24 LOCALITY_ALIAS
25 ORGANISATION
26 ORGANISATION_ALIAS
27 ORGANISATION_INFO
28 POST_TOWN
29 POST_TOWN_ALIAS
30 POSTAL_ADDRESS
31 QUALIFIER
32 ROUTING_KEY
33 SPATIAL_INFO
34 SUB_ADDRESS_POINT
35 THOROUGHFARE
36 THOROUGHFARE_ALIAS
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 59
3.1.2 Update Only
The Update Only version contains all the changes required to add, update and remove the
necessary records to upgrade it from one ECAD release to the next. This deliverable
comprises of multiple files, these files are categorised into three different types: insertions,
updates and deletions.
3.1.2.1 Insert File for Update Only Process
As part of the Update Only release there is an insert file for each table that has new records.
The new data records in each file must be inserted into the relevant table.
3.1.2.2 Update File for Update Only process (ECAD_UPDATE)
As part of the Update Only release there is one update file. This file contains details of the
changes that have to be made to the ECAD compared to the previous release.
Each data row contains directions to update to one field of data in the ECAD. The data contains
the ECAD identifier, table name, column name, the new value.
The example below shows some sample records in an update file:
UPDATE_ID TABLE_NAME ECAD_ID COLUMN_NAME NEW_VALUE
1 BUILDING 54684 BUILDING_NAME DUNROAMIN
2 BUILDING 54684 LAST_UPDATED 2014-01-01 09:00:00
Each update must be performed in order, to bring the ECAD up to date.
3.1.2.3 Delete File for Update process (ECAD_DELETE)
As part of the Update Only release there is one delete file. This file contains details of all
records that need to be removed from the ECAD as part of this release.
Each data row contains details of the records to remove from the ECAD. The data contains
the ECAD identifier and the table name.
DELETE_ID ECAD_ID TABLE_NAME
1 1000658732 BUILDING
2 1000074563 ORGANISATION
When each data record in the delete file has been processed the ECAD update is complete.
There are two types of Update Only releases: Quarterly and Weekly.
1. Quarterly
This will update ECAD from the last Quarterly release to the current Quarterly release.
2. Weekly
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 60
This will update ECAD from the last release (weekly or Quarterly whichever was last)
to the current version. To upgrade from Quarterly to Weekly updates you will need to
apply the latest Quarterly Release (or Full Release for the Quarter) and then apply all
weekly updates to that point. You then apply Weekly updates from that point onwards,
there is no need to apply Quarterly releases.
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 61
4. Appendices
4.1 Appendix 1 – Physical Model for Model ECAD V1
Entity Report
Entity 'dbo.ADDRESS_POINT'
Attributes
Key Attribute Name Data Type Comment
PK ADDRESS_POINT_ID Int
FK ADDRESS_TYPE_ID Int
FK BUILDING_ID Int
NAME Nvarchar(60) e.g. Flat 4, Apartment 6
NAME_IRISH Nvarchar(60)
FK IRISH_VERIFICATION_ID Int
EIRCODE Varchar(7)
FULL_ADDRESS_LINE Nvarchar(1)
SUB_BUILDING_NAME_REQUIRED Nvarchar(1)
CREATED_DATE Datetime
LAST_UPDATED Datetime
Indexes
Key Name Columns Unique
PK PK_ADDRESS_POINT ADDRESS_POINT_ID True
Foreign Keys
Name Columns
FK_ADDRESS_POINT_-
ADDRESS_TYPE_ID
ADDRESS_TYPE_ID->[dbo].[ADDRESS_TYPE].[ADDRESS_-
TYPE_ID]
FK_ADDRESS_POINT_BUILDING_ID BUILDING_ID->[dbo].[BUILDING].[BUILDING_ID]
FK_ADDRESS_POINT_IRISH_-
VERIFICATION_ID
IRISH_VERIFICATION_ID->[dbo].[IRISH_-
VERIFICATION].[IRISH_VERIFICATION_ID]
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 62
Entity 'dbo.ADDRESS_POINT_ALIAS'
Attributes
Key Attribute Name Data Type Comments
PK ADDRESS_POINT_ALIAS_ID Int
FK ALIAS_TYPE_ID Int
FK ADDRESS_POINT_ID Int
FK BUILDING_ID Int
NAME Nvarchar(80)
NAME_IRISH Nvarchar(80)
FK BUILDING_GROUP_ID Int
FK PRIMARY_THOROUGHFARE_ID Int
FK SECONDARY_THOROUGHFARE_ID Int
FK PRIMARY_LOCALITY_ID Int
FK SECONDARY_LOCALITY_ID Int
FK POST_TOWN_ID Int
FK POST_COUNTY_ID Int
CREATED_DATE Datetime
LAST_UPDATED Datetime
Indexes
Key Name Columns Unique
PK PK_ADDRESS_POINT_ALIAS_ID ADDRESS_POINT_ALIAS_ID True
Foreign Keys
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 63
Name Columns
FK_ADDRESS_POINT_-
ALIAS_ADDRESS_POINT_ID
ADDRESS_POINT_ID->[dbo].[ADDRESS_POINT].[ADDRESS_-
POINT_ID]
FK_ADDRESS_POINT_ALIAS_-
ALIAS_TYPE_ID
ALIAS_TYPE_ID->[dbo].[ALIAS_TYPE].[ALIAS_TYPE_ID]
FK_ADDRESS_POINT_ALIAS_BG_ID BUILDING_GROUP_ID->[dbo].[BUILDING_-
GROUP].[BUILDING_GROUP_ID]
FK_ADDRESS_POINT_ALIAS_BLD_ID BUILDING_ID->[dbo].[BUILDING].[BUILDING_ID]
FK_ADDRESS_POINT_ALIAS_-
COUNTY_ID
POST_COUNTY_ID->[dbo].[COUNTY].[COUNTY_ID]
FK_ADDRESS_POINT_ALIAS_-
PTOWN_ID
POST_TOWN_ID->[dbo].[POST_TOWN].[POST_TOWN_ID]
FK_ADDRES_POINT_ALIAS_LOC1_ID PRIMARY_LOCALITY_ID->[dbo].[LOCALITY].[LOCALITY_ID]
FK_ADDRESS_POINT_ALIAS_-
THO1_ID
PRIMARY_THOROUGHFARE_ID-
>[dbo].[THOROUGHFARE].[THOROUGHFARE_ID]
FK_ADDRESS_POINT_ALIAS_-
LOC2_ID
SECONDARY_LOCALITY_ID-
>[dbo].[LOCALITY].[LOCALITY_ID]
FK_ADDRESS_POINT_ALIAS_-
THO2_ID
SECONDARY_THOROUGHFARE_ID-
>[dbo].[THOROUGHFARE].[THOROUGHFARE_ID]
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 64
Entity 'dbo.ADDRESS_TYPE'
Attributes
Key Attribute Name Data Type Comments
PK ADDRESS_TYPE_ID Int
NAME Nvarchar(80)
NAME_IRISH Nvarchar(80)
FK IRISH_VERIFICATION_ID Int
CREATED_DATE Datetime
LAST_UPDATED Datetime
Indexes
Key Name Columns Unique
PK PK_ADDRESS_TYPE ADDRESS_TYPE_ID True
Foreign Keys
Name Columns
FK_ADDRESS_TYPE_IRISH_-
VERIFICATION_ID
IRISH_VERIFICATION_ID->[dbo].[IRISH_-
VERIFICATION].[IRISH_VERIFICATION_ID]
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 65
Entity 'dbo.ADMINISTRATIVE_INFO'
Attributes
Key Attribute Name Data Type Comments
PK ECAD_ID Int
LA_ID Int
DED_ID Int
SMALL_AREA_ID Int
TOWNLAND_ID Int
GAELTACHT_ID Int
CREATED_DATE Datetime
LAST_UPDATED Datetime
Indexes
Key Name Columns Unique
PK_ADMINISTRATIVE_INFO ECAD_ID True
Foreign Keys
Name Columns
FK_ADMINISTRATIVE_INFO_BUILDING_ID ECAD_ID->[dbo].[BUILDING].[BUILDING_ID]
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 66
Entity 'dbo.ALIAS_TYPE'
Attributes
Key Attribute Name Data Type Comments
PK ALIAS_TYPE_ID Int
NAME Nvarchar(80)
NAME_IRISH Nvarchar(80)
FK IRISH_VERIFICATION_ID Int
CREATED_DATE Datetime
LAST_UPDATED Datetime
Indexes
Key Name Columns Unique
PK PK_ALIAS_TYPE ALIAS_TYPE_ID True
Foreign Keys
Name Columns
FK_ALIAS_TYPE_IRISH_-
VERIFICATION_ID
IRISH_VERIFICATION_ID->[dbo].[IRISH_-
VERIFICATION].[IRISH_VERIFICATION_ID]
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 67
Entity 'dbo.BUILDING'
Attributes
Key Attribute Name Data Type Comments
PK BUILDING_ID Int
FK ADDRESS_TYPE_ID Int
NAME Nvarchar(60)
NAME_IRISH Nvarchar(60)
FK IRISH_VERIFICATION_ID Int
BUILDING_NAME_REQUIRED Varchar(1)
NUMBER Nvarchar(40)
BUILDING_NUMBER_REQUIRED Varchar(1)
FK BUILDING_GROUP_ID Int
BUILDING_GROUP_REQUIRED Varchar(1)
FK PRIMARY_THOROUGHFARE_ID Int
PRIMARY_THOROUGHFARE_REQUIRED Varchar(1)
FK SECONDARY_THOROUGHFARE_ID Int
SECONDARY_THOROUGHFARE_REQUIRED
Varchar(1)
FK PRIMARY_LOCALITY_ID Int
PRIMARY_LOCALITY_REQUIRED Varchar(1)
FK SECONDARY_LOCALITY_ID Int
SECONDARY_LOCALITY_REQUIRED Varchar(1)
FK POST_TOWN_ID Int
POST_TOWN_REQUIRED Varchar(1)
FK POST_COUNTY_ID Int
POST_COUNTY_REQUIRED Varchar(1)
FK COUNTY_ID Int
FK ROUTING_KEY_ID Int
STATUS Int See 2.4.4 Postal Adddress View
CREATED_DATE Datetime
LAST_UPDATED Datetime
Indexes
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 68
Key Name Columns Unique
PK PK_BUILDING BUILDING_ID True
Foreign Keys
Name Columns
FK_BUILDING_ADDRESS_-
TYPE_ID
ADDRESS_TYPE_ID->[dbo].[ADDRESS_TYPE].[ADDRESS_TYPE_ID]
FK_BUILDING_BUILDING_-
GROUP_ID
BUILDING_GROUP_ID->[dbo].[BUILDING_GROUP].[BUILDING_-
GROUP_ID]
FK_BUILDING_COUNTY_ID COUNTY_ID->[dbo].[COUNTY].[COUNTY_ID]
FK_BUILDING_IRISH_-
VERIFICATION_ID
IRISH_VERIFICATION_ID->[dbo].[IRISH_VERIFICATION].[IRISH_-
VERIFICATION_ID]
FK_BUILDING_PCOUNTY_ID POST_COUNTY_ID->[dbo].[COUNTY].[COUNTY_ID]
FK_BUILDING_PTOWN_ID POST_TOWN_ID->[dbo].[POST_TOWN].[POST_TOWN_ID]
FK_BUILDING_LOCALITY1_ID PRIMARY_LOCALITY_ID->[dbo].[LOCALITY].[LOCALITY_ID]
FK_BUILDING_-
THOROUGHFARE1_ID
PRIMARY_THOROUGHFARE_ID-
>[dbo].[THOROUGHFARE].[THOROUGHFARE_ID]
FK_BUILDING_LOCALITY2_ID SECONDARY_LOCALITY_ID->[dbo].[LOCALITY].[LOCALITY_ID]
FK_BUILDING_-
THOROUGHFARE2_ID
SECONDARY_THOROUGHFARE_ID-
>[dbo].[THOROUGHFARE].[THOROUGHFARE_ID]
FK_BUILDING_
ROUTING_KEY_ID
ROUTING_KEY_ID->[dbo].[ROUTING_KEY].[ROUTING_KEY_ID]
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 69
Entity 'dbo.BUILDING_ALIAS'
Attributes
Key Attribute Name Data Type Comments
PK BUILDING_ALIAS_ID Int
FK ALIAS_TYPE_ID Int
FK BUILDING_ID Int
NAME Nvarchar(80)
NAME_IRISH Nvarchar(80)
NUMBER Nvarchar(80)
FK BUILDING_GROUP_ID Int
FK PRIMARY_THOROUGHFARE_ID Int
FK SECONDARY_THOROUGHFARE_ID Int
FK PRIMARY_LOCALITY_ID Int
FK SECONDARY_LOCALITY_ID Int
FK POST_TOWN_ID Int
FK POST_COUNTY_ID Int
CREATED_DATE Datetime
LAST_UPDATED Datetime
Indexes
Key Name Columns Unique
PK PK_BUILDING_ALIAS BUILDING_ALIAS_ID True
Foreign Keys
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 70
Name Columns
FK_BUILDING_ALIAS_ALIAS_-
TYPE_ID
ALIAS_TYPE_ID->[dbo].[ALIAS_TYPE].[ALIAS_TYPE_ID]
FK_BUILDING_ALIAS_-
BUILDING_GROUP_ID
BUILDING_GROUP_ID->[dbo].[BUILDING_GROUP].[BUILDING_-
GROUP_ID]
FK_BUILDING_ALIAS_-
BUILDING_ID
BUILDING_ID->[dbo].[BUILDING].[BUILDING_ID]
FK_BUILDING_ALIAS_P-
COUNTY_ID
POST_COUNTY_ID->[dbo].[COUNTY].[COUNTY_ID]
FK_BUILDING_ALIAS_POST_-
TOWN_ID
POST_TOWN_ID->[dbo].[POST_TOWN].[POST_TOWN_ID]
FK_BUILDING_ALIAS_-
LOCALITY1_ID
PRIMARY_LOCALITY_ID->[dbo].[LOCALITY].[LOCALITY_ID]
FK_BUILDING_ALIAS_-
THOROUGHFARE1_ID
PRIMARY_THOROUGHFARE_ID-
>[dbo].[THOROUGHFARE].[THOROUGHFARE_ID]
FK_BUILDING_ALIAS_-
LOCALITY2_ID
SECONDARY_LOCALITY_ID->[dbo].[LOCALITY].[LOCALITY_ID]
FK_BUILDING_ALIAS_-
THOROUGHFARE2_ID
SECONDARY_THOROUGHFARE_ID-
>[dbo].[THOROUGHFARE].[THOROUGHFARE_ID]
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 71
Entity 'dbo.BUILDING_GEOGRAPHIC'
Attributes
Key Attribute Name Data Type Comments
PK BUILDING_ID Int
FK PRIMARY_LOCALITY_ID Int
PRIMARY_LOCALITY_REQUIRED Varchar(1)
FK SECONDARY_LOCALITY_ID Int
SECONDARY_LOCALITY_REQUIRED Varchar(1)
FK POST_TOWN_ID Int
POST_TOWN_REQUIRED Varchar(1)
FK POST_COUNTY_ID Int
POST_COUNTY_REQUIRED Varchar(1)
CREATED_DATE Datetime
LAST_UPDATED Datetime
Indexes
Key Name Columns Unique
PK PK_BUILDING BUILDING_ID True
Foreign Keys
Name Columns
FK_GEO_BUILDING__ID BUILDING_ID->[dbo].[BUILDING].[BUILDING_ID]
FK_GEO_BUILDING_PCOUNTY_ID POST_COUNTY_ID->[dbo].[COUNTY].[COUNTY_ID]
FK_GEO_BUILDING_PTOWN_ID POST_TOWN_ID->[dbo].[POST_TOWN].[POST_TOWN_ID]
FK_GEO_BUILDING_-
LOCALITY1_ID
PRIMARY_LOCALITY_ID->[dbo].[LOCALITY].[LOCALITY_ID]
FK_GEO_BUILDING_-
LOCALITY2_ID
SECONDARY_LOCALITY_ID->[dbo].[LOCALITY].[LOCALITY_-
ID]
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 72
Entity 'dbo.BUILDING_GROUP'
Attributes
Key Attribute Name Data Type Comments
PK BUILDING_GROUP_ID Int
FK ADDRESS_TYPE_ID Int
NAME Nvarchar(80)
NAME_IRISH Nvarchar(80)
FK IRISH_VERIFICATION_ID Int
FK QUALIFIER_ID Int
FK DESCRIPTOR_ID Int
FK GEOGRAPHIC_ID Int
BUILDING_GROUP_NAME Nvarchar(80)
BUILDING_GROUP_NAME_IRISH Nvarchar(80)
CREATED_DATE Datetime
LAST_UPDATED Datetime
Indexes
Key Name Columns Unique
PK PK_BUILDING_GROUP BUILDING_GROUP_ID True
Foreign Keys
Name Columns
FK_BUILDING_GROUP_-
ADDRESS_TYPE_ID
ADDRESS_TYPE_ID->[dbo].[ADDRESS_TYPE].[ADDRESS_-
TYPE_ID]
FK_BUILDING_GROUP_-
DESCRIPTOR_ID
DESCRIPTOR_ID->[dbo].[DESCRIPTOR].[DESCRIPTOR_ID]
FK_BUILDING_GROUP_-
GEOGRAPHIC_ID
GEOGRAPHIC_ID->[dbo].[GEOGRAPHIC].[GEOGRAPHIC_ID]
FK_BUILDING_GROUP_IRISH_-
VERIFICATION_ID
IRISH_VERIFICATION_ID->[dbo].[IRISH_-
VERIFICATION].[IRISH_VERIFICATION_ID]
FK_BUILDING_GROUP_-
QUALIFIER_ID
QUALIFIER_ID->[dbo].[QUALIFIER].[QUALIFIER_ID]
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 73
Entity 'dbo.BUILDING_GROUP_ALIAS'
Attributes
Key Attribute Name Data Type Comments
PK BUILDING_GROUP_ALIAS_ID Int
FK ALIAS_TYPE_ID Int
FK BUILDING_GROUP_ID Int
NAME Nvarchar(80)
NAME_IRISH Nvarchar(80)
FK PRIMARY_THOROUGHFARE_ID Int
FK SECONDARY_THOROUGHFARE_ID Int
FK PRIMARY_LOCALITY_ID Int
FK SECONDARY_LOCALITY_ID Int
FK POST_TOWN_ID Int
FK POST_COUNTY_ID Int
CREATED_DATE Datetime
LAST_UPDATED Datetime
Indexes
Key Name Columns Unique
PK PK_BUILDING_GROUP_ALIAS BUILDING_GROUP_ALIAS_ID True
Foreign Keys
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 74
Name Columns
FK_BUILDING_GROUP_ALIAS_-
ALIAS_TYPE_ID
ALIAS_TYPE_ID->[dbo].[ALIAS_TYPE].[ALIAS_TYPE_ID]
FK_BUILDING_GROUP_ALIAS_-
BUILDING_GROUP_ID
BUILDING_GROUP_ID->[dbo].[BUILDING_-
GROUP].[BUILDING_GROUP_ID]
FK_BUILDING_GROUP_ALIAS_-
PCOUNTY_ID
POST_COUNTY_ID->[dbo].[COUNTY].[COUNTY_ID]
FK_BUILDING_GROUP_ALIAS_-
POST_TOWN_ID
POST_TOWN_ID->[dbo].[POST_TOWN].[POST_TOWN_ID]
FK_BUILDING_GROUP_ALIAS_-
LOCALITY1_ID
PRIMARY_LOCALITY_ID->[dbo].[LOCALITY].[LOCALITY_ID]
FK_BUILDING_GROUP_ALIAS_-
THOROUGHFARE1_ID
PRIMARY_THOROUGHFARE_ID-
>[dbo].[THOROUGHFARE].[THOROUGHFARE_ID]
FK_BUILDING_GROUP_ALIAS_-
LOCALITY2_ID
SECONDARY_LOCALITY_ID->[dbo].[LOCALITY].[LOCALITY_-
ID]
FK_BUILDING_GROUP_ALIAS_-
THOROUGHFARE2_ID
SECONDARY_THOROUGHFARE_ID-
>[dbo].[THOROUGHFARE].[THOROUGHFARE_ID]
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 75
Entity 'dbo.BUILDING_INFO'
Attributes
Key Attribute Name Data Type Comments
PK/FK BUILDING_ID Int
FK BUILDING_TYPE_ID Int
HOLIDAY_HOME Nvarchar(1)
UNDER_CONSTRUCTION Nvarchar(1)
BUILDING_USE Nvarchar(1)
VACANT Nvarchar(1)
CREATED_DATE Datetime
LAST_UPDATED Datetime
Indexes
Key Name Columns Unique
PK PK_BUILDING_INFO BUILDING_ID True
Foreign Keys
Name Columns
FK_BUILDING_INFO_BUILDING_ID BUILDING_ID->[dbo].[BUILDING].[BUILDING_ID]
FK_BUILDING_INFO_BUILDING_-
TYPE_ID
BUILDING_TYPE_ID->[dbo].[BUILDING_TYPE].[BUILDING_-
TYPE_ID]
Entity 'dbo.BUILDING_TYPE'
Attributes
Key Attribute Name Data Type Comments
PK BUILDING_TYPE_ID Int
NAME Nvarchar(50)
NAME_IRISH Nvarchar(50)
FK IRISH_VERIFICATION_ID Int
CODE Nvarchar(5)
CREATED_DATE Datetime
LAST_UPDATED Datetime
Indexes
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 76
Key Name Columns Unique
PK PK_BUILDING_TYPE BUILDING_TYPE_ID True
Foreign Keys
Name Columns
FK_BUILDING_TYPE_-
IRISH_VERIFICATION_ID
IRISH_VERIFICATION_ID-
>[dbo].[IRISH_VERIFICATION_ID].[IRISH_VERIFICATION_ID]
Entity 'dbo.COUNTY'
Attributes
Key Attribute Name Data Type Comments
PK COUNTY_ID Int
FK ADDRESS_TYPE_ID Int
NAME Nvarchar(50)
NAME_IRISH Nvarchar(50)
NAME_IRISH_CO Nvarchar(50)
FK IRISH_VERIFICATION_ID Int
CREATED_DATE Datetime
LAST_UPDATED Datetime
Indexes
Key Name Columns Unique
PK PK_COUNTY COUNTY_ID True
Foreign Keys
Name Columns
FK_COUNTY_ADDRESS_-
TYPE_ID
ADDRESS_TYPE_ID->[dbo].[ADDRESS_TYPE].[ADDRESS_TYPE_-
ID]
FK_COUNTY_IRISH_-
VERIFICATION_ID
IRISH_VERIFICATION_ID->[dbo].[IRISH_VERIFICATION].[IRISH_-
VERIFICATION_ID]
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 77
Entity 'dbo.COUNTY_ALIAS'
Attributes
Key Attribute Name Data Type Comments
PK COUNTY_ALIAS_ID Int
FK ALIAS_TYPE_ID Int
FK COUNTY_ID Int
NAME Nvarchar(50)
NAME_IRISH Nvarchar(50)
NAME_IRISH_CO Nvarchar(50)
CREATED_DATE Datetime
LAST_UPDATED Datetime
Indexes
Key Name Columns Unique
PK PK_COUNTY_ALIAS COUNTY_ALIAS_ID True
Foreign Keys
Name Columns
FK_COUNTY_ALIAS_ALIAS_TYPE_ID ALIAS_TYPE_ID->[dbo].[ALIAS_TYPE].[ALIAS_TYPE_ID]
FK_COUNTY_ALIAS_COUNTY_ID COUNTY_ID->[dbo].[COUNTY].[COUNTY_ID]
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 78
Entity 'dbo.DESCRIPTOR'
Attributes
Key Attribute Name Data Type Comments
PK DESCRIPTOR_ID Int
NAME Nvarchar(80)
NAME_IRISH Nvarchar(80)
FK IRISH_VERIFICATION_ID Int
CREATED_DATE Datetime
LAST_UPDATED Datetime
Indexes
Key Name Columns Unique
PK PK_DESCRIPTOR DECRIPTOR_ID True
Foreign Keys
Name Columns
FK_DESCRIPTOR_IRISH_-
VERIFICATION
IRISH_VERIFICATION_ID->[dbo].[IRISH_VERIFICATION].[IRISH_-
VERIFICATION_ID]
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 79
Entity 'dbo.GEODIRECTORY_LOOKUP'
Attributes
Key Attribute Name Data Type Comments
Pk GEODIRECTORY_LOOKUP_ID Int
ECAD_ID Int
GEO_ID Int
ECAD_TABLE Nvarchar(50)
GEO_TABLE Nvarchar(50)
CREATED_DATE Datetime
LAST_UPDATED Datetime
Indexes
Key Name Columns Unique
PK PK_GEODIRECTORY_LOOKUP_ID GEODIRECTORY_LOOKUP_ID True
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 80
Entity 'dbo.GEOGRAPHIC'
Attributes
Key Attribute Name Data Type Comments
PK GEOGRAPHIC_ID Int
NAME Nvarchar(80)
NAME_IRISH Nvarchar(80)
FK IRISH_VERIFICATION_ID Int
CREATED_DATE Datetime
LAST_UPDATED Datetime
Indexes
Key Name Columns Unique
PK PK_GEOGRAPHIC GEOGRAPHIC_ID True
Foreign Keys
Name Columns
FK_GEOGRAPHIC_IRISH_-
VERIFICATION
IRISH_VERIFICATION_ID->[dbo].[IRISH_VERIFICATION].[IRISH_-
VERIFICATION_ID]
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 81
Entity 'dbo.GEOGRAPHIC_ADDRESS'
Attributes
Key Attribute Name Data Type Comments
PK ECAD_ID Int
FK ORGANISATION_ID Int
FK ADDRESS_POINT_ID Int
FK BUILDING_ID Int
FK BUILDING_GROUP_ID Int
FK PRIMARY_THOROUGHFARE_ID Int
FK SECONDARY_THOROUGHFARE_ID Int
FK PRIMARY_LOCALITY_ID Int
FK SECONDARY_LOCALITY_ID Int
FK POST_TOWN_ID Int
FK POST_COUNTY_ID Int
EIRCODE Varchar(7)
NUA Varchar(1)
GAELTACHT Varchar(1)
ADDR_LINE_1 Nvarchar(200)
ADDR_LINE_2 Nvarchar(200)
ADDR_LINE_3 Nvarchar(200)
ADDR_LINE_4 Nvarchar(200)
ADDR_LINE_5 Nvarchar(200)
ADDR_LINE_6 Nvarchar(200)
ADDR_LINE_7 Nvarchar(200)
ADDR_LINE_8 Nvarchar(200)
ADDR_LINE_9 Nvarchar(200)
IRISH_ADDR_LINE_1 Nvarchar(200)
IRISH_ADDR_LINE_2 Nvarchar(200)
IRISH_ADDR_LINE_3 Nvarchar(200)
IRISH_ADDR_LINE_4 Nvarchar(200)
IRISH_ADDR_LINE_5 Nvarchar(200)
IRISH_ADDR_LINE_6 Nvarchar(200)
IRISH_ADDR_LINE_7 Nvarchar(200)
IRISH_ADDR_LINE_8 Nvarchar(200)
IRISH_ADDR_LINE_9 Nvarchar(200)
ADDRESS_REFERENCE Varchar(16)
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 82
Indexes
Key Name Columns Unique
PK PK_GEOGRAPHIC_ADDRESS ECAD_ID True
Foreign Keys
Name Columns
FK_GEOGRAPHIC_ADDRESS_AP_ID ADDRESS_POINT_ID-
>[dbo].[ADDRESS_POINT].[ADDRESS_POINT_ID]
FK_GEOGRAPHIC_ADDRESS _BG_ID BUILDING_GROUP_ID->[dbo].[BUILDING_-
GROUP].[BUILDING_GROUP_ID]
FK_GEOGRAPHIC_ADDRESS _BLD_ID BUILDING_ID->[dbo].[BUILDING].[BUILDING_ID]
FK_GEOGRAPHIC_ADDRESS _ID ORGANISATION_ID-
>[dbo].[ORGANISATION].[ORGANISATION_ID]
FK_GEOGRAPHIC_ADDRESS_PCOUNTY_ID POST_COUNTY_ID->[dbo].[COUNTY].[COUNTY_ID]
FK_GEOGRAPHIC_ADDRESS_PTOWN_ID POST_TOWN_ID->[dbo].[POST_TOWN].[POST_-
TOWN_ID]
FK_GEOGRAPHIC_ADDRESS _LOC1_ID PRIMARY_LOCALITY_ID-
>[dbo].[LOCALITY].[LOCALITY_ID]
FK_GEOGRAPHIC_ADDRESS_THORO1_ID PRIMARY_THOROUGHFARE_ID-
>[dbo].[LOCALITY].[LOCALITY_ID]
FK_GEOGRAPHIC_ADDRESS_LOC2_ID SECONDARY_LOCALITY_ID-
>[dbo].[LOCALITY].[LOCALITY_ID]
FK_GEOGRAPHIC_ADDRESS_THORO2_ID SECONDARY_THOROUGHFARE_ID-
>[dbo].[THOROUGHFARE].[THOROUGHFARE_ID]
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 83
Entity 'dbo.HISTORY_DETAIL
Attributes
Key Attribute Name Data Type Comments
PK ECAD_ID Int
TABLE_NAME Nvarchar(80)
HISTORY_TYPE_ID Int
EIRCODE Varchar(7)
BUILDING_ID Int
NEW_ECAD_ID Int
HISTORY_ETRS89_LAT Decimal(18,6)
HISTORY_ETRS89_LONG Decimal(18,6)
HISTORY_SOURCE Nvarchar(200)
CREATED_DATE Datetime
LAST_UPDATED Datetime
Indexes
Key Name Columns Unique
PK PK_HISTORY_DETAIL ECAD_ID True
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 84
Entity 'dbo.HISTORY_POSTAL_ADDRESS'
Attributes
Key Attribute Name Data Type Comments
PK ECAD_ID Int
ORGANISATION_ID Int
ADDRESS_POINT_ID Int
BUILDING_ID Int
BUILDING_GROUP_ID Int
PRIMARY_THOROUGHFARE_ID Int
SECONDARY_THOROUGHFARE_ID Int
PRIMARY_LOCALITY_ID Int
SECONDARY_LOCALITY_ID Int
POST_TOWN_ID Int
POST_COUNTY_ID Int
EIRCODE Varchar(7)
NUA Varchar(1)
GAELTACHT Varchar(1)
ADDR_LINE_1 Nvarchar(200)
ADDR_LINE_2 Nvarchar(200)
ADDR_LINE_3 Nvarchar(200)
ADDR_LINE_4 Nvarchar(200)
ADDR_LINE_5 Nvarchar(200)
ADDR_LINE_6 Nvarchar(200)
ADDR_LINE_7 Nvarchar(200)
ADDR_LINE_8 Nvarchar(200)
ADDR_LINE_9 Nvarchar(200)
IRISH_ADDR_LINE_1 Nvarchar(200)
IRISH_ADDR_LINE_2 Nvarchar(200)
IRISH_ADDR_LINE_3 Nvarchar(200)
IRISH_ADDR_LINE_4 Nvarchar(200)
IRISH_ADDR_LINE_5 Nvarchar(200)
IRISH_ADDR_LINE_6 Nvarchar(200)
IRISH_ADDR_LINE_7 Nvarchar(200)
IRISH_ADDR_LINE_8 Nvarchar(200)
IRISH_ADDR_LINE_9 Nvarchar(200)
ADDRESS_REFERENCE Varchar(16)
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 85
Indexes
Key Name Columns Unique
PK PK_POSTAL_ADDRESS_H ECAD_ID True
Entity 'dbo.HISTORY_TYPE'
Attributes
Key Attribute Name Data Type Comments
PK HISTORY_TYPE_ID Int
NAME Nvarchar(100)
CREATED_DATE Datetime
LAST_UPDATED Datetime
Indexes
Key Name Columns Unique
PK PK_HISTORY_TYPE HISTORY_TYPE_ID True
Entity 'dbo.IRISH_VERIFICATION'
Attributes
Key Attribute Name Data Type Comments
PK IRISH_VERIFICATION_ID Int
VALIDATION_LIFECYCLE Nvarchar(50)
CREATED_DATE Datetime
LAST_UPDATED Datetime
Indexes
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 86
Key Name Columns Unique
PK PK_IRISH_VERIFICATION IRISH_VERIFICATION_ID True
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 87
Entity 'dbo.LOCALITY'
Attributes
Key Attribute Name Data Type Comments
PK LOCALITY_ID Int
FK ADDRESS_TYPE_ID Int
NAME Nvarchar(80)
NAME_IRISH Nvarchar(80)
LOCALITY_NAME Nvarchar(80)
LOCALITY_NAME_IRISH Nvarchar(80)
FK IRISH_VERIFICATION_ID Int
FK QUALIFIER_ID Int
FK GEOGRAPHIC_ID Int
CREATED_DATE Datetime
LAST_UPDATED Datetime
Indexes
Key Name Columns Unique
PK PK_LOCALITY LOCALITY_ID True
Foreign Keys
Name Columns
FK_LOCALITY_ADDRESS_-
TYPE_ID
ADDRESS_TYPE_ID->[dbo].[ADDRESS_TYPE].[ADDRESS_TYPE_-
ID]
FK_LOCALITY_GEOGRAPHIC_ID GEOGRAPHIC_ID->[dbo].[GEOGRAPHIC].[GEOGRAPHIC_ID]
FK_LOCALITY_IRISH_-
VERIFICATION_ID
IRISH_VERIFICATION_ID->[dbo].[IRISH_VERIFICATION].[IRISH_-
VERIFICATION_ID]
FK_LOCALITY_QUALIFIER_ID QUALIFIER_ID->[dbo].[QUALIFIER].[QUALIFIER_ID]
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 88
Entity 'dbo.LOCALITY_ALIAS'
Attributes
Key Attribute Name Data Type Comments
PK LOCALITY_ALIAS_ID Int
FK ALIAS_TYPE_ID Int
NAME Nvarchar(80)
NAME_IRISH Nvarchar(80)
FK LOCALITY_ID Int
FK SECONDARY_LOCALITY_ID Int
FK POST_TOWN_ID Int
FK POST_COUNTY_ID Int
CREATED_DATE Datetime
LAST_UPDATED Datetime
Indexes
Key Name Columns Unique
PK PK_LOCALITY_ALIAS LOCALITY_ALIAS_ID True
Foreign Keys
Name Columns
FK_LOCALITY_ALIAS_ALIAS_-
TYPE_ID
ALIAS_TYPE_ID->[dbo].[ALIAS_TYPE].[ALIAS_TYPE_ID]
FK_LOCALITY_ALIAS_LOCALITY_ID LOCALITY_ID->[dbo].[LOCALITY].[LOCALITY_ID]
FK_LOCALITY_ALIAS_PCOUNTY_ID POST_COUNTY_ID->[dbo].[COUNTY].[COUNTY_ID]
FK_LOCALITY_ALIAS_POST_-
TOWN_ID
POST_TOWN_ID->[dbo].[POST_TOWN].[POST_TOWN_ID]
FK_LOCALITY_ALIAS_LOCALITY2_ID SECONDARY_LOCALITY_ID-
>[dbo].[LOCALITY].[LOCALITY_ID]
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 89
Entity 'dbo.ORGANISATION'
Attributes
Key Attribute Name Data Type Comments
PK ORGANISATION_ID Int
FK ADDRESS_POINT_ID Int
FK ADDRESS_TYPE_ID Int
NAME Nvarchar(80) Organisation Name
NAME_IRISH Nvarchar(80)
SUB_ADDRESS_NAME Nvarchar(80) e.g. LEVEL 2
SUB_ADDRESS_NAME_IRISH Nvarchar(80)
DEPARTMENT Nvarchar(80) e.g. BOOKING OFFICE
DEPARTMENT_IRISH Nvarchar(80)
FK IRISH_VERIFICATION_ID Int
FULL_ADDRESS_LINE Varchar(1)
ORGANISATION_NAME_REQUIRED Varchar(1)
BUILDING_GROUP_REQUIRED Varchar(1)
BUILDING_NAME_REQUIRED Varchar(1)
DEPARTMENT_REQUIRED Varchar(1)
SUB_BUILDING_NAME_REQUIRED Varchar(1)
CREATED_DATE Datetime
LAST_UPDATED Datetime
Indexes
Key Name Columns Unique
PK PK_ORGANISATION ORGANISATION_ID True
Foreign Keys
Name Columns
FK_ORGANISATION_ADDRESS_-
POINT_ID
ADDRESS_POINT_ID->[dbo].[ADDRESS_POINT].[ADDRESS_-
POINT_ID]
FK_ORGANISATION_ADDRESS_-
TYPE_ID
ADDRESS_TYPE_ID->[dbo].[ADDRESS_TYPE].[ADDRESS_-
TYPE_ID]
FK_ORGANISATION_IRISH_-
VERIFICATION_ID
IRISH_VERIFICATION_ID->[dbo].[IRISH_-
VERIFICATION].[IRISH_VERIFICATION_ID]
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 90
Entity 'dbo.ORGANISATION_ALIAS'
Attributes
Key Attribute Name Data Type Comments
PK ORGANISATION_ALIAS_ID Int
FK ALIAS_TYPE_ID Int
FK ORGANISATION_ID Int
FK ADDRESS_POINT_ID Int
FK BUILDING_ID Int
NAME Nvarchar(80)
NAME_IRISH Nvarchar(80)
SUB_ADDRESS_NAME Nvarchar(80)
SUB_ADDRESS_NAME_IRISH Nvarchar(80)
DEPARTMENT Nvarchar(80)
DEPARTMENT_IRISH Nvarchar(80)
FK BUILDING_GROUP_ID Int
FK PRIMARY_THOROUGHFARE_ID Int
FK SECONDARY_THOROUGHFARE_ID Int
FK PRIMARY_LOCALITY_ID Int
FK SECONDARY_LOCALITY_ID Int
FK POST_TOWN_ID Int
FK POST_COUNTY_ID Int
CREATED_DATE Datetime
LAST_UPDATED Datetime
Indexes
Key Name Columns Unique
PK PK_ORGANISATION_ALIAS ORGANISATION_ALIAS_ID True
Foreign Keys
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 91
Name Columns
FK_ORGANISATION_-
ALIAS_AP_ID
ADDRESS_POINT_ID-
>[dbo].[ADDRESS_POINT].[ADDRESS_POINT_ID]
FK_ORGANISATION_ALIAS_-
TYPE_ID
ALIAS_TYPE_ID->[dbo].[ALIAS_TYPE].[ALIAS_TYPE_ID]
FK_ORGANISATION_ALIAS_-
BG_ID
BUILDING_GROUP_ID->[dbo].[BUILDING_GROUP].[BUILDING_-
GROUP_ID]
FK_ORGANISATION_ALIAS_-
BLD_ID
BUILDING_ID->[dbo].[BUILDING].[BUILDING_ID]
FK_ORGANISATION_ALIAS_-
TYPE_ID
ORGANISATION_ID->[dbo].[ORGANISATION].[ORGANISATION_ID]
FK_ORGANISATION_ALIAS_-
PCOUNTY_ID
POST_COUNTY_ID->[dbo].[COUNTY].[COUNTY_ID]
FK_ORGANISATION_ALIAS_-
PTOWN_ID
POST_TOWN_ID->[dbo].[POST_TOWN].[POST_TOWN_ID]
FK_ORGANISATION_ALIAS_-
LOC1_ID
PRIMARY_LOCALITY_ID->[dbo].[LOCALITY].[LOCALITY_ID]
FK_ORGANISATION_ALIAS_-
THORO1_ID
PRIMARY_THOROUGHFARE_ID-
>[dbo].[THOROUGHFARE].[THOROUGHFARE_ID]
FK_ORGANISATION_ALIAS_-
LOC2_ID
SECONDARY_LOCALITY_ID->[dbo].[LOCALITY].[LOCALITY_ID]
FK_ORGANISATION_ALIAS_-
THORO2_ID
SECONDARY_THOROUGHFARE_ID-
>[dbo].[THOROUGHFARE].[THOROUGHFARE_ID]
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 92
Entity 'dbo.ORGANISATION_INFO'
Attributes
Key Attribute Name Data Type Comments
PK/FK ORGANISATION_ID Int
VACANT Varchar(1)
NACE_CODE Nvarchar(20)
NACE_CATEGORY Nvarchar(100)
CREATED_DATE Datetime
LAST_UPDATED Datetime
Indexes
Key Name Columns Unique
PK PK_ORGANISATION_INFO ORGANISATION_ID True
Foreign Keys
Name Columns
FK_ORGANISATION_INFO_-
ORGANISATION_ID
ORGANISATION_ID-
>[dbo].[ORGANISATION].[ORGANISATION_ID]
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 93
Entity 'dbo.POST_TOWN'
Attributes
Key Attribute Name Data Type Comments
PK POST_TOWN_ID Int
FK ADDRESS_TYPE_ID Int
NAME Nvarchar(80)
NAME_IRISH Nvarchar(80)
FK IRISH_VERIFICATION_ID Int
CREATED_DATE Datetime
LAST_UPDATED Datetime
Indexes
Key Name Columns Unique
PK PK_POST_TOWN POST_TOWN_ID True
Foreign Keys
Name Columns
FK_POST_TOWN_ADDRESS_-
TYPE
ADDRESS_TYPE_ID->[dbo].[ADDRESS_TYPE].[ADDRESS_TYPE_-
ID]
FK_POST_TOWN_IRISH_-
VERIFICATION
IRISH_VERIFICATION_ID->[dbo].[IRISH_VERIFICATION].[IRISH_-
VERIFICATION_ID]
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 94
Entity 'dbo.POST_TOWN_ALIAS'
Attributes
Key Attribute Name Data Type Comments
PK POST_TOWN_ALIAS_ID Int
FK ALIAS_TYPE_ID Int
FK POST_TOWN_ID Int
NAME Nvarchar(80)
NAME_IRISH Nvarchar(80)
FK POST_COUNTY_ID Int
CREATED_DATE Datetime
LAST_UPDATED Datetime
Indexes
Key Name Columns Unique
PK PK_POST_TOWN_ALIAS POST_TOWN_ALIAS_ID True
Foreign Keys
Name Columns
FK_POST_TOWN_ALIAS_ALIAS_TYPE_ID ALIAS_TYPE_ID->[dbo].[ALIAS_TYPE].[ALIAS_TYPE_ID]
FK_POST_TOWN_ALIAS_PCOUNTY_ID POST_COUNTY_ID->[dbo].[COUNTY].[COUNTY_ID]
FK_POST_TOWN_ALIAS_POST_-
TOWN_ID
POST_TOWN_ID->[dbo].[POST_TOWN].[POST_TOWN_-
ID]
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 95
Entity 'dbo.POSTAL_ADDRESS'
Attributes
Key Attribute Name Data Type Comments
PK ECAD_ID Int
FK ORGANISATION_ID Int
FK ADDRESS_POINT_ID Int
FK BUILDING_ID Int
FK BUILDING_GROUP_ID Int
FK PRIMARY_THOROUGHFARE_ID Int
FK SECONDARY_THOROUGHFARE_ID Int
FK PRIMARY_LOCALITY_ID Int
FK SECONDARY_LOCALITY_ID Int
FK POST_TOWN_ID Int
FK POST_COUNTY_ID Int
EIRCODE Varchar(7)
NUA Varchar(1)
GAELTACHT Varchar(1)
ADDR_LINE_1 Nvarchar(200)
ADDR_LINE_2 Nvarchar(200)
ADDR_LINE_3 Nvarchar(200)
ADDR_LINE_4 Nvarchar(200)
ADDR_LINE_5 Nvarchar(200)
ADDR_LINE_6 Nvarchar(200)
ADDR_LINE_7 Nvarchar(200)
ADDR_LINE_8 Nvarchar(200)
ADDR_LINE_9 Nvarchar(200)
IRISH_ADDR_LINE_1 Nvarchar(200)
IRISH_ADDR_LINE_2 Nvarchar(200)
IRISH_ADDR_LINE_3 Nvarchar(200)
IRISH_ADDR_LINE_4 Nvarchar(200)
IRISH_ADDR_LINE_5 Nvarchar(200)
IRISH_ADDR_LINE_6 Nvarchar(200)
IRISH_ADDR_LINE_7 Nvarchar(200)
IRISH_ADDR_LINE_8 Nvarchar(200)
IRISH_ADDR_LINE_9 Nvarchar(200)
ADDRESS_REFERENCE Varchar(16)
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 96
Indexes
Key Name Columns Unique
PK PK_POSTAL_ADDRESS ECAD_ID True
Foreign Keys
Name Columns
FK_POSTAL_ADDRESS_AP_ID ADDRESS_POINT_ID-
>[dbo].[ADDRESS_POINT].[ADDRESS_POINT_ID]
FK_POSTAL_ADDRESS _BG_ID BUILDING_GROUP_ID->[dbo].[BUILDING_-
GROUP].[BUILDING_GROUP_ID]
FK_POSTAL_ADDRESS _BLD_ID BUILDING_ID->[dbo].[BUILDING].[BUILDING_ID]
FK_POSTAL_ADDRESS _ID ORGANISATION_ID-
>[dbo].[ORGANISATION].[ORGANISATION_ID]
FK_POSTAL_ADDRESS_PCOUNTY_ID POST_COUNTY_ID->[dbo].[COUNTY].[COUNTY_ID]
FK_POSTAL_ADDRESS_PTOWN_ID POST_TOWN_ID->[dbo].[POST_TOWN].[POST_TOWN_ID]
FK_POSTAL_ADDRESS _LOC1_ID PRIMARY_LOCALITY_ID->[dbo].[LOCALITY].[LOCALITY_ID]
FK_POSTAL_ADDRESS_THORO1_ID PRIMARY_THOROUGHFARE_ID-
>[dbo].[LOCALITY].[LOCALITY_ID]
FK_POSTAL_ADDRESS_LOC2_ID SECONDARY_LOCALITY_ID-
>[dbo].[LOCALITY].[LOCALITY_ID]
FK_POSTAL_ADDRESS_THORO2_ID SECONDARY_THOROUGHFARE_ID-
>[dbo].[THOROUGHFARE].[THOROUGHFARE_ID]
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 97
Entity 'dbo.QUALIFIER'
Attributes
Key Attribute Name Data Type Comments
PK QUALIFIER_ID Int
NAME Nvarchar(80)
NAME_IRISH Nvarchar(80)
FK IRISH_VERIFICATION_ID Int
CREATED_DATE Datetime
LAST_UPDATED Datetime
Indexes
Key Name Columns Unique
PK PK_QUALIFIER QUALIFIER_ID True
Foreign Keys
Name Columns
FK_QUALIFIER_IRISH_-
VERIFICATION_ID
IRISH_VERIFICATION_ID->[dbo].[IRISH_-
VERIFICATION].[IRISH_VERIFICATION_ID]
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 98
Entity 'dbo.ROUTING_KEY'
Attributes
Key Attribute Name Data Type Comments
PK ROUTING_KEY_ID Int
ROUTING_KEY_NAME Nvarchar(3)
CREATED_DATE Datetime
LAST_UPDATED Datetime
Indexes
Key Name Columns Unique
PK PK_ROUTING_KEY ROUTING_KEY_ID True
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 99
Entity 'dbo.SPATIAL_INFO'
Caption SPATIAL_INFO
Entity Properties
Filegroup PRIMARY
Primary Key 'PK_SPATIAL_INFO'
Attribute Name type Parent Entity
ECAD_ID PFK dbo.BUILDING
Attributes
Key Attribute Name Data Type Comments
PK ECAD_ID Int
ING_EAST Decimal(18,2)
ING_NORTH Decimal(18,2)
ITM_EAST Decimal(18,2)
ITM_NORTH Decimal(18,2)
ETRS89_LAT Decimal(18,6)
ETRS89_LONG Decimal(18,6)
ING_MIN_EAST Decimal(18,2)
ING_MIN_NORTH Decimal(18,2)
ING_MAX_EAST Decimal(18,2)
ING_MAX_NORTH Decimal(18,2)
ITM_MIN_EAST Decimal(18,2)
ITM_MIN_NORTH Decimal(18,2)
ITM_MAX_EAST Decimal(18,2)
ITM_MAX_NORTH Decimal(18,2)
ETRS89_MIN_LAT Decimal(18,6)
ETRS89_MIN_LONG Decimal(18,6)
ETRS89_MAX_LAT Decimal(18,6)
ETRS89_MAX_LONG Decimal(18,6)
SPATIAL_ACCURACY Nvarchar(1)
CREATED_DATE Datetime
LAST_UPDATED Datetime
Indexes
Key Name Columns Unique
PK PK_SPATIAL_INFO ECAD_-
ID
True
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 100
Entity 'dbo.SUB_ADDRESS_POINT'
Attributes
Key Attribute Name Data Type Comments
PK SUB_ADDRESS_POINT_ID Int
FK ADDRESS_TYPE_ID Int
FK ADDRESS_POINT_ID Int
NAME Nvarchar(80)
NAME_IRISH Nvarchar(80)
FK IRISH_VERIFICATION_ID Int
CREATED_DATE Datetime
LAST_UPDATED Datetime
Indexes
Key Name Columns Unique
PK PK_SUB_ADDRESS_POINT SUB_ADDRESS_POINT_ID True
Foreign Keys
Name Columns
FK_SUB_ADDRESS_POINT_-
ADDRESS_POINT_ID
ADDRESS_POINT_ID->[dbo].[ADDRESS_-
POINT].[ADDRESS_POINT_ID]
FK_SUB_ADDRESS_POINT_-
ADDRESS_TYPE_ID
ADDRESS_TYPE_ID->[dbo].[ADDRESS_-
TYPE].[ADDRESS_TYPE_ID]
FK_SUB_ADDRESS_POINT_IRISH_-
VERIFICATION_ID
IRISH_VERIFICATION_ID->[dbo].[IRISH_-
VERIFICATION].[IRISH_VERIFICATION_ID]
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 101
Entity 'dbo.THOROUGHFARE'
Attributes
Key Attribute Name Data Type Comments
PK THOROUGHFARE_ID Int
FK ADDRESS_TYPE_ID Int
NAME Nvarchar(80)
NAME_IRISH Nvarchar(80)
THOROUGHFARE_NAME Nvarchar(80)
THOROUGHFARE_NAME_IRISH Nvarchar(80)
FK IRISH_VERIFICATION_ID Int
FK QUALIFIER_ID Int
FK GEOGRAPHIC_ID Int
FK DESCRIPTOR_ID Int
CREATED_DATE Datetime
LAST_UPDATED Datetime
Indexes
Key Name Columns Unique
PK PK_THOROUGHFARE THOROUGHFARE_ID True
Foreign Keys
Name Columns
FK_THOROUGHFARE_ADDRESS_-
TYPE_ID
ADDRESS_TYPE_ID->[dbo].[ADDRESS_TYPE].[ADDRESS_-
TYPE_ID]
FK_THOROUGHFARE_-
DESCRIPTOR_ID
DESCRIPTOR_ID->[dbo].[DESCRIPTOR].[DESCRIPTOR_ID]
FK_THOROUGHFARE_-
GEOGRAPHIC_ID
GEOGRAPHIC_ID->[dbo].[GEOGRAPHIC].[GEOGRAPHIC_ID]
FK_THOROUGHFARE_IRISH_-
VERIFICATION_ID
IRISH_VERIFICATION_ID->[dbo].[IRISH_-
VERIFICATION].[IRISH_VERIFICATION_ID]
FK_THOROUGHFARE_QUALIFIER_-
ID
QUALIFIER_ID->[dbo].[QUALIFIER].[QUALIFIER_ID]
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 102
Entity 'dbo.THOROUGHFARE_ALIAS'
Attributes
Key Attribute Name Data Type Comments
PK THOROUGHFARE_ALIAS_ID Int
FK ALIAS_TYPE_ID Int
NAME Nvarchar(80)
NAME_IRISH Nvarchar(80)
FK THOROUGHFARE_ID Int
FK SECONDARY_THOROUGHFARE_ID Int
FK PRIMARY_LOCALITY_ID Int
FK SECONDARY_LOCALITY_ID Int
FK POST_TOWN_ID Int
FK POST_COUNTY_ID Int
CREATED_DATE Datetime
LAST_UPDATED Datetime
Indexes
Key Name Columns Unique
PK_THOROUGHFARE_ALIAS THOROUGHFARE_ALIAS_ID True
Foreign Keys
Name Columns
FK_THOROUGHFARE_ALIAS_-
ALIAS_TYPE_ID
ALIAS_TYPE_ID->[dbo].[ALIAS_TYPE].[ALIAS_TYPE_ID]
FK_THOROUGHFARE_ALIAS_-
PCOUNTY_ID
POST_COUNTY_ID->[dbo].[COUNTY].[COUNTY_ID]
FK_THOROUGHFARE_ALIAS_-
POST_TOWN_ID
POST_TOWN_ID->[dbo].[POST_TOWN].[POST_TOWN_ID]
FK_THOROUGHFARE_ALIAS_-
LOCALITY1_ID
PRIMARY_LOCALITY_ID->[dbo].[LOCALITY].[LOCALITY_ID]
FK_THOROUGHFARE_ALIAS_-
LOCALITY2_ID
SECONDARY_LOCALITY_ID->[dbo].[LOCALITY].[LOCALITY_-
ID]
FK_THOROUGHFARE_ALIAS_-
THOROUGHFARE2_ID
SECONDARY_THOROUGHFARE_ID-
>[dbo].[THOROUGHFARE].[THOROUGHFARE_ID]
FK_THOROUGHFARE_ALIAS_-
THOROUGHFARE1_ID
THOROUGHFARE_ID-
>[dbo].[THOROUGHFARE].[THOROUGHFARE_ID]
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 104
4.2 Appendix 2 – Postal Address View
4.2.1 Postal Address View
This view combines a view of the address data (v_ecad_model) with the corresponding
address line columns 1 to 9, which are constructed using a user-defined function
(f_get_address_cols):
create view dbo.v_postal_address_view as SELECT [ECAD_ID]
,[ORGANISATION_ID]
,[ADDRESS_POINT_ID]
,[BUILDING_ID]
,[BUILDING_GROUP_ID]
,[PRIMARY_THOROUGHFARE_ID]
,[SECONDARY_THOROUGHFARE_ID]
,[PRIMARY_LOCALITY_ID]
,[SECONDARY_LOCALITY_ID]
,[POST_TOWN_ID]
,[POST_COUNTY_ID]
,[EIRCODE]
,[EIRCODE_DISPLAY]
,cols.ADDR_LINE_1, cols.ADDR_LINE_2, cols.ADDR_LINE_3,
cols.ADDR_LINE_4, cols.ADDR_LINE_5, cols.ADDR_LINE_6, cols.ADDR_LINE_7,
cols.ADDR_LINE_8, cols.ADDR_LINE_9
,irish_cols.ADDR_LINE_1 IRISH_ADDR_LINE_1, irish_cols.ADDR_LINE_2
IRISH_ADDR_LINE_2, irish_cols.ADDR_LINE_3 IRISH_ADDR_LINE_3,
irish_cols.ADDR_LINE_4 IRISH_ADDR_LINE_4, irish_cols.ADDR_LINE_5
IRISH_ADDR_LINE_5, irish_cols.ADDR_LINE_6 IRISH_ADDR_LINE_6,
irish_cols.ADDR_LINE_7 IRISH_ADDR_LINE_7, irish_cols.ADDR_LINE_8
IRISH_ADDR_LINE_8, irish_cols.ADDR_LINE_9 IRISH_ADDR_LINE_9
from dbo.V_ECAD_MODEL em
cross apply dbo.f_get_address_cols(
EM.ECAD_ID
,EM.DEPARTMENT
,EM.DEPARTMENT_REQUIRED
,EM.ORGANISATION_NAME
,EM.ORGANISATION_NAME_REQUIRED
,EM.SUB_BUILDING_NAME
,EM.SUB_BUILDING_NAME_FULL_ADDRESS_LINE
,EM.SUB_BUILDING_NAME_REQUIRED
,EM.BUILDING_NAME
,EM.BUILDING_NAME_REQUIRED
,EM.BUILDING_NUMBER
,EM.BUILDING_NUMBER_REQUIRED
,EM.BUILDING_GROUP_NAME
,EM.BUILDING_GROUP_REQUIRED
,EM.PRIMARY_THOROUGHFARE
,EM.PRIMARY_THOROUGHFARE_REQUIRED
,EM.SECONDARY_THOROUGHFARE
,EM.SECONDARY_THOROUGHFARE_REQUIRED
,EM.PRIMARY_LOCALITY
,EM.PRIMARY_LOCALITY_REQUIRED
,EM.SECONDARY_LOCALITY
,EM.SECONDARY_LOCALITY_REQUIRED
,EM.POST_TOWN
,EM.POST_TOWN_REQUIRED
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 105
,EM.POST_COUNTY
,EM.POST_COUNTY_REQUIRED
,EM.EIRCODE_DISPLAY ) cols
cross apply dbo.f_get_address_cols(
EM.ECAD_ID
,EM.DEPARTMENT_IRISH
,EM.DEPARTMENT_REQUIRED
,EM.ORGANISATION_NAME_IRISH
,EM.ORGANISATION_NAME_REQUIRED
,EM.SUB_BUILDING_NAME_IRISH
,EM.SUB_BUILDING_NAME_FULL_ADDRESS_LINE
,EM.SUB_BUILDING_NAME_REQUIRED
,EM.BUILDING_NAME_IRISH
,EM.BUILDING_NAME_REQUIRED
,EM.BUILDING_NUMBER
,EM.BUILDING_NUMBER_REQUIRED
,EM.BUILDING_GROUP_NAME_IRISH
,EM.BUILDING_GROUP_REQUIRED
,EM.PRIMARY_THOROUGHFARE_IRISH
,EM.PRIMARY_THOROUGHFARE_REQUIRED
,EM.SECONDARY_THOROUGHFARE_IRISH
,EM.SECONDARY_THOROUGHFARE_REQUIRED
,EM.PRIMARY_LOCALITY_IRISH
,EM.PRIMARY_LOCALITY_REQUIRED
,EM.SECONDARY_LOCALITY_IRISH
,EM.SECONDARY_LOCALITY_REQUIRED
,EM.POST_TOWN_IRISH
,EM.POST_TOWN_REQUIRED
,EM.POST_COUNTY_IRISH
,EM.POST_COUNTY_REQUIRED
,EM.EIRCODE_DISPLAY ) irish_cols
4.2.2 Postal Address Model View
A model view is produced by joining together those ECAD model tables which are required
to construct addresses. This query encapsulates the rules of the model:
CREATE VIEW dbo.v_ecad_model
as Select
b.ROUTING_KEY_ID
, rk.routing_key_name ROUTING_KEY
,IIF(NOT org.ORGANISATION_ID IS NULL, org.ORGANISATION_ID,
ap.address_point_id) as ECAD_ID
-- The ECAD_ID identifies an ‘A’ddress Point or ‘O’rganisation
, IIF(NOT org.ORGANISATION_ID IS NULL, 'O', 'A') as ECAD_ID_IS_FROM
, b.BUILDING_ID
, ap.ADDRESS_POINT_ID
, org.ORGANISATION_ID
, org.NAME as ORGANISATION_NAME
, org.DEPARTMENT
, org.NAME_IRISH as ORGANISATION_NAME_IRISH
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 106
, org.DEPARTMENT_IRISH
-- Determine SUB_BUILDING_NAME depending on single/multiple occupancy and
whether residential or commercial
, COALESCE (org.sub_address_name, ap.name) as SUB_BUILDING_NAME
, COALESCE (org.SUB_ADDRESS_NAME_IRISH, ap.NAME_IRISH) as
SUB_BUILDING_NAME_IRISH
-- Does the SUB_BUILDING_NAME appear on a line by itself or does it prefix
the next address element ?
, IIF(NOT org.ORGANISATION_ID IS NULL and NOT org.SUB_ADDRESS_NAME IS
NULL, org.FULL_ADDRESS_LINE,
ap.FULL_ADDRESS_LINE) as
SUB_BUILDING_NAME_FULL_ADDRESS_LINE
, b.name as BUILDING_NAME
, b.name_irish as BUILDING_NAME_IRISH
, b.number as BUILDING_NUMBER
, bg.name as BUILDING_GROUP_NAME
, bg.name_irish as BUILDING_GROUP_NAME_IRISH
, th1.name as PRIMARY_THOROUGHFARE
, th1.name_irish as PRIMARY_THOROUGHFARE_IRISH
, th2.name as SECONDARY_THOROUGHFARE
, th2.name_irish as SECONDARY_THOROUGHFARE_IRISH
, l1.name as PRIMARY_LOCALITY
, l1.name_irish as PRIMARY_LOCALITY_IRISH
, l2.name as SECONDARY_LOCALITY
, l2.name_irish as SECONDARY_LOCALITY_IRISH
, pt.name as POST_TOWN
, pt.name_irish as POST_TOWN_IRISH
, c.name as POST_COUNTY
, c.NAME_IRISH_CO as POST_COUNTY_IRISH
, ap.EIRCODE as EIRCODE
-- The Eircode has 8 digits, 3 for routing key, a space, then the 4-digit
unique identifier
, substring(ap.EIRCODE,1,3) + ' ' + substring(ap.EIRCODE,4,4) as
EIRCODE_DISPLAY
-- flags determine if building address elements are required for
individual address points
, org.ORGANISATION_NAME_REQUIRED
, IIF(NOT org.ORGANISATION_ID IS NULL, org.BUILDING_GROUP_REQUIRED,
b.BUILDING_GROUP_REQUIRED) as BUILDING_GROUP_REQUIRED
, IIF(NOT org.ORGANISATION_ID IS NULL, org.BUILDING_NAME_REQUIRED,
b.BUILDING_NAME_REQUIRED) as BUILDING_NAME_REQUIRED
, b.PRIMARY_THOROUGHFARE_REQUIRED
, b.SECONDARY_THOROUGHFARE_REQUIRED
, b.PRIMARY_LOCALITY_REQUIRED
, b.SECONDARY_LOCALITY_REQUIRED
, b.POST_TOWN_REQUIRED
, b.POST_COUNTY_REQUIRED
, org.DEPARTMENT_REQUIRED
, IIF(NOT org.ORGANISATION_ID IS NULL and NOT org.SUB_ADDRESS_NAME IS
NULL, org.SUB_BUILDING_NAME_REQUIRED,
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 107
ap.SUB_BUILDING_NAME_REQUIRED) SUB_BUILDING_NAME_REQUIRED
, b.BUILDING_NUMBER_REQUIRED
, b.ADDRESS_TYPE_ID BUILDING_ADDRESS_TYPE_ID
, b.BUILDING_GROUP_ID
, b.PRIMARY_THOROUGHFARE_ID
, b.SECONDARY_THOROUGHFARE_ID
, b.PRIMARY_LOCALITY_ID
, b.SECONDARY_LOCALITY_ID
, b.POST_TOWN_ID
, b.POST_COUNTY_ID
, ap.ADDRESS_TYPE_ID AP_ADDRESS_TYPE_ID
, ap.building_id AP_BUILDING_ID
, ap.name AP_NAME
, org.address_type_id ORG_ADDRESS_TYPE_ID
from dbo.ADDRESS_POINT ap
inner join dbo.BUILDING b on b.building_id = ap.building_id
inner join dbo.ROUTING_KEY rk on rk.routing_key_id = b.routing_key_id
left outer join dbo.ORGANISATION org on org.ADDRESS_POINT_ID =
ap.ADDRESS_POINT_ID
left outer join dbo.BUILDING_GROUP bg on bg.BUILDING_GROUP_ID =
b.BUILDING_GROUP_ID
left outer join dbo.THOROUGHFARE th1 on th1.THOROUGHFARE_ID =
b.PRIMARY_THOROUGHFARE_ID
left outer join dbo.THOROUGHFARE th2 on th2.THOROUGHFARE_ID =
b.SECONDARY_THOROUGHFARE_ID
left outer join dbo.LOCALITY l1 on l1.LOCALITY_ID =
b.PRIMARY_LOCALITY_ID
left outer join dbo.LOCALITY l2 on l2.LOCALITY_ID =
b.SECONDARY_LOCALITY_ID
left outer join dbo.POST_TOWN pt on pt.POST_TOWN_ID = b.POST_TOWN_ID
left outer join dbo.COUNTY c on c.COUNTY_ID = b.POST_COUNTY_ID
-- exclude buildings with no delivery points
where not b.status = 2
-- exclude Unassigned Eircodes and ap.eircode is not null
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 108
4.2.3 SQL Functions to get Address Lines 1 to 9
4.2.3.1 f_get_address_lines
The following is an implementation of the f_get_address_lines function for SQL Server:
CREATE FUNCTION dbo.f_get_address_lines (
@ecad_id bigint ,@department nvarchar(500) ,@DEPARTMENT_REQUIRED varchar(1) ,@organisation_name nvarchar(500) ,@ORGANISATION_NAME_REQUIRED nvarchar(1) ,@SUB_BUILDING_NAME nvarchar(500) ,@SUB_BUILDING_NAME_FULL_ADDRESS_LINE varchar(1) ,@SUB_BUILDING_NAME_REQUIRED nvarchar(1) ,@building_name nvarchar(60) ,@BUILDING_NAME_REQUIRED nvarchar(1) ,@building_number nvarchar(40) ,@BUILDING_NUMBER_REQUIRED nvarchar(1) ,@BUILDING_GROUP_NAME nvarchar(80) ,@BUILDING_GROUP_REQUIRED nvarchar(1) ,@PRIMARY_THOROUGHFARE nvarchar(80) ,@PRIMARY_THOROUGHFARE_REQUIRED varchar(1) ,@SECONDARY_THOROUGHFARE nvarchar(80) ,@SECONDARY_THOROUGHFARE_REQUIRED varchar(1) ,@PRIMARY_LOCALITY nvarchar(80) ,@PRIMARY_LOCALITY_REQUIRED varchar(1) ,@SECONDARY_LOCALITY nvarchar(80) ,@SECONDARY_LOCALITY_REQUIRED varchar(1) ,@POST_TOWN nvarchar(80) ,@POST_TOWN_REQUIRED varchar(1) ,@COUNTY nvarchar(80) ,@COUNTY_REQUIRED varchar(1) ,@EIRCODE_DISPLAY varchar(8)
) RETURNS @returntable TABLE ( addr_ecad_id bigint ,addr_line_num INT IDENTITY(1,1) ,address_line nvarchar(200) ) AS BEGIN
declare @prefix nvarchar(500) = '';
if (@DEPARTMENT_REQUIRED = 'Y') INSERT @returntable (addr_ecad_id, address_line)
SELECT @ecad_id, @department; if (@ORGANISATION_NAME_REQUIRED = 'Y') INSERT @returntable (addr_ecad_id, address_line)
SELECT @ecad_id, @organisation_name; if (@SUB_BUILDING_NAME_REQUIRED = 'Y') begin if(@SUB_BUILDING_NAME_FULL_ADDRESS_LINE = 'Y') INSERT @returntable (addr_ecad_id, address_line)
SELECT @ecad_id, @SUB_BUILDING_NAME + ' '; else select @prefix = @SUB_BUILDING_NAME + ' ';
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 109
end; if (@BUILDING_NAME_REQUIRED = 'Y') begin INSERT @returntable (addr_ecad_id, address_line)
SELECT @ecad_id, @prefix+@BUILDING_NAME; set @prefix = ''; end;
if (@BUILDING_NUMBER_REQUIRED = 'Y') begin set @prefix = @building_number + ' '; end if (@BUILDING_GROUP_REQUIRED = 'Y') begin INSERT @returntable (addr_ecad_id, address_line)
SELECT @ecad_id, @prefix + @BUILDING_GROUP_NAME; set @prefix = ''; end; if (@PRIMARY_THOROUGHFARE_REQUIRED = 'Y') begin INSERT @returntable (addr_ecad_id, address_line)
SELECT @ecad_id, @prefix + @PRIMARY_THOROUGHFARE; set @prefix = '';
end; if (@SECONDARY_THOROUGHFARE_REQUIRED = 'Y') begin INSERT @returntable (addr_ecad_id, address_line)
SELECT @ecad_id, @prefix + @SECONDARY_THOROUGHFARE; set @prefix = ''; end; if (@PRIMARY_LOCALITY_REQUIRED = 'Y') begin INSERT @returntable (addr_ecad_id, address_line)
SELECT @ecad_id, @prefix + @PRIMARY_LOCALITY; set @prefix = ''; end; if (@SECONDARY_LOCALITY_REQUIRED = 'Y') begin INSERT @returntable (addr_ecad_id, address_line)
SELECT @ecad_id, @prefix + @SECONDARY_LOCALITY; set @prefix = ''; end; if (@POST_TOWN_REQUIRED = 'Y') begin INSERT @returntable (addr_ecad_id, address_line)
SELECT @ecad_id, @prefix + @POST_TOWN; set @prefix = ''; end; if (@COUNTY_REQUIRED = 'Y') begin INSERT @returntable (addr_ecad_id, address_line)
SELECT @ecad_id, @prefix + 'CO. ' + @COUNTY; set @prefix = ''; end;
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 110
INSERT @returntable (addr_ecad_id, address_line) SELECT @ecad_id, @EIRCODE_DISPLAY;
RETURN
END
Note that this function is invoked by the next function below f_get_address_cols which
converts the address lines to columns.
4.2.3.2 f_get_address_cols
The following is an implementation of the f_get_address_cols function for SQL Server :
CREATE FUNCTION dbo.f_get_address_cols( @ecad_id bigint
,@department nvarchar(500) ,@DEPARTMENT_REQUIRED varchar(1) ,@organisation_name nvarchar(500) ,@ORGANISATION_NAME_REQUIRED nvarchar(1) ,@SUB_BUILDING_NAME nvarchar(500) ,@SUB_BUILDING_NAME_FULL_ADDRESS_LINE varchar(1) ,@SUB_BUILDING_NAME_REQUIRED nvarchar(1) ,@building_name nvarchar(60) ,@BUILDING_NAME_REQUIRED nvarchar(1) ,@building_number nvarchar(40) ,@BUILDING_NUMBER_REQUIRED nvarchar(1) ,@BUILDING_GROUP_NAME nvarchar(80) ,@BUILDING_GROUP_REQUIRED nvarchar(1) ,@PRIMARY_THOROUGHFARE nvarchar(80) ,@PRIMARY_THOROUGHFARE_REQUIRED varchar(1) ,@SECONDARY_THOROUGHFARE nvarchar(80) ,@SECONDARY_THOROUGHFARE_REQUIRED varchar(1) ,@PRIMARY_LOCALITY nvarchar(80) ,@PRIMARY_LOCALITY_REQUIRED varchar(1) ,@SECONDARY_LOCALITY nvarchar(80) ,@SECONDARY_LOCALITY_REQUIRED varchar(1) ,@POST_TOWN nvarchar(80) ,@POST_TOWN_REQUIRED varchar(1) ,@COUNTY nvarchar(80) ,@COUNTY_REQUIRED varchar(1) ,@POSTCODE_DISPLAY varchar(8) ) RETURNS TABLE AS RETURN ( select @ecad_id addr_ecad_id, pivot_lines.* from ( select 'addr_line_'+cast(addr_line_num as varchar(2)) as col
, address_line from dbo.f_get_address_lines( @ecad_id ,@department ,@DEPARTMENT_REQUIRED ,@organisation_name ,@ORGANISATION_NAME_REQUIRED ,@SUB_BUILDING_NAME
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 111
,@SUB_BUILDING_NAME_FULL_ADDRESS_LINE ,@SUB_BUILDING_NAME_REQUIRED ,@building_name ,@BUILDING_NAME_REQUIRED ,@building_number ,@BUILDING_NUMBER_REQUIRED ,@BUILDING_GROUP_NAME ,@BUILDING_GROUP_REQUIRED ,@PRIMARY_THOROUGHFARE ,@PRIMARY_THOROUGHFARE_REQUIRED ,@SECONDARY_THOROUGHFARE ,@SECONDARY_THOROUGHFARE_REQUIRED ,@PRIMARY_LOCALITY ,@PRIMARY_LOCALITY_REQUIRED ,@SECONDARY_LOCALITY ,@SECONDARY_LOCALITY_REQUIRED ,@POST_TOWN ,@POST_TOWN_REQUIRED ,@COUNTY ,@COUNTY_REQUIRED ,@POSTCODE_DISPLAY ) ) lines pivot (max(address_line) for col in ( addr_line_1, addr_line_2, addr_line_3, addr_line_4, addr_line_5, addr_line_6, addr_line_7, addr_line_8, addr_line_9 ) ) as pivot_lines )
Note that this function invokes the function f_get_address_lines before converting the
address lines to columns.
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 112
4.3 Appendix 3 – Geographic Address View
4.3.1 Geographic Address View
This view combines a view of the address data (v_ecad_model_geographic) with the
corresponding address line columns 1 to 9, which are constructed using a user-defined
function (f_get_address_cols):
create view dbo.v_geographic_address_view as SELECT [ECAD_ID]
,[ORGANISATION_ID]
,[ADDRESS_POINT_ID]
,[BUILDING_ID]
,[BUILDING_GROUP_ID]
,[PRIMARY_THOROUGHFARE_ID]
,[SECONDARY_THOROUGHFARE_ID]
,[PRIMARY_LOCALITY_ID]
,[SECONDARY_LOCALITY_ID]
,[POST_TOWN_ID]
,[POST_COUNTY_ID]
,[EIRCODE]
,[EIRCODE_DISPLAY]
,cols.ADDR_LINE_1, cols.ADDR_LINE_2, cols.ADDR_LINE_3,
cols.ADDR_LINE_4, cols.ADDR_LINE_5, cols.ADDR_LINE_6, cols.ADDR_LINE_7,
cols.ADDR_LINE_8, cols.ADDR_LINE_9
,irish_cols.ADDR_LINE_1 IRISH_ADDR_LINE_1, irish_cols.ADDR_LINE_2
IRISH_ADDR_LINE_2, irish_cols.ADDR_LINE_3 IRISH_ADDR_LINE_3,
irish_cols.ADDR_LINE_4 IRISH_ADDR_LINE_4, irish_cols.ADDR_LINE_5
IRISH_ADDR_LINE_5, irish_cols.ADDR_LINE_6 IRISH_ADDR_LINE_6,
irish_cols.ADDR_LINE_7 IRISH_ADDR_LINE_7, irish_cols.ADDR_LINE_8
IRISH_ADDR_LINE_8, irish_cols.ADDR_LINE_9 IRISH_ADDR_LINE_9
from dbo.V_ECAD_MODEL_GEOGRAPHIC em
cross apply dbo.f_get_address_cols(
EM.ECAD_ID
,EM.DEPARTMENT
,EM.DEPARTMENT_REQUIRED
,EM.ORGANISATION_NAME
,EM.ORGANISATION_NAME_REQUIRED
,EM.SUB_BUILDING_NAME
,EM.SUB_BUILDING_NAME_FULL_ADDRESS_LINE
,EM.SUB_BUILDING_NAME_REQUIRED
,EM.BUILDING_NAME
,EM.BUILDING_NAME_REQUIRED
,EM.BUILDING_NUMBER
,EM.BUILDING_NUMBER_REQUIRED
,EM.BUILDING_GROUP_NAME
,EM.BUILDING_GROUP_REQUIRED
,EM.PRIMARY_THOROUGHFARE
,EM.PRIMARY_THOROUGHFARE_REQUIRED
,EM.SECONDARY_THOROUGHFARE
,EM.SECONDARY_THOROUGHFARE_REQUIRED
,EM.PRIMARY_LOCALITY
,EM.PRIMARY_LOCALITY_REQUIRED
,EM.SECONDARY_LOCALITY
,EM.SECONDARY_LOCALITY_REQUIRED
,EM.POST_TOWN
,EM.POST_TOWN_REQUIRED
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 113
,EM.POST_COUNTY
,EM.POST_COUNTY_REQUIRED
,EM.EIRCODE_DISPLAY ) cols
cross apply dbo.f_get_address_cols(
EM.ECAD_ID
,EM.DEPARTMENT_IRISH
,EM.DEPARTMENT_REQUIRED
,EM.ORGANISATION_NAME_IRISH
,EM.ORGANISATION_NAME_REQUIRED
,EM.SUB_BUILDING_NAME_IRISH
,EM.SUB_BUILDING_NAME_FULL_ADDRESS_LINE
,EM.SUB_BUILDING_NAME_REQUIRED
,EM.BUILDING_NAME_IRISH
,EM.BUILDING_NAME_REQUIRED
,EM.BUILDING_NUMBER
,EM.BUILDING_NUMBER_REQUIRED
,EM.BUILDING_GROUP_NAME_IRISH
,EM.BUILDING_GROUP_REQUIRED
,EM.PRIMARY_THOROUGHFARE_IRISH
,EM.PRIMARY_THOROUGHFARE_REQUIRED
,EM.SECONDARY_THOROUGHFARE_IRISH
,EM.SECONDARY_THOROUGHFARE_REQUIRED
,EM.PRIMARY_LOCALITY_IRISH
,EM.PRIMARY_LOCALITY_REQUIRED
,EM.SECONDARY_LOCALITY_IRISH
,EM.SECONDARY_LOCALITY_REQUIRED
,EM.POST_TOWN_IRISH
,EM.POST_TOWN_REQUIRED
,EM.POST_COUNTY_IRISH
,EM.POST_COUNTY_REQUIRED
,EM.EIRCODE_DISPLAY ) irish_cols
4.3.2 Geographic Address Model View
A model view is produced by joining together those ECAD model tables which are required
to construct addresses. This query encapsulates the rules of the model:
CREATE VIEW dbo.v_ecad_model_geographic
as Select
b.ROUTING_KEY_ID
, rk.routing_key_name ROUTING_KEY
,IIF(NOT org.ORGANISATION_ID IS NULL, org.ORGANISATION_ID,
ap.address_point_id) as ECAD_ID
-- The ECAD_ID identifies an ‘A’ddress Point or ‘O’rganisation
, IIF(NOT org.ORGANISATION_ID IS NULL, 'O', 'A') as ECAD_ID_IS_FROM
, b.BUILDING_ID
, ap.ADDRESS_POINT_ID
, org.ORGANISATION_ID
, org.NAME as ORGANISATION_NAME
, org.DEPARTMENT
, org.NAME_IRISH as ORGANISATION_NAME_IRISH
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 114
, org.DEPARTMENT_IRISH
-- Determine SUB_BUILDING_NAME depending on single/multiple occupancy and
whether residential or commercial
, COALESCE (org.sub_address_name, ap.name) as SUB_BUILDING_NAME
, COALESCE (org.SUB_ADDRESS_NAME_IRISH, ap.NAME_IRISH) as
SUB_BUILDING_NAME_IRISH
-- Does the SUB_BUILDING_NAME appear on a line by itself or does it prefix
the next address element ?
, IIF(NOT org.ORGANISATION_ID IS NULL and NOT org.SUB_ADDRESS_NAME IS
NULL, org.FULL_ADDRESS_LINE,
ap.FULL_ADDRESS_LINE) as
SUB_BUILDING_NAME_FULL_ADDRESS_LINE
, b.name as BUILDING_NAME
, b.name_irish as BUILDING_NAME_IRISH
, b.number as BUILDING_NUMBER
, bg.name as BUILDING_GROUP_NAME
, bg.name_irish as BUILDING_GROUP_NAME_IRISH
, th1.name as PRIMARY_THOROUGHFARE
, th1.name_irish as PRIMARY_THOROUGHFARE_IRISH
, th2.name as SECONDARY_THOROUGHFARE
, th2.name_irish as SECONDARY_THOROUGHFARE_IRISH
, l1.name as PRIMARY_LOCALITY
, l1.name_irish as PRIMARY_LOCALITY_IRISH
, l2.name as SECONDARY_LOCALITY
, l2.name_irish as SECONDARY_LOCALITY_IRISH
, pt.name as POST_TOWN
, pt.name_irish as POST_TOWN_IRISH
, c.name as POST_COUNTY
, c.NAME_IRISH_CO as POST_COUNTY_IRISH
, ap.EIRCODE as EIRCODE
-- The Eircode has 8 digits, 3 for routing key, a space, then the 4-digit
unique identifier
, substring(ap.EIRCODE,1,3) + ' ' + substring(ap.EIRCODE,4,4) as
EIRCODE_DISPLAY
-- flags determine if building address elements are required for
individual address points
, org.ORGANISATION_NAME_REQUIRED
, IIF(NOT org.ORGANISATION_ID IS NULL, org.BUILDING_GROUP_REQUIRED,
b.BUILDING_GROUP_REQUIRED) as BUILDING_GROUP_REQUIRED
, IIF(NOT org.ORGANISATION_ID IS NULL, org.BUILDING_NAME_REQUIRED,
b.BUILDING_NAME_REQUIRED) as BUILDING_NAME_REQUIRED
, b.PRIMARY_THOROUGHFARE_REQUIRED
, b.SECONDARY_THOROUGHFARE_REQUIRED
, bgeo.PRIMARY_LOCALITY_REQUIRED
, bgeo.SECONDARY_LOCALITY_REQUIRED
, bgeo.POST_TOWN_REQUIRED
, bgeo.POST_COUNTY_REQUIRED
, org.DEPARTMENT_REQUIRED
, IIF(NOT org.ORGANISATION_ID IS NULL and NOT org.SUB_ADDRESS_NAME IS
NULL, org.SUB_BUILDING_NAME_REQUIRED,
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 115
ap.SUB_BUILDING_NAME_REQUIRED) SUB_BUILDING_NAME_REQUIRED
, b.BUILDING_NUMBER_REQUIRED
, b.ADDRESS_TYPE_ID BUILDING_ADDRESS_TYPE_ID
, b.BUILDING_GROUP_ID
, b.PRIMARY_THOROUGHFARE_ID
, b.SECONDARY_THOROUGHFARE_ID
, bgeo.PRIMARY_LOCALITY_ID
, bgeo.SECONDARY_LOCALITY_ID
, bgeo.POST_TOWN_ID
, bgeo.POST_COUNTY_ID
, ap.ADDRESS_TYPE_ID AP_ADDRESS_TYPE_ID
, ap.building_id AP_BUILDING_ID
, ap.name AP_NAME
, org.address_type_id ORG_ADDRESS_TYPE_ID
from dbo.ADDRESS_POINT ap
inner join dbo.BUILDING b on b.building_id = ap.building_id
inner join dbo.BUILDING_GEOGRAPHIC bgeo on b.building_id =
bgeo.building_id
inner join dbo.ROUTING_KEY rk on rk.routing_key_id = b.routing_key_id
left outer join dbo.ORGANISATION org on org.ADDRESS_POINT_ID =
ap.ADDRESS_POINT_ID
left outer join dbo.BUILDING_GROUP bg on bg.BUILDING_GROUP_ID =
b.BUILDING_GROUP_ID
left outer join dbo.THOROUGHFARE th1 on th1.THOROUGHFARE_ID =
b.PRIMARY_THOROUGHFARE_ID
left outer join dbo.THOROUGHFARE th2 on th2.THOROUGHFARE_ID =
b.SECONDARY_THOROUGHFARE_ID
left outer join dbo.LOCALITY l1 on l1.LOCALITY_ID =
bgeo.PRIMARY_LOCALITY_ID
left outer join dbo.LOCALITY l2 on l2.LOCALITY_ID =
bgeo.SECONDARY_LOCALITY_ID
left outer join dbo.POST_TOWN pt on pt.POST_TOWN_ID =
bgeo.POST_TOWN_ID
left outer join dbo.COUNTY c on c.COUNTY_ID = bgeo.POST_COUNTY_ID
-- exclude buildings with no delivery points
where not b.status = 2
-- exclude Unassigned Eircodes and ap.eircode is not null
f_get_address_cols function used for Geographic Address view is detailed in Appendix 2.
EIRCODE ADDRESS DATABASE PRODUCT GUIDE EDITION 2, VERSION 8 116
Contact Information
Contact our Customer Account Management team if you would like more information on the products offered by Eircode, email [email protected]
Your Comments On This Guide
If you have any comments on this Eircode Address Database Product Guide Edition 2, Version 4 we would be pleased to hear from you. Email your feedback to [email protected] and type ‘ECAD Product Guide enquiry’ in the subject line.
Disclaimer
Eircode is a trademark/brand of the Postcode Management Licence Holder (PMLH) operated
by Capita Business Support Services (Ireland) Limited. This guide and the information
contained in it are provided ‘as is’. Eircode, PMLH or Capita Business Support
Services(Ireland) does not represent or warrant that this guide will be error-free or will meet
any particular criteria of performance or quality.
Except as expressly set out in this document no representations, warranties or conditions are
given or assumed by Eircode, PMLH or Capita Business Support Services(Ireland) or any
other person in respect of any information or assistance which they provide or have provided,
directly or indirectly to you. And any such representations, warranties or conditions are
excluded to the fullest extent permitted by applicable law.
Eircode, PMLH or Capita Business Support Services (Ireland) excludes all liability for any loss
rising out of or relating to the use of this guide or the information in it, whether direct, indirect,
consequential or special or howsoever arising.
Use of the Eircode Address Database and documentation is subject to a separate Licence
Agreement and as such must be used in accordance with its terms and conditions.
The reader must be aware of their own data protection obligations when using Eircode in
conjunction with customer data. When using Eircode the user must ensure they are fully
compliant with the relevant legislations regarding data protection both in their direct use and
any use via third parties.