create database structure on the fly