database assignment 1

Upload: pragativbora

Post on 14-Oct-2015

19 views

Category:

Documents


0 download

DESCRIPTION

db

TRANSCRIPT

  • 1

    MIS 6326 (Data Management)

    Assignment 1: Chapters 4, 5, & 6

    Due date: July 3, 2014

    This individual assignment must be done by each individual student, not a group. Submission of the assignment via e-mail, fax, or other electronic media is not acceptable. A

    printout of the assignment answer must be submitted in the classroom or at the instructors office by the due date. Absolutely no exception!

    UPart 1. SQL: Create one SQL SELECT statement for each of the following questions

    1A. Get offering numbers (OfferNo) and course numbers (CourseNo) of offerings that were offered by MS department faculty in Summer 2010.

    OfferNo CourseNo ----------- --------

    8888 IS320

    1B. Get course numbers of courses (CourseNo) taken IS major students who are JR or SR.

    CourseNo --------

    FIN450 FIN480 IS320 IS460 IS480

    1C. Get the list of FIN major students (containing students first names, last names, majors, and GPAs). Be sure to sort the list alphabetically by students last names and then first names in the ascending orders.

    StdFirstName StdLastName StdMajor StdGPA ------------ ----------- -------- ------

    JOE ESTRADA FIN 3.20 ROBERTO MORALES FIN 2.50 BOB NORBERT FIN 2.70

    1D. Get the average GPA of each major that is majored by 3 or more students.

    StdMajor AvgStdGPA -------- --------

    FIN 2.800000 IS 3.233333

  • 2

    1E. For each offering, find the number of FIN major students who took the offering.

    OfferNo NoOfFinStudents ----------- ---------------

    1234 1 4321 2 5555 1 5678 1 5679 2 9876 2

    Part 2. Task Assignment Database

    2. See Q20 in pages 210 of the textbook.

    2A. Draw an initial ERD based on the initial requirements.

    2B. Draw an revised ERD for the new requirements.

    Note: A list of design decisions for each ERD is NOT required. Just draw the initial and the revised ERDs.

    Note: The ERD must include not only entities and relationships with cardinalities but also all attributes. Every entity must have a designated primary key. There must be no many-to-many relationships and no multi-valued attributes. Enter all foreign keys in the ERD.

    2C. Convert the revised ERD into a relational mode.

    Note: You do NOT need to convert the initial ERD. Just convert the revised ERD.

    Note: A relational model is a collection of table specifications that include table names, column names, primary keys, and foreign keys. See Page 2 of Chapter 6 Slide file for the detail.

    Note: Examples of relational models converted from ERDs are in Pages 1833 of Chapter 6 Slide file.