Urgent Normalisation help!!!

  • Aty01 (3/27/2012)


    orders belong to a customer

    Which you already have handled since the Orders table has a foreign key to customers.

    Right, next thing... Look at these two entities

    Order

    Order Date

    product description

    price

    qty ordered

    Reference to Customer Table

    ----------------------

    Stock

    Stock Description

    Price

    Qty in Stock

    Reference to Supplier table

    What's wrong there? I'll give you a hint, where did the product description in the Orders table come from? I'm sure the customer doesn't type in what he wants to buy.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Lynn Pettis (3/27/2012)


    GilaMonster (3/27/2012)


    Lynn Pettis (3/27/2012)


    Aty01 (3/27/2012)


    there is no link to order table

    Stepping in a minute. Look at your Order table and think of an order you may have placed with a company. How many items can one customer order at one time? How many times do you see the customer information on that order?

    Getting there....

    I know, but you started looking at Orders, so thought it was a good time to expand thoughts around that one item.

    Just don't want to confuse him.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • one order has many stock

    -----------

    Stock ID

  • Aty01 (3/27/2012)


    one order has many stock

    -----------

    Stock ID

    Right. What else?

  • GilaMonster (3/27/2012)


    Lynn Pettis (3/27/2012)


    GilaMonster (3/27/2012)


    Lynn Pettis (3/27/2012)


    Aty01 (3/27/2012)


    there is no link to order table

    Stepping in a minute. Look at your Order table and think of an order you may have placed with a company. How many items can one customer order at one time? How many times do you see the customer information on that order?

    Getting there....

    I know, but you started looking at Orders, so thought it was a good time to expand thoughts around that one item.

    Just don't want to confuse him.

    I don't think we are. Looks like he is thinking things through bit by bit.

  • what else am i suppose to look for

  • Aty01 (3/27/2012)


    what else am i suppose to look for

    Think about orders you have placed with a company. Right now I am just trying to help you look at one piece of the data you are going to be storing.

  • Lynn Pettis (3/27/2012)


    Aty01 (3/27/2012)


    what else am i suppose to look for

    Think about orders you have placed with a company. Right now I am just trying to help you look at one piece of the data you are going to be storing.

    customer details

  • Aty01 (3/27/2012)


    Lynn Pettis (3/27/2012)


    Aty01 (3/27/2012)


    what else am i suppose to look for

    Think about orders you have placed with a company. Right now I am just trying to help you look at one piece of the data you are going to be storing.

    customer details

    What makes up the customer details? Is this information stored any where else?

  • What makes up the customer details? Is this information stored any where else?

    Customer

    Customer Forename

    Customer Surname

    Street

    Town

    Postcode

    Email

    Category

    and the order table will have this detail, so that they can dispach it to the right customer

  • Aty01 (3/27/2012)


    What makes up the customer details? Is this information stored any where else?

    Customer

    Customer Forename

    Customer Surname

    Street

    Town

    Postcode

    Email

    Category

    and the order table will have this detail, so that they can dispach it to the right customer

    Second question I had asked, where else is this information stored? Do you need to store it with the order? Why or why not?

    Please answer these questions before continuing. It will make a good discussion about normalization.

  • you need to store it with order so that they know whos order it is

  • Aty01 (3/27/2012)


    you need to store it with order so that they know whos order it is

    Not necessarily. This information is also stored in the customer table, correct?

  • so whatam i looking for

  • Aty01 (3/27/2012)


    so whatam i looking for

    How are you going to related the customer table to the orders?

    Now to discuss normalization. If you store customer information in both the order table and the customer table, what level of normalization are you looking at?

Viewing 15 posts - 31 through 45 (of 59 total)

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