March 27, 2012 at 12:20 pm
lol i don't know i am learning normalisation.
will i be able to relate the order table with the customer by customer ID
March 27, 2012 at 3:46 pm
Lunch/work back for a bit.
Okay.
Let's think about the relationship between Customers and Orders. How many orders could a customer have?
March 27, 2012 at 3:57 pm
One customer can have many orders
March 27, 2012 at 4:23 pm
Okay, one customer, many orders; where do you want to store the customer information, in the customer table or the order table?
March 28, 2012 at 12:27 am
Customer information is in the customwe table
March 28, 2012 at 9:34 am
Can you explain why based on what you have learned so far about normalization?
Also, how will you relate the two tables?
March 28, 2012 at 10:04 am
Each table has its own data.
The customer details will be in the customer table.
Order details in the order table etc...
Each table has its own primary key.
Tables are linked via a foreign key
March 28, 2012 at 10:39 am
Aty01 (3/28/2012)
Each table has its own data.The customer details will be in the customer table.
Order details in the order table etc...
Each table has its own primary key.
Tables are linked via a foreign key
What I was looking for was more along this:
Storing the customer information in the order results in repeating data. By moving this data to a separate table we create one copy of this data. In this case, we replace the customer information with a single item, such as customer numbner or customer id and use that to link the customer and order tables.
Make sense?
March 28, 2012 at 10:40 am
I think so
March 28, 2012 at 10:42 am
Aty01 (3/28/2012)
I think so
So, show us what you have so far.
March 30, 2012 at 6:14 am
Lynn Pettis (3/28/2012)
Aty01 (3/28/2012)
I think soSo, show us what you have so far.
Praying hard poster does not says "I have a head ache" 😀
_____________________________________
Pablo (Paul) Berzukov
Author of Understanding Database Administration available at Amazon and other bookstores.
Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.April 10, 2012 at 4:36 am
as your desire ,you can do is ,
table address
addressid
address
town
postcode
table customer
customerid
Customer Forename
Customer Surname
addressid
table supplier
Supplier ID
Supplier Name
addressid
Supplier Tel No
table product
productid
Category
productname
Price
productstock
Stock ID
Stock Description
productid
Qty in Stock
Table order
oderid
productid
customerid
orderdate
table orderdetail
orderdetailid
orderid
qty
and the primary key is chosen by the 1st column of the table .
July 19, 2012 at 11:27 am
Friend: Check out the following link
http://www.youtube.com/watch?v=c-Zfgg5Ayyc&feature=related
~ Lokesh Vij
Link to my Blog Post --> www.SQLPathy.com[/url]
Follow me @Twitter
July 19, 2012 at 11:28 am
Above link is totally in agreement with Gail Shaw's explanation
~ Lokesh Vij
Link to my Blog Post --> www.SQLPathy.com[/url]
Follow me @Twitter
July 19, 2012 at 11:29 am
One more link: http://www.youtube.com/watch?v=cbJ-xaBfWLM&NR=1&feature=endscreen
~ Lokesh Vij
Link to my Blog Post --> www.SQLPathy.com[/url]
Follow me @Twitter
Viewing 15 posts - 46 through 59 (of 59 total)
You must be logged in to reply to this topic. Login to reply