included support for local database
added an update-database method (incomplete yet); cleanups
included update-database function; calculate partitionfunctions