This depends on upcoming schema work, and will allow the app to work for arbitrary databases with minimal modification.