Enumerator vs. Stand Alone Table

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • -b

    Enumerator vs. Stand Alone Table

    I have a STATUS table consisting of a uid and description, that looks
    like this:

    1 Accept
    2 Accept with corrections
    3 Reject


    I have a CHOICE table which referrs to the uid of the STATUS table, in
    one of it's columns.


    Would it be better to just have these values appear in an enumerated
    value in the CHOICE table, instead of referring to the STATUS table?

    Thank you,
    -docuswear
  • Bill Karwin

    #2
    Re: Enumerator vs. Stand Alone Table

    -b wrote:[color=blue]
    > Would it be better to just have these values appear in an enumerated
    > value in the CHOICE table, instead of referring to the STATUS table?[/color]

    I don't think so. Every time I've tried to use an enumeration for
    anything other than True/False, the business processes for the
    application change, and I have to change the values to the enumeration.

    It seems cleaner to insert another record to your STATUS table than to
    have to restructure the enum datatype for a column in your CHOICE table.

    Regards,
    Bill K.

    Comment

    • sks

      #3
      Re: Enumerator vs. Stand Alone Table


      "-b" <docuswear@yaho o.com> wrote in message
      news:4cd81ea8.0 410061452.eafd5 1e@posting.goog le.com...[color=blue]
      > I have a STATUS table consisting of a uid and description, that looks
      > like this:
      >
      > 1 Accept
      > 2 Accept with corrections
      > 3 Reject
      >
      >
      > I have a CHOICE table which referrs to the uid of the STATUS table, in
      > one of it's columns.[/color]

      I just define this inside the app. If you're using Java then define three
      constants, public static final int ACCEPT = 1, etc. If you want more info,
      make them proper classes. If you're in PHP then again just use constants.
      Then inside your db just have a simple int column (or tiny int or whatever).


      Comment

      Working...