created the structure for database check/create