.. _address-pattern: ======================================== Address ======================================== AgileData.io is very flexible and allows you to name your Concepts, Details and Events in any way that makes sense to you or your organisation. When dealing with address data there are a number of patterns we have seen for how you can configure this data. Feel free to pick one and use it or define your own pattern. Address Patterns ----------------- Addresses are Detail (recommended) ++++++++++++++++++++++++++++++++++++++++++ Addresses are defined as :detail:`Detail` for the :concept:`Concept` the address relates to (i.e Customer). When a :concept:`Customer` changes their :detail:`Address`, a new :detail:`Detail` record will be automatically recorded. Good #### * You only need to create one rule, a Detail rule. There is no need to define an Event to hold the relationship between the Customer and their Address. * A Consume View will be automatically created, to enable you to report on Customers and their Addresses. * Address Detail will be automatically included in the Consume View for any Event that have the Customer Concept in them. * You can view the Customers Address "as-at" a specific historical date, for example what was the customers address as at 31st March last year. Not so Good ########### * Getting a count or list of unique addresses for all Customer will be slower. Addresses are Concept ++++++++++++++++++++++++++++++++++++++++++ Addresses are defined as a Concept. An Event is defined to record the fact a Customer has an Address. When a Customer changes their address, a new Event will be automatically recorded. Good #### * A Consume View will be automatically created, to enable you to report on Customers and their Addresses. * You can view the Customers address "as-at" a specific historical date, for example what was the customers address as at 31st March last year. Not so Good ########### * You need to define two rules, one for the Concept and one for the Event. * You will need to create a custom Consume Addresses are Reference Data ++++++++++++++++++++++++++++++++++++++++++ Addresses are treated as reference data and follow one of the reference data patterns. :ref:`reference-data-pattern` Good #### * A Consume View will be automatically created, to enable you to report on Customers and their Addresses. * You can view the Customers address "as-at" a specific historical date, for example what was the customers address as at 31st March last year. Not so Good ########### * You will need to maintain a master list of all valid addresses; * You will need to deal with Addresses that arrive as a Detail record but do not comply with your reference data.