Starting working on the psql database. Design document may be slightly out of date.