Fix dbSchema to declare tables properly. Add documentation.

This pull request updates the dbSchema file to accurately assign foreign keys.