Drupal 7 Database Query using db_select

Querying the database in Drupal 7 requires using the database.inc API.  This is to provide a modular interface to get information from the database without depending on the type of database that serves as the backend for the drupal installation.  In other words, it does not matter if the database is either MySQL or PostgreSQL, the database API provides the same functions and objects to query information from it.  Essentially, there are three functions to query information from the database: