Generating default database structure

Closes issue #1 and #2