The Pipeline Open Data Standard (PODS) database is designed to be a reporting tool for pipeline projects by creating a populated database of relevant information regarding the lifecycle of the project. In GIS, these unique characteristics are defined as attributes and are used to populate the tables, feature classes and establish relationships as mentioned in the previous article.
The Domain properties are sets of defined attributes that can be used in the associated field. In this article, OGSpace will discuss the difference between the two property types available and how to use them. These two properties are used to help maintain a quality database, and reduce errors in reporting by setting these constraints and applying them to the data model.
A domain defines a specific set of values that can be used to populate an attribute for a field in a table. The Domain of a field consists of two parts: the value and the description. The value is used as shorthand code or alias for the longer descriptive version. When applying domains and using them in the GIS the end user will see the long descriptive version to help clarify what the correct value should be and the code is stored in the database. This helps the user identify what needs to be defined while maintaining minimal space in the database model for storage. There are two types of attribute domains available to the user, the range domain and the coded value domain.
The coded value domain uses codes or acronyms to define a certain value in a particular field. These values can be used by certain field formats in your GIS. These values can be text, short, long, double, float, or date. Coded value domains have many benefits. They allow for the administrator to define and constrain the model to specific values that might be consumed in relationships, where a typo could case a break and not report on that record. They familiarize everyone on the project to the same terms for easier communication, and since they store the coded value instead of the description, they take up less space on the server. The following example demonstrates the using of coded value domains, available values of zero through seven stored in a RoadType field might represent types of streets located in a municipality:
- Major Road;
- County Road;
- Local Road;
- Arterial Road;
- Dirt Road;
- Private Drive; and
- Lease Road
As demonstrated, learning what each range value is can be time consuming and costly when using many vendors so the description helps identify the correct range value that is stored in the database.
The range value domain, which consists of a number system to define a particular group of related attributes, for example defining minimum and maximum pressure values or constraining Pipe Diameter values to the materials used for construction of a project. Examples include constraining the Nominal Pipe Diameter to whole value integers of 1 through 32. A reason for this might be that the table is storing values for the wall thickness, inner diameter and outer diameter for analysis purposes, but for mapping purposes the end user of the map may just want the nominal diameter such as 18. This type of domain should be used when a large group of records can be grouped into an easily defined smaller subset of categories.
When using domains in a database model it is a best practice to diagram out what the needs of the end users will be and how the model will be used as a reporting tool. Defining domains inside your data model can be of great benefit to any organization. It reduces the risk of human data entry error, creates clearly defined values for describing a project, and facilitates greater communication between staff and project phases. The PODS data model provides certain fields already domained for you based on the vast experience of the leaders and technical committees that empower the non-profit organization. This provides a base point for new users and shows them how they can be used and applied to their specific data model.