Utility functions to help form useful objects and arrays from flattened database queries. Alternative to ORMs.