Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2012
    Posts
    2

    Help designing database table

    Hello everyone,

    I am working on a project which I will be programming in C# once the database design is complete. I need some help designing the database tables. I can't seem to rack my mind around how this can work. I have half the design complete, but I need some help and clarification how this can work.

    Note, I am not using actual table names data, but this outlines the dilemma.

    I have the STUDENT, PRODUCT, and COLOR data table. A STUDENT can have many PRODUCTS and many COLORS.

    So far, I have a STUDENT TABLE with their NAMES.
    A table for PRODUCT.
    A table for COLOR.


    The programming part is where this gets tricky. In the application, when a user logins, they come to the first screen. The first screen shows the student information. Here, they must choose a PRODUCT from the dropdownlist. (there could be 1-5 PRODUCTS)

    Next screen, the user must choose the COLOR information that corresponds to the PRODUCT information.

    PRODUCT_DESC_1 only corresponds to COLOR_DESC_1 and vice versa.

    any suggestion or help is very much appreciated!

    An example of a record:
    Attached Thumbnails Attached Thumbnails Untitled.JPG  

  2. #2
    Join Date
    Oct 2009
    Location
    221B Baker St.
    Posts
    486
    From your example, it is not clear what you actually have. There appear to be 2 products in each of the "desc"s. There are multiple colors in both.

    How did there come to exist these "combinations" in one "record".

    If i understand you will have people who can order products that may be of differing colors. So when the data is used it will be person/product/color multiple times in the result? If the person orders multiple of the same product with different colors, there would be additional rows returned?

    What about price or it this not needed now?

  3. #3
    Join Date
    Aug 2012
    Posts
    2
    Thank you for your reply. I know these combinations in a record is ridiculous, but our data is that way. Please keep in mind that this is not the actual data we have.

    Price is not needed in this scenario.

  4. #4
    Join Date
    Oct 2009
    Location
    221B Baker St.
    Posts
    486
    The data posted for F.SMITH has no order to it. Someone working with this possibly understands this completely, but to a stranger, it is quite non-intuitive.

    Why are pen/paper in a different desc than glue/gel?

    If there are 2 products per desc, why are there more colors than products?

    Does F.SMITH "have" a red pen or something else? What about some purple gel? How does someone who reads this data know which color(s) go with each different product?

    I really do not understand what the current data tells me.

    It doesn't really matter if this is the actual data. It does matter if it accurately represents the actual data.

Posting Permissions

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