create database and master table