How to add a dynamic select field to a content type form? I would like to add a dynamic select field where options change from time to time. New options will be added along with old options in future. I know i can add form element using hook_form_alter and save values using node api in custom table created using install file of a module.

Is there any inbuilt mechanism where i can create a field and avoid dealing with schema and schema related queries ? My only concern is field should support dynamic options in future... Something like select field values will be pulled using a query.

PS: I hope above questions is not primarily opinion based. I believe many Drupalers might have faced above situation :-) Please do add a comment if form alter approach is the right one !
You can probably do that using the field API and setting an allowed_values_function for the list field.

e.g:

/**
 * Implements hook_form_alter
 */
function MYMODULE_form_alter(&amp;$form, &amp;$form_state, $form_id){

  if ($form_id == 'field_ui_field_settings_form') {
    // Make the allowed_values_function editable as a textfield
    // Possible to inspect $form or $form_state to vary by field
    if(isset($form['field']['settings']['allowed_values_function'])) {
      $form['field']['settings']['allowed_values_function'] = array(
        '#type' =&gt; 'textfield',
        '#title' =&gt; t('Allowed value function'),
        '#description' =&gt; t('Returns an array of allowed values'),
        '#default_value' =&gt; $form['field']['settings']['allowed_values']['#field']['allowed_values_function']
      );
    }
  }

}


The allowed_values_function then returns an array of values for the field.

e.g: 

/**
 * Allowed values callback
 */
function MYMODULE_custom_field_allowed_values($field){

  if(CONDITION){
    return drupal_map_assoc(array('A1','B1','C1'));
  }elseif(OTHER_CONDITION){
    return drupal_map_assoc(array('A2','B2','C2'));
  }

}