Section 11
(Answer all questions in this section) 1.
In an Oracle database, why would 1_TABLE not work as a table nae!
"ark #or $e%iew (1) &oints
The database does does not understand understand all ca'ital letters letters There is no 'roble here here ou ou can create create a table called 1_TABLE 1_TABLE Ob*ect naes ust not start with a nuber They ust be+in with a letter () TABLE T ABLE is a reser%ed reser%ed word -orrect 2. The
trans#oration #ro an E$ dia+ra to a 'hysical desi+n trans#oration desi+n in%ol%es chan+in+ terinolo+y .econdary /nique Identi0ers becoe
"ark #or $e%iew (1) &oints
-oluns Tables T ables /nique -onstraints () &riary ey -onstraints -orrect 3.
In a 'hysical data odel, a relationshi' is re'resented re'resented as a cobination o#2 (-hoose Two)
"ark #or $e%iew (1) &oints
(-hoose all correct answers) -olun &riary ey or /nique ey () -heck -onstraint or /nique ey 3orei+n ey () -orrect 4. T To o
resol%e a any any to any relationshi' relationshi' in a 'hysical odel odel you create create a4an ___________________! _____________ ______!
"ark #or $e%iew (1) &oints
/nique key constraints Intersection entity Intersection table ()
Two T wo tables with 3orei+n 3orei+n key key constraints between between the -orrect 5.
In a conce'tual odel, any5to5any relationshi's relationshi's are resol%ed %ia a structure called a4an2 ________________
"ark #or $e%iew (1) &oints
.u'erty'e Intersection Table Intersection Entity () .ubty'e -orrect 6.
An 6Arc I'leentation6 can be done *ust like any other $elationshi' 5 you si'ly add the required 3orei+n eys True or 3alse!
"ark #or $e%iew (1) &oints
True T rue 3alse () ( ) -orrect 7. The
e7'lanation below is a /ser e7'lanation /ser 8e0ned inte+rity rule rule and ust, ust, there#ore, be anually coded9 the 8atabase cannot en#orce this rule autoatically True T rue or 3alse! 3alse! A 'riary key ust be unique, and no 'art o# the 'riary key can be null
"ark #or $e%iew (1) &oints
True T rue 3alse () ( ) -orrect 8.
A #orei+n key cannot re#er to a 'riary key in the sae table True or 3alse!
"ark #or $e%iew (1) &oints
True T rue 3alse () ( ) -orrect 9.
A table ust ha%e a 'riary key True or 3alse!
"ark #or $e%iew (1) &oints
True T rue 3alse () ( ) -orrect 10. Entity
inte+rity re#ers to2
"ark #or $e%iew (1) &oints
Tables T ables always containin+ containin+ te7t data Tables T ables always containin+ containin+ nueric data -oluns ha%in+ &riary eys, 3orei+n eys, /nique eys, and -heck constraints de0ned in the database Tables T ables ha%in+ &riary &riary eys, eys, 3orei+n 3orei+n eys, eys, /nique eys, eys, and -heck -heck constraints de0ned in the database () -orrect Section 11
(Answer all questions in this section) 11. A
table ust ha%e at least one candidate key, as well as its 'riary key True T rue or 3alse! 3alse!
"ark #or $e%iew (1) &oints
True T rue 3alse () ( ) -orrect
Section 12
(Answer all questions in this section) 12. .yste
8ocuentation is de%elo'ed ri+ht at the end once the syste has +one li%e and users ha%e been usin+ it #or a little while ou are ore likely to +et it correct that way True or 3alse!
"ark #or $e%iew (1) &oints
True T rue 3alse () ( ) -orrect 13. 8urin+
which 'hases o# the .yste 8e%elo'ent Li#e -ycle would you test the syste be#ore rollin+ it out to the users!
"ark #or $e%iew (1) &oints
Build and Transition
.trate+y and Analysis 8esi+n and &roduction Transition T ransition and &roduction &roduction () -orrect 14. The
#_custoers table contains #_custoers contains the #ollowin+ data2 data2
"ark #or
ID
Name
Address
City
State
Zip
1
Cole Bee
123 Main Street
Orlando
FL
32838
2
Zoe Tee
1!!" Oli#er A#en$e
Boston
MA
!211%
3
Sandra Lee
22 Main Street
Tampa
FL
32&&&
$e%iew (1) &oints
I# you run the #ollowin+ stateent2 8ELETE 3$O" 3_-/.TO"E$. :;E$E I8 <= >9 ;ow any rows will be le#t in the table!
? @ 1 () > -orrect 15. Once
you ha%e created a table, it is not 'ossible to alter the de0nition o# it I# you need to add a new colun you ust delete the table de0nition and create a new, correct table True or 3alse!
"ark #or $e%iew (1) &oints
True T rue 3alse () ( ) -orrect 16. :hat
coand can be used to create a new row in a table in the database!
"ark #or $e%iew (1) &oints
-$EATE E: A88 I.E$T () -orrect 17. The
8E.-$IBE coand returns returns all rows rows #ro a table table True True or 3alse! 3alse!
"ark #or
$e%iew (1) &oints True T rue 3alse () ( ) -orrect 18. :hat
coand will return data #ro the database to you!
"ark #or $e%iew (1) &oints
3ET-; ET .ELE-T () $ET/$ -orrect
Section 15
(Answer all questions in this section) 19. ou ou
query the the database with this this .CL stateent2 stateent2 .ELE-T 3$O" students9 :hy would you use this stateent!
"ark #or $e%iew (1) &oints
To T o insert data To T o %iew data () To T o dis'lay the table table structure structure To T o delete data -orrect 20. E%aluate
this .ELE-T stateent2
.ELE-T (salary raise_'ercent) raise 3$O" e'loyees9 I# the $AI.E_&E$-ET colun only contains null %alues, what will the stateent return!
Only Deroes Only null %alues () A null %alue or a Dero de'endin+ on the %alue o# the .ALA$ colun A null %alue or a nueric %alue de'endin+ on the %alue o# the .ALA$ colun
"ark #or $e%iew (1) &oints
-orrect Section 15
(Answer all questions in this section) 21. In
a .CL stateent, which clause s'eci0es one or ore coluns to be returned by the query!
"ark #or $e%iew (1) &oints
.ELE-T () 3$O" :;E$E Any o# the abo%e o'tions9 you can list coluns where%er you want to in a .ELE-T stateent -orrect 22. The
E"&LOEE. E"&LOEE . table contains contains these coluns2 coluns2
.ALA$ /"BE$(,>) BO/. /"BE$(,>) -O""I..IO_&-T -O""I..IO_& -T /"BE$(>,>)
"ark #or $e%iew (1) &oints
All three coluns contain %alues +reater than Dero There is one row o# data in the table and the the %alues are as #ollows2 .alary = F??, Bonus = F?, -oission_'ct = F E%aluate these two .CL stateents2 1 .ELE-T salary G bonus G coission_'ct salary 5 bonus A. incoe 3$O" e'loyees9 > .ELE-T (salary G bonus ) G coission_'ct (salary 5 bonus) incoe 3$O" e'loyees9 :hat will be the result!
.tateent 1 will return a hi+her %alue than stateent > .tateent > will return a hi+her %alue than stateent 1 () .tateent 1 will dis'lay a diHerent colun headin+ One o# the stateents will OT e7ecute -orrect 23. In
which clause o# a .ELE-T stateent would you s'eci#y the nae o# the table or tables bein+ queried!
"ark #or $e%iew (1) &oints
The 3$O" clause clause () The .ELE-T clause
The :;E$E clause Any o# the abo%e o'tions9 you can list tables where%er you want in a .ELE-T stateent -orrect 24. ou ou
query the the database with this this .CL stateent2 stateent2
.ELE-T 3$O" transaction :;E$E 'roduct_id = FJK9
"ark #or $e%iew (1) &oints
:hich .CL .ELE-T stateent ca'abilities are achie%ed when this stateent is e7ecuted!
.election only &ro*ection only .election and 'ro*ection only () &ro*ection, &ro*ectio n, selection and *oinin+ Incorrect .ee .ection 1F Lesson 1
Section 16
(Answer all questions in this section) 25. E%aluate
this .ELE-T stateent2
.ELE-T 3$O" e'loyees :;E$E de'artent_id de'artent_id I(1?, >?, @?) A8 salary >????9
"ark #or $e%iew (1) &oints
:hich %alues would cause the lo+ical condition to return T$/E!
8E&A$T"ET_I8 = 1? and .ALA$ = >???? 8E&A$T"ET_I8 = >? and .ALA$ = >???? 8E&A$T"ET_I8 = null and .ALA$ = >???1 8E&A$T"ET_I8 = 1? and .ALA$ = >???1 () -orrect 26. :hich
o# the #ollowin+ coands will dis'lay the last nae concatenated with the *ob I8 #ro the e'loyees table, se'arated by a coa and s'ace, and label the resultin+ colun 6E'loyee and Title6!
"ark #or $e%iew (1) &oints
.ELE-T 6 last nae6 MMN, NMM 6*ob_id6 G 6E'loyee and Title6 3$O" e'loyees9 .ELE-T last_naeMMN, NMM *ob_id 6E'loyee and Title6 3$O" e'loyees9 () .ELE-T 6 last nae6 MMN, NMM 6*ob_id6 G 6E'loyee and Title6 3$O" e'9
.ELE-T last_naeMM6,6MM *ob_id 6E'loyee and Title6 3$O" e'loyees9 -orrect 27. ou ou
need to dis'lay dis'lay all the e'loyees e'loyees whose last last naes (o# any len+th) len+th) start with the letters N.N :hich :;E$E clause should you use!
"ark #or $e%iew (1) &oints
:;E$E last_nae LIE N.N () :;E$E last_nae LIE N.N :;E$E last_nae LIE N_.N :;E$E last_nae LIE N._N -orrect 28. ou ou
want to retrie%e retrie%e a list o# custoers custoers whose last last naes be+in with with the letters N3rN :hich sybol should you include in the :;E$E clause o# your .ELE-T stateent to achie%e the desired result!
"ark #or $e%iew (1) &oints
() P Q -orrect 29. The
E"&LOEE. E"&LOEE . table contains contains these coluns2 coluns2
LA.T_A"E RA$-;A$>(>F) 3I$.T_A"E RA$-;A$>(>F) E"AIL RA$-;A$>(F?) ou are writin+ ou writin+ a .ELE-T stateent stateent to retrie%e retrie%e the naes o# e'loyees e'loyees that ha%e an eail address .ELE-T last_naeMMN, NMM0rst_nae 6E'loyee ae6 3$O" e'loyees9 :hich :;E$E clause should you use to co'lete this stateent!
:;E$E eail = /LL9 :;E$E eail S= /LL9 :;E$E eail I. /LL9 :;E$E eail I. OT /LL9 () -orrect
"ark #or $e%iew (1) &oints
30. I#
you write queries usin+ the BET:EE o'erator, it does not atter in what order you enter the %alues, ie BET:EE low %alue A8 hi+h %alue will +i%e the sae result as BET:EE hi+h %alue and low %alue True or 3alse!
"ark #or $e%iew (1) &oints
True T rue 3alse () ( ) -orrect Section 16
(Answer all questions in this section) 31. :hich
co'arison o'erator searches #or a s'eci0ed character 'attern!
"ark #or $e%iew (1) &oints
I LIE () BET:EEA8 I. /LL -orrect 32. ou ou
need to dis'lay dis'lay e'loyees with salaries that are are at least @???? @???? or hi+her :hich co'arison o'erator should you use!
"ark #or $e%iew (1) &oints
6=6 = () S= -orrect 33. ou ou
need to dis'lay dis'lay only unique unique cobinations cobinations o# the LA.T_A"E LA.T_A"E and "AAE$_I8 coluns in the E"&LOEE. table :hich keyword should you include in the .ELE-T clause!
"ark #or $e%iew (1) &oints
OL /IC/EOE 8I.TI-T () 8I.TI-T$O: -orrect 34. :hen
usin+ the LIE condition to search #or _ sybols, which character can you use as the de#ault E.-A&E o'tion!
"ark #or
$e%iew (1) &oints U V () -orrect ou ou 35.
need to dis'lay dis'lay e'loyees whose salary is in the ran+e o# 1???? 1???? throu+h >F??? #or e'loyees in de'artent F? :hat does the :;E$E clause look like!
"ark #or $e%iew (1) &oints
:;E$E de'artent_id < F?
F??? :;E$E de'artent_id F? A8 salary BET:EE 1???? A8 >F??? :;E$E de'artent_id = F? A8 salary BET:EE >F??1 A8 1???1 :;E$E de'artent_id = F? A8 salary BET:EE 1???? A8 >F??? () -orrect 36. :hen
usin+ the LIE condition, which sybol re'resents any sequence o# characters o# any len+th55Dero, one, or ore characters!
"ark #or $e%iew (1) &oints
_ () Q U -orrect
Section 17
(Answer all questions in this section) 37. E%aluate
this .CL stateent2
.ELE-T ee'loyee_id, elast_nae, e0rst_nae, ana+er_id 3$O" e'loyees e, e'loyees O$8E$ B elast_nae, e0rst_nae :;E$E ee'loyee_id = ana+er_id9 This stateent #ails when e7ecuted e7ecuted :hich chan+e will correct correct the 'roble! 'roble!
$eorder the clauses in the query ()
"ark #or $e%iew (1) &oints
$eo%e the table aliases in the :;E$E clause $eo%e the table aliases in the O$8E$ B clause Include a ;ARI clause -orrect 38. The
E"&LOEE. E"&LOEE . table contains contains these coluns2 coluns2
E"&LOEE_I8 /"BE$(K) & LA.T_A"E RA$-;A$>(>F) 3I$.T_A"E RA$-;A$>(>F) 8E&A$T"ET_I8 /"BE$(K) -o'are these two .CL stateents2
"ark #or $e%iew (1) &oints
1 .ELE-T 8I.TI-T de'artent_id 8E&T, last_nae, 0rst_nae 3$O" e'loyees O$8E$ B de'artent_id9 > .ELE-T de'artent_id 8E&T, last_nae, 0rst_nae 3$O" e'loyees O$8E$ B 8E&T9 ;ow will the results diHer!
One o# the stateents will return a synta7 error One o# the stateents will eliinate all du'licate 8E&A$T"ET_I8 %alues There is no diHerence in the result between between the two stateents stateents The stateents will will sort on diHerent diHerent colun %alues () IncorrectS .ee .ection 1 Lesson @ 39. The
&LAE$. table contains &LAE$. contains these coluns2 coluns2
&LAE$. TABLE2 LA.T_A"E RA$-;A$> (>?) 3I$.T_A"E RA$-;A$> (>?) .ALA$ /"BE$(W,>) TEA"_I8 /"BE$() /"BE$() "AAE$_I8 /"BE$(K) &O.ITIO_I8 /"BE$() ou ust dis'lay ou dis'lay the 'layer nae, nae, tea id, and and salary #or 'layers 'layers whose salary is in the ran+e #ro >F??? throu+h 1????? and whose tea id is in the ran+e o# 1>?? throu+h 1F?? The results ust be sorted by tea id #ro lowest to hi+hest and then #urther sorted by salary #ro hi+hest to lowest :hich stateent should you use to dis'lay the desired result!
.ELE-T last_nae, 0rst_nae, tea_id, salary 3$O" 'layers :;E$E (salary >F??? O$ salary < 1?????) A8 tea_id BET:EE 1>?? A8 1F?? O$8E$ B tea_id, salary9 .ELE-T last_nae, 0rst_nae, tea_id, salary 3$O" 'layers :;E$E salary BET:EE >F??? A8 1?????
"ark #or $e%iew (1) &oints
A8 tea_id BET:EE 1>?? A8 1F?? O$8E$ B tea_id, salary 8E.-9 () .ELE-T last_nae, 0rst_nae, tea_id, salary 3$O" 'layers :;E$E salary >KKKKK A8 salary < 1????? A8 tea_id BET:EE 1>?? A8 1F?? O$8E$ B tea_id A.-, salary 8E.-9 .ELE-T last_nae, 0rst_nae, tea_id, salary 3$O" 'layers :;E$E salary BET:EE >KKKKK A8 1??????1 A8 tea_id BET:EE 1>?? A8 1F?? O$8E$ B tea_id 8E.-, salary 8E.-9 -orrect 40. :hich
stateent about the lo+ical o'erators is true!
"ark #or $e%iew (1) &oints
The order o# o'erator o'erator 'recedence 'recedence is A8, O$, and OT OT The order o# o'erator o'erator 'recedence 'recedence is A8, OT, OT, and O$ O$ The order o# o'erator o'erator 'recedence 'recedence is OT, O$, and A8 The order o# o'erator o'erator 'recedence 'recedence is OT, A8, A8, and O$ O$ () -orrect Section 17
(Answer all questions in this section) 41. 3ro
le#t to ri+ht, what is the correct order o# &recedence!
"ark #or $e%iew (1) &oints
Arithetic, -oncatenation, -o'arison, O$ () OT, A8, O$, Arithetic Arithetic, OT, Lo+ical, -o'arison Arithetic, OT, -oncatenation, Lo+ical -orrect 42. :hich
o# the #ollowin+ best describes the eanin+ o# the LIE o'erator!
"ark #or $e%iew (1) &oints
8is'lay rows based on a ran+e o# %alues To T o test #or %alues in a list "atch a character 'attern () To T o 0nd ull %alues %alues
-orrect 43. :hich
lo+ical o'erator returns T$/E i# either condition is true!
"ark #or $e%iew (1) &oints
O$ () A8 OT BOT; -orrect 44. :hich
o# the #ollowin+ are T$/E re+ardin+ the lo+ical A8 o'erator!
"ark #or $e%iew (1) &oints
T$/E A8 T$/E T$/E return 3AL.E T$/E A8 3AL.E 3AL.E return return T$/E 3AL.E A8 T$/E return /LL T$/E A8 3AL.E 3AL.E return return 3AL.E 3AL.E () -orrect 45. :hich
clause would you include in a .ELE-T stateent to sort the rows returned by the LA.T_A"E colun!
"ark #or $e%iew (1) &oints
O$8E$ B () :;E$E 3$O" ;ARI -orrect 46. E%aluate
this .ELE-T stateent2
.ELE-T last_nae, 0rst_nae, eail 3$O" e'loyees O$8E$ B eail9 I# the E"AIL colun contains null %alues, which stateent is true!
ull eail %alues will be dis'layed 0rst in the result ull eail %alues will be dis'layed last in the result () ull eail %alues will not be dis'layed in the result
"ark #or $e%iew (1) &oints
The result will not be sorted sorted -orrect 47. E%aluate
this .ELE-T stateent2
.ELE-T last_nae, 0rst_nae, de'artent_id, ana+er_id 3$O" e'loyees9
"ark #or $e%iew (1) &oints
ou need to sort ou sort data by ana+er ana+er id %alues and and then al'habetically al'habetically by e'loyee last nae and 0rst nae %alues :hich O$8E$ B clause could you use!
O$8E$ B de'artent_id, last_nae O$8E$ B ana+er_id, last_nae, 0rst_nae () O$8E$ B last_nae, 0rst_nae, ana+er_id O$8E$ B ana+er_id, 0rst_nae, last_nae -orrect 48. E%aluate
this .ELE-T stateent2
.ELE-T 0rst_nae, last_nae, eail 3$O" e'loyees O$8E$ B last_nae9
"ark #or $e%iew (1) &oints
:hich stateent is true!
The rows will not be sorted The rows will be sorted al'habetically al'habetically by the LA.T_A"E LA.T_A"E %alues %alues () The rows will be sorted in re%erse re%erse al'habetical al'habetical order by the LA.T_A"E %alues The rows will be sorted al'habetically al'habetically by the 3I$.T_A"E 3I$.T_A"E and and then the LA.T_A"E %alues -orrect 49. E%aluate
this .ELE-T stateent2
.ELE-T 3$O" e'loyees :;E$E salary @???? A8 de'artent_id = 1? O$ eail I. OT /LL9 :hich stateent is true!
The O$ condition condition will be e%aluated e%aluated be#ore the A8 A8 condition condition The A8 condition condition will be e%aluated e%aluated be#ore the the O$ condition condition () The O$ and A8 A8 conditions conditions ha%e the sae 'recedence 'recedence an and d will be e%aluated #ro le#t to ri+ht The O$ and A8 A8 conditions conditions ha%e the sae ' 'recedence recedence and and will be e%aluated #ro ri+ht to le#t
"ark #or $e%iew (1) &oints
-orrect 50. ou ou
need to create create a re'ort to dis'lay all e'loyees e'loyees that were were hired on or or be#ore Xanuary 1, 1KKJ The data should dis'lay in this # orat2 'mployee Start Date and Salary 1&83( ) Smit* 1!)MA+)1""2 , -!!! :hich .ELE-T stateent could you use!
.ELE-T e'loyee_id MM 5 MM last_nae 6E'loyee6, hire_date MM 4 MM salary 6.tart 8ate and .alary 3$O" e'loyees :;E$E hire_date <= N?15XA51KKJN9 .ELE-T e'loyee_id MMN NMM last_nae 6E'loyee6, hire_date MMN NMM salary 6.tart 8ate and .alary6 3$O" e'loyees :;E$E hire_date <= ?15XA51KK ?15 XA51KKJN9 JN9 .ELE-T e'loyee_id MMN65 6MM last_nae 6E'loyee6, hire_date MM6 4 6MM salary .tart 8ate and .alary6 3$O" e'loyees :;E$E hire_date <= N?15XA51KKJN9 .ELE-T e'loyee_id MMN 5 NMM last_nae NE'loyeeN, hire_date MMN 4 NMM salary N.tart 8ate and .alary6 3$O" e'loyees :;E$E hire_date <= N?15XA51KKJN9 .ELE-T e'loyee_id MMN 5 NMM last_nae 6E'loyee6, hire_date MMN 4 NMM salary 6.tart 8ate and .alary6 3$O" e'loyees :;E$E hire_date <= N?15XA51KKJN9 ()
-orrect
"ark #or $e%iew (1) &oints