Model for accessing mysql database