March 27, 2012 at 11:35 am
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
March 27, 2012 at 11:35 am
Lynn Pettis (3/27/2012)
GilaMonster (3/27/2012)
Lynn Pettis (3/27/2012)
Aty01 (3/27/2012)
there is no link to order tableStepping 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
March 27, 2012 at 11:39 am
one order has many stock
-----------
Stock ID
March 27, 2012 at 11:40 am
Aty01 (3/27/2012)
one order has many stock-----------
Stock ID
Right. What else?
March 27, 2012 at 11:41 am
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 tableStepping 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.
March 27, 2012 at 11:47 am
what else am i suppose to look for
March 27, 2012 at 11:53 am
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.
March 27, 2012 at 11:54 am
Lynn Pettis (3/27/2012)
Aty01 (3/27/2012)
what else am i suppose to look forThink 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
March 27, 2012 at 11:55 am
Aty01 (3/27/2012)
Lynn Pettis (3/27/2012)
Aty01 (3/27/2012)
what else am i suppose to look forThink 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?
March 27, 2012 at 12:02 pm
What makes up the customer details? Is this information stored any where else?
Customer
Customer Forename
Customer Surname
Street
Town
Postcode
Category
and the order table will have this detail, so that they can dispach it to the right customer
March 27, 2012 at 12:05 pm
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
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.
March 27, 2012 at 12:08 pm
you need to store it with order so that they know whos order it is
March 27, 2012 at 12:10 pm
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?
March 27, 2012 at 12:15 pm
so whatam i looking for
March 27, 2012 at 12:18 pm
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