Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2003
    Posts
    6

    inventory design pattern?

    ive got a database design problem that i cant figure out. ive looked
    around online quite a bit for any resources on design patterns that i
    could try to use, but none of them seem to really fit perfectly. im
    guessing id have better luck if i start looking in some books, but i
    thought id try here first in case any one would be willing to help me
    out.

    it seems like my problem would be a fairly common one, so maybe im
    just thinking about this the wrong way. basically what i want is a
    sort of inventory system where every item has a unique id. given this
    id, (most probably input from a barcode) i want to be able to find
    information on it. theres all kinds of very different items though so
    all the items cant be stored in the same table. i found the subclass
    pattern is about what i want... i store all the common information in
    a base table, and keep information unique to each type of item in a
    different table, with its key being the same as the key in the base
    table. the problem is, i dont see how to know what table to look in
    for the extended information given just the id?

    thanks for any help in advance!

  2. #2
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    You need a field on your main table that indicates the object type, and which you can use to determine where to look up additional data.

    blindman

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •