Added database structure

Closes #27