A common question in CodeIgniter technical interview questions, don't miss this one. In any dynamic application, we need to call some function to get data from the database.  The model handles all data logic and representation and loads the data to view.  FirstModel is the model name and same should be your file name. It extends the core codeIgnitor model which provides all the built-in functionality.  To load a model use : $this->load->model('ModelName'); Manually connect database by adding $this->load->database();  in the page whereever required.  Connect model to database :  .Auto-connect feature helps to load database with every page load. To enable it add ‘database’ to array library autoload .php  It will be like : $autoload[‘libraries’] = array(‘database’);