Adding database and view updates

This has all the latest views and postgres database stuff.