Results 1 to 4 of 4

Thread: Problem with Normalizing a many to many

  1. #1
    Join Date
    Oct 2021
    Posts
    3

    Problem with Normalizing a many to many

    Hi all,

    I'm currently in the planning phase working with my ERD. I'm trying to normalize and I've become stumped.

    I have a table for printers called machine and another table for paper called media.

    manytomany.png

    Many of the machines in the data set can support several of the paper supplies from the media table. I know a common suggestion would be to use a bridge table between the two but I can't wrap my head around how I would create unique relationships to the bridging table. Any advice or a direction to head in would be appreciated.

    Example:
    machines 1-15 could use all paper roll sizes from 24" up to 36" and from 150' length to 300' length (a total of 6 individual product numbers).

  2. #2
    Join Date
    Nov 2020
    Posts
    17
    What do you not understand about using 'bridge' (aka junction) table? It would have fields to save MachineID, InkID, MediaID, CutID. A record for each combination you want to create. Set the 4 fields as unique index to prevent duplicate combinations.

  3. #3
    Join Date
    Oct 2021
    Posts
    3
    For your suggestion the junction table would have a LOT of columns to accommodate the different combinations. Would this still have fast returns for queries?

    There are currently 70 different machines and 140 different media products. Several of the individual machines could support many different products. For example:
    the T3500 can use paper rolls with a maximum width of 36" and up to 650' length. This means it could possibly have 20 different product codes it supports which would be about 22 columns (junctionID, machineID, mediaID1...mediaID20)

    the T730 can only use paper rolls with a max width of 36" and 150' length so it would only have about 6 columns of product codes that it supports.

    Doesn't this create null space in the table?

    Please let me know if my thoughts of the join table are flawed.

  4. #4
    Join Date
    Nov 2020
    Posts
    17
    20 different product codes would mean 20 records, not 20 columns.

Tags for this Thread

Posting Permissions

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