creating tables that denote item"condition"

  • hi,

    I am trying to implement a dummy sales database that will sell products that are:

    New,

    second hand,

    refurbished etc.

    I have a tblProducts, which describes the products.I also have a tblProductSales, which references tblProducts by way of "prodId" (this table includes the unitPrice)

    I am essentially looking for the best way of denoting the "condition" of the products,

    ie, new, second hand etc.

    Is the best way to set uo a 3rd table, tblProductCondition,

    where I will store the following fields:

    "prodConditionId"

    "description"

    eg

    prodConditionId description

    1 new

    2 secondHand

    etc.

    Can anyone point me in the right direction?I can of course send the schema, ( my explanation is probably a bit woolly)

    any help greatly appreciated,

    cheers,

    yogi

  • The solution you describe sounds good. If you want to avoid the join you could of course use a column "prodCondition" with a check constraint to make sure that only values new, second hand, refurbished etc are used.

    --

    Chris Hedgate @ Apptus Technologies (http://www.apptus.se)

    http://www.sql.nu

  • Hi Chris,

    thanx bud.

    nice to hear that I could be doing something right 🙂

    skol,

    yogi

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply