how to link a select field options with the database records
Check out the Form API reference, especially the part about select lists:

&lt;?php
   $form['selected'] = array(
       '#type' =&gt; 'select',
       '#title' =&gt; t('Selected'),
       '#options' =&gt; array(
          0 =&gt; t('No'),
         1 =&gt; t('Yes'),
       ),
       '#default_value' =&gt; $category['selected'],
       '#description' =&gt; t('Set this to &lt;em&gt;Yes&lt;/em&gt; if you would like this category to be selected by default.'),
   );
?&gt;


You can also consult the examples module for more information.