Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Do I need to normalise?

Options
  • 05-05-2011 10:43pm
    #1
    Registered Users Posts: 1,158 ✭✭✭


    I'm creating a database which has items and lists. A list can have many items and an item can be on many lists. In my design I had

    a table for items: (item_id, description, quantity)
    a table for lists: (list_id, description)
    a junction table: (list_id, item_id)

    But I'm wondering if having just one table: (list_id, list_description, item_description, quantity)

    and having the repeating list_id and list_description would outweigh the creation of two extra tables?

    Does anyone have any ideas? This is for a college project, so I'm wondering should I just stick to what we did in college and just create the three normalised tables?


Comments

  • Registered Users Posts: 3,357 ✭✭✭snappieT


    You almost certainly want the normalised tables for a college project. Ordinarily, you denormalise only for performance when reading (only need to read from one table), but you want to avoid writing to a denormalised table because of the necessity to update values in multiple locations.


Advertisement