opening the database and creating a table on model init