CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • alphanumeric vs integer custom select fields
Pages: [1]

Author Topic: alphanumeric vs integer custom select fields  (Read 1823 times)

chrism

  • Guest
alphanumeric vs integer custom select fields
June 10, 2007, 05:31:06 pm
When adding a custom 'select' field of alphanumeric labels, the underlying data type can be either alphanumeric or integer.  For example a selection of regions could be implemented as

Label, Value(alphanumeric)
North, north
South, south
East, east
West, west 

OR

Label, Value(int)
North, 1
South, 2
East, 3
West, 4

I am wondering what the design considerations are for selecting one approach or the other.  My take is that integers are generally better:
- query speed (faster with Int ?)
- database size (smaller with Int ?)
- import/export (doesn't matter, since CiviCRM will work for both labels and values in 1.8, http://issues.civicrm.org/jira/browse/CRM-1586 ?)
- ease of making future changes (maybe better with alphanumeric ?)

but, I'd like to make sure I'm not missing anything.

Thanks,
Chris

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • alphanumeric vs integer custom select fields

This forum was archived on 2017-11-26.