create database and model