Final_Exam_Semester_1.docx

download Final_Exam_Semester_1.docx

of 17

Transcript of Final_Exam_Semester_1.docx

  • 8/17/2019 Final_Exam_Semester_1.docx

    1/17

    Final Exam Semester 1

    Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.

    Section 11

    (Answer all questions in this section)

    1. An "Arc Imlementation" can be done !ust like any other Relationshi yousimly add the required #orei$n %eys. &rue or #alse'

     ark for

    Review () oints

     &rue

    #alse (*)

    +orrect

    2. In a hysical data model, a relationshi is reresented as a combination of(+hoose &wo)

     ark for

    Review () oints

    (+hoose all correct answers)

    +olumn

    rimary %ey or -nique %ey (*)

    +heck +onstraint or -nique %ey

    #orei$n %ey (*)

    +orrect

    3. In a hysical data model, an attribute becomes a .  ark for

    Review () oints

     &able

    #orei$n %ey

    +onstraint

    +olumn (*)

    +orrect

    4.  &he transformation from an /R dia$ram to a hysical desi$n involveschan$in$ terminolo$y. 0econdary -nique Identi1ers become

     ark for

  • 8/17/2019 Final_Exam_Semester_1.docx

    2/17

    Review () oints

    +olumns

     &ables

    -nique +onstraints (*)

    rimary %ey +onstraints

    +orrect

    5.  &he te2t below is an e2amle of what constraint tye'

     &he value in the mana$erid column of the /345//0 table must match avalue in the emloyeeid column in the /345//0 table.

     ark for

    Review () oints

    /ntity inte$rity

    -serde1ned inte$rity

    +olumn inte$rity

    Referential inte$rity (*)

    +orrect

    6. #orei$n keys must be null. &rue or #alse'  ark for

    Review () oints

     &rue

    #alse (*)

    +orrect

    7.  &he e2lanation below is a column inte$rity constraint. &rue or #alse'

    A column must contain only values consistent with the de1ned data formatof the column.

     ark for

    Review () oints

     &rue (*)

    #alse

    +orrect

  • 8/17/2019 Final_Exam_Semester_1.docx

    3/17

    8. If a rimary key is a set of columns, then one column must be null. &rue or#alse'

     ark for

    Review () oints

     &rue

    #alse (*)

    +orrect

    9.  &he te2t below is an e2amle of what constraint tye'

    If the number of 644%0 lent to a 64RR47/R in the 3I6RAR5 e2ceeds 8,then we must send him a letter requestin$ the return of the 644%09 this willrequire e2tra ro$rammin$ to enforce.

     ark for

    Review () oints

    /ntity inte$rity-serde1ned inte$rity (*)

    +olumn inte$rity

    Referential inte$rity

    +orrect

    10. 4neto4ne relationshis are transformed into +heck +onstraints in thetables created at either end of that relationshi. &rue or #alse'

     ark for

    Review 

    () oints

     &rue

    #alse (*)

    +orrect

    11. In a concetualmodel, manytomanyrelationshis areresolved via astructure calleda:an  

     ark for Review 

    () oints

    0uertye

    Intersection &able

    Intersection /ntity (*)

    0ubtye

  • 8/17/2019 Final_Exam_Semester_1.docx

    4/17

    +orrect

    Section 12

    (Answer all questions in this section)

    12. 0ystem ;ocumentation is develoed ri$ht at the end oncethe system has $one live and users have been usin$ it for alittle while. 5ou are more likely to $et it correct that way. &rueor #alse'

     ark for

    Review () oints

     &rue

    #alse (*)

    +orrect.

    13. 0ystems are always !ust rolled out as soon as thero$rammin$ hase is 1nished.

  • 8/17/2019 Final_Exam_Semester_1.docx

    5/17

    15.  &he 0C3 statement A3&/R &A63/ /345//0 ;/3/&/+43-< 0A3AR5 is a valid statement. &rue or #alse'

     ark for

    Review () oints

     &rue

    #alse (*)

    +orrect.

    16.  &he clause can be added to a 0/3/+& statement toreturn a subset of the data.

     ark for

    Review () oints

    A

  • 8/17/2019 Final_Exam_Semester_1.docx

    6/17

    Section 15

    (Answer all questions in this section)

    19. In a 0/3/+& clause, what is the result of @ E B * @'  ark for

    Review () oints

    F

    G (*)

    B

    +orrect.

    20. If a 0C3 statement returns data from two or more tables,which 0C3 caability is bein$ used'

     ark for

    Review () oints

    0election

    ro!ection

     Hoinin$ (*)

    Insertion

    +orrect.

    Section 15

    (Answer all questions in this section)

    21. 5ou query the database with this 0C3 statement0/3/+& * #R4 students9

    7hy would you use this statement'

     ark for

    Review () oints

     &o insert data

     &o view data (*)

     &o dislay the table structure

     &o delete data

    +orrect.

  • 8/17/2019 Final_Exam_Semester_1.docx

    7/17

    22. &he /345//0 table contains these columns

    0A3AR5

  • 8/17/2019 Final_Exam_Semester_1.docx

    8/17

    ultilications and ;ivisions are at the same level and would beevaluated 1rst based on left to ri$ht order (*)Additions and ultilications are at the same level and would beevaluated 1rst based on left to ri$ht order;ivisions and 0ubtractions are at the same level and would beevaluated 1rst based on left to ri$ht order

    +orrect.

    Section 16

    (Answer all questions in this section)

    25. &he /345//0 table contains these columns

    3A0&

  • 8/17/2019 Final_Exam_Semester_1.docx

    9/17

    (*)

    0/3/+& lastname, 1rstname, hiredate#R4 emloyees7=/R/ hiredate 6/&7//< MBA-P@M A? MB A-P@M90/3/+& lastname, 1rstname, hiredate#R4 emloyeesA? MBA-P@M9

    +orrect.

    27. 5ou need write a 0/3/+& statement that should only return rows thatcontain BO, OF, or OG for the ;/AR&/

  • 8/17/2019 Final_Exam_Semester_1.docx

    10/17

    0/3/+& lastname, deartmentid#R4 emloyees7=/R/ emloyeeid equals F90/3/+& 1rstname, emloyeeid#R4 emloyees7=/R/ emloyeeid ? F90/3/+& lastname, emloyeeid

    #R4 emloyees7=/R/ emloyeeid equals F9

    +orrect.

    29. 5ou want to retrieve a list of customers whose last names be$in with theletters M#rM . 7hich keyword should you include in the 7=/R/ clause of your0/3/+& statement to achieve the desired result'

     ark for

    Review () oints

    A

  • 8/17/2019 Final_Exam_Semester_1.docx

    11/17

  • 8/17/2019 Final_Exam_Semester_1.docx

    12/17

    +orrect.

    35. 5ou need to combine the #IR0&

  • 8/17/2019 Final_Exam_Semester_1.docx

    13/17

    @8 (*)

    @8 (*)

    +orrect.

    38. /valuate this 0/3/+& statement

    0/3/+& emloyeeid, lastname, 1rstname, salary M5early 0alaryM#R4 emloyees7=/R/ salary I0

  • 8/17/2019 Final_Exam_Semester_1.docx

    14/17

     &he database will dislay the rows in whatever order it 1nds it in thedatabase, so no articular order. (*) &he results will be sorted ascendin$ by the 3A0&

  • 8/17/2019 Final_Exam_Semester_1.docx

    15/17

     &here is no diKerence in the result between the two statements.

     &he statements will sort on diKerent column values. (*)

    IncorrectN 0ee 0ection 3esson B.

    43. /valuate this 0C3 statement

    0/3/+& e.emloyeeid, e.lastname, e.1rstname, m.mana$erid#R4 emloyees e, emloyees m4R;/R 65 e.lastname, e.1rstname7=/R/ e.emloyeeid ? m.mana$erid9

     &his statement fails when e2ecuted. 7hich chan$e will correct the roblem'

     ark for

    Review () oints

    Reorder the clauses in the query. (*)

    Remove the table aliases in the 7=/R/ clause.

    Remove the table aliases in the 4R;/R 65 clause.

    Include a =ADI

  • 8/17/2019 Final_Exam_Semester_1.docx

    16/17

    4R;/R 65 lastname, 1rstname90/3/+& lastname, 1rstname#R4 layers7=/R/ ositionid Q? F4R;/R 65 lastname ;/0+, 1rstname9

    +orrect.

    45. 7hich clause would you include in a 0/3/+& statement to sort the rowsreturned by the 3A0&

  • 8/17/2019 Final_Exam_Semester_1.docx

    17/17

    48. 7hich of the followin$ best describes the meanin$ of the 3I%/ oerator'  ark for

    Review () oints

    ;islay rows based on a ran$e of values.

     &o test for values in a list.

    atch a character attern. (*)

     &o 1nd