Structuring Addresses
It is common to need to store addresses. As addresses consist of a number of components, there are a few ways of storing them in Hypertable, depending on your needs. This guide discusses some methods of storing addresses, but your unique requirements may be best met by some combination of methods, or even something entirely different.
Contents
Single Field
Addresses can be stored in a single Multi-line Text field.
Pros
- All the information is in one place for easy import and export
- Multiple addresses (e.g. "Head Office" and "Nearest Branch", or "Patient Address" and "Next of Kin Address") can be more easily managed
Cons
- If a particular section of the address is needed separately (e.g. the city), then it can be more difficult to extract
Multiple Fields
The separate lines of the address can be stored in separate Text Line fields.
For example, a Customers
Collection may contain the following fields (among others):
text line
- "House Name/Number"text line
- "Street Name"text line
- "City"text line
- "County/State"text line
- "Postcode/Zip Code"
or simply:
text line
- "Address Line 1"text line
- "Address Line 2"text line
- "Address Line 3"text line
- "Address Line 4"text line
- "Postcode/Zip Code"
Pros
- It is straightforward to extract single components of addresses (e.g. just the postcode)
- If any existing third-party systems use separate fields, integrating the systems will be easier
Cons
- There are more fields to manage, and storing multiple addresses within one records can make this drawback even more pronounced
Separate Postcode Field
A combination of the previous two methods, the main portion of the address can be stored in a single Multi-line Text field, and the Postcode can be stored in its own Text Line field. Of course, other fields can be selectively extracted from the Multi-line Text field into their own fields instead of or as well as the Postcode.
Pros
- Easy access to select parts of addresses, either in Views or Custom Functions
Cons
- Same as Multiple Fields cons
Separate Address Record
The address can be stored in a separate record from the record representing whatever happens at the address (e.g. Customers, Suppliers, etc.). This can be useful if multiple records all use the same address, or if the address for a number of records needs to be updated frequently. The records can then be linked using either a Reference or Join field.
In the separate Addresses
collection, the address may then be stored on a single field or multiple fields, as outlined above.
Pros
- The same definition of an address can be re-used across a number of other records
Cons
- There is a level of indirection from a record to its related address, either:
- using a Lookup field in a View, or
- using an additional function step in a Custom Function
Do you think something is missing from the docs? Let us know