March 27, 2012 at 7:36 am
To what tables?
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 9:53 am
foreign keys to order and supplier and stock
March 27, 2012 at 10:22 am
Order has foreign keys to what tables?
Supplier has foreign keys to what tables?
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:00 am
customer has many orders
so customer is foreign key in orders table
a supplier suplies many stock
so supplier is a foreign key in stock table
right?
March 27, 2012 at 11:06 am
You're the one doing the design, I'm just guiding.
So, we have so far this:
Customer
Customer Forename
Customer Surname
Street
Town
Postcode
Category
-------------------------
Order
Order Date
description
price
qty ordered
Reference to Customer Table
----------------------
Stock
Stock Description
Price
Qty in Stock
Reference to Supplier table
----------------------
Supplier
Supplier Name
Supplier Address
Supplier Town
Supplier Postcode
Supplier Tel No
Anything look missing there?
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:11 am
there is no link to order table
March 27, 2012 at 11:12 am
What needs a link to the order table?
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:16 am
am sure its the customer table that links to the order table
but maybe we can create another table
March 27, 2012 at 11:20 am
Really? Customers has a foreign key to orders? Think about it, do customers belong to an order or do orders belong to a customer?
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:23 am
orders belong to a customer
March 27, 2012 at 11:25 am
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?
March 27, 2012 at 11:31 am
i had this before is this right
March 27, 2012 at 11:33 am
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....
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:34 am
one customer can have many orders
March 27, 2012 at 11:34 am
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.
Viewing 15 posts - 16 through 30 (of 59 total)
You must be logged in to reply to this topic. Login to reply