sql problems

Upload: waleed-aftab

Post on 07-Jul-2018

215 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/18/2019 SQL Problems

    1/3

    3/30/2016 Bookshelf Online

    https://bookshelf.vitalsource.com/#/books/9780134402109/cfi/6/106!/4/2/8/4/18/2/4/2/2/2/[email protected]:0

    PRINTED BY: [email protected]. Printing is for personal, private use only. No part of this book may be

    reproduced or transmitted without publisher's prior permission. Violators will be prosecuted.

    4-35. Figure 4-34   (page 197   ) shows an EER diagram for a restaurant, its tables, and the waiters and waiting

    staff managers who work at the restaurant. Your assignment is to:

    Figure 4-34 EER diagram for a restaurant

    a. Develop a relational schema.

    b. Show the functional dependencies.

    c. Develop a set of 3NF relations using an enterprise key.

    4-36. Table 4-4   shows a relation called GRADE REPORT for a university. Your assignment is as follows:

    http://-/?-http://-/?-http://-/?-

  • 8/18/2019 SQL Problems

    2/3

  • 8/18/2019 SQL Problems

    3/3

    3/30/2016 Bookshelf Online

    https://bookshelf.vitalsource.com/#/books/9780134402109/cfi/6/106!/4/2/8/4/18/2/4/2/2/2/[email protected]:0

    Table 4-5 Shipping Manifest

    Shipment ID: 00-0001 Shipment Date: 01/10/2015

    Origin: Boston Expected Arrival: 01/14/2015

    Destination: Brazil

    Ship Number: 39 Captain: 002-15

    Henry Moore

    Item Number Type Description Weight Quantity TOTALWEIGHT

    3223 BM Concrete 500   100  50,000

    Form

    3297 BM Steel  87 2,000 174,000

    Beam

    Shipment Total: 224,000

    a. Draw a relational schema and diagram the functional dependencies in the relation.

    b. In what normal form is this relation?

    c. Decompose MANIFEST into a set of 3NF relations.

    d. Draw a relational schema for your 3NF relations and show the referential integrity constraints.

    e. Draw your answer to part d using Microsoft Visio (or any other tool specified by your instructor).

    4-38. Transform the relational schema developed in Problem and Exercise 4-37   into an EER diagram. State

    any assumptions that you have made.

    4-39. For your answers to the following Problems and Exercises from prior chapters, transform the EER diagrams

    into a set of relational schemas, diagram the functional dependencies, and convert all the relations to third normal

    form.

    a. Chapter 3   , Problem and Exercise 3-32b. Chapter 3   , Problem and Exercise 3-37

     4-40. Transform Figure 2-15a   , attribute version, to 3NF relations. Transform Figure 2-15b   , relationship

    version, to 3NF relations. Compare these two sets of 3NF relations with those in Figure 4-10   . What observations

    and conclusions do you reach by comparing these different sets of 3NF relations?

    http://-/?-https://jigsaw.vitalsource.com/books/9780134402109/epub/OPS/xhtml/fileP7000497037000000000000000001D73.xhtml#P7000497037000000000000000001DA8https://jigsaw.vitalsource.com/books/9780134402109/epub/OPS/xhtml/fileP7000497037000000000000000001228.xhtml#P70004970370000000000000000012F7https://jigsaw.vitalsource.com/books/9780134402109/epub/OPS/xhtml/fileP7000497037000000000000000001228.xhtml#P70004970370000000000000000012F7https://jigsaw.vitalsource.com/books/9780134402109/epub/OPS/xhtml/fileP7000497037000000000000000001A36.xhtml#P7000497037000000000000000001B8Chttps://jigsaw.vitalsource.com/books/9780134402109/epub/OPS/xhtml/fileP70004970370000000000000000017F3.xhtml#P70004970370000000000000000017F3https://jigsaw.vitalsource.com/books/9780134402109/epub/OPS/xhtml/fileP7000497037000000000000000001A36.xhtml#P7000497037000000000000000001B41https://jigsaw.vitalsource.com/books/9780134402109/epub/OPS/xhtml/fileP70004970370000000000000000017F3.xhtml#P70004970370000000000000000017F3