AFS WK-2 Activities and solutions as discussed in class

AFS WK-2 Activities and solutions as discussed in class -...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
AFS Activities and solutions as discussed in class Question 1 An order (from a customer) is made up of many order lines. Each line from the order can only come from one order. Each line is used to order something different. Information of interest is: order-no, order-date, total-cost, order-line-no, part-no, quantity-required, customer-no. Insert the following data into your relational tables and underline the primary keys. order-no order- date total-cost order- line-no part-no qty cust-no O123 1 June $110 1 P23 3 C33 O123 1 June $110 2 P34 4 C33 O144 8 June $55 1 P34 2 C33 Worked solution provided below: ORDER order-no order- date cust-no total cost O123 1 June C33 $110 O144 8 June C33 $55 ORDER LINE [order- no] order- line-no part-no quantity O123 1 P23 3 O123 2 P34 4 ORDER ORDER- LINE contains
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
O144 1 P34 2 Note that if we had a PART table which included the price of parts, then total-cost could be calculated (and thus not stored).
Background image of page 2
Question 2 A company supplies parts. They receive customer orders which each contain many order lines. Each order line orders a certain quantity of a different part. A part will be mentioned in many order lines. An order line only mentions one part.
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 9

AFS WK-2 Activities and solutions as discussed in class -...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online