Create final database structure