AnotherCodeArtist / medien-transparenz.at

Apache License 2.0
3 stars 2 forks source link

Support geographic context for organizations #18

Closed AnotherCodeArtist closed 8 years ago

AnotherCodeArtist commented 8 years ago

The Austrian Court of Audit is maintaining a list of all organizations along with their addresses. This allows for adding geographical context to the data.

Adding this data should be based on a performance analysis figuring out whether it is better to keep two different collections with organization/address data and one with transfers or the keep this data redundantly in one collection

relative-progressio commented 8 years ago

We actually found three ways to bind to organisation data:

  1. lookup: This is basically a left-join to the organisation-collection. Implementation (as far as needed) at: geographic-context-collection
  2. Redundancy: Store the organisation data with each transfer. Implementation (as far as needed) at: geographic-context-redundance
  3. 'populate': MongoDB is able to resolve the referenced object id with populate, unfortunately not with the used aggregation-framework. To resolve that, two queries are necessary. First performance tests showed that this is still the fastest approach, at least for the moment. As a result, this approach is going to be released. Implementation (as far as needed) at: geographic-context-populate