creating database and models