When we want to use database, we needs some connection parameters to get the connection. It can be from configuration file like application.ini or variable declared in the php file.
db.adapter = PDO_MYSQL
db.config.host = localhost
db.config.username = root
db.config.password =
db.config.dbname = grid
db.config.profiler = false;
After we configure the connection information, we can use Zend_Db to set up the connection.
$db = Zend_Db::factory($config->db->adapter, $config->db->config->toArray());
Zend_Db_Table::setDefaultAdapter($db);