Model based MySQL connection module