-
Notifications
You must be signed in to change notification settings - Fork 29
Database Design
smart-fm edited this page Dec 5, 2018
·
48 revisions
Mid term database consist of 4 schemas
- Demand Schema contains the tables related to demand for mid term e.g. daily activity schedule
- Route choice schema contains the tables related to route choice e.g. choice set table
- Supply Schema contains table related to supply side data e.g. road network
- Output schema contains tables generated from simulation
Steps to create Database
- Download the simmobcity archive file from this link and save it on the Postgres server
- Create a new database (i.e. simmobcity) in postgres
- Ensure access is granted to the new database by checking the pg_hba.conf file. If required, include the new database in pg_hba.conf file and restart postgres.
- At the terminal prompt of the Postgres server, change directory to the path containing the downloaded archive file
- Enter the following command to restore the database schema and data
pg_restore -U postgres -h localhost -O -x simmobcity.archive.20181205 -d simmobcity
Documentation on the pg_restore command can be found here.
Follow the same steps as above. For step 5, use the -s
or --schema-only
option in the pg_restore command.
pg_restore -U postgres -h localhost -O -x -s simmobcity.archive.20181205 -d simmobcity