Model to open a database connection