Now to initialize the database instance in any controller action you just need to write only 1 line i.e

1

$db= Zend_Db_Table::getDefaultAdapter();

In this line $db returns the database instance and getDefaultAdapter() gets all the details from application.ini file to connect to the database.We need to write this line in each Action of any controller page that needs database connection.Using this $db we can query database for the application need.