final exam sem 1 oracle
Post on 01-Jun-2018
226 Views
Preview:
TRANSCRIPT
-
8/9/2019 Final Exam Sem 1 Oracle
1/78
Semester 1 Final Term Exam covers Sections 11-18 of Database Design.
Section 12
1. One-to-One relationships are transformed into hec! onstraints in the tables created at either end of
that relationship. Tr"e or False# $ar! for %evie&
'1( )oints
Tr"e
False '*(
orrect
2. The Oracle Database can implement a man+ to man+ relationship. ,o" simpl+ create t&o foreign !e+s
bet&een the t&o tables. Tr"e or False# $ar! for %evie&
'1( )oints
Tr"e
False '*(
ncorrect. %efer to Section 12
. /h+ &o"ld this table name 0OT &or! in an Oracle database# this+earendnext+ear $ar! for %evie&
'1( )oints
Table names m"st begin &ith an alphabetic character
Too long
The )l"s sign is not allo&ed in ob3ect names '*(
0one of the above
ncorrect. %efer to Section 12
4. n a ph+sical data model5 an attrib"te becomes a . $ar! for %evie&
'1( )oints
Table
Foreign 6e+
onstraint
ol"mn '*(
-
8/9/2019 Final Exam Sem 1 Oracle
2/78
orrect
7. n a ph+sical data model5 a relationship is represented as a combination of 'hoose T&o( $ar! for
%evie&
'1( )oints
'hoose all correct ans&ers(
ol"mn
)rimar+ 6e+ or 9ni:"e 6e+ '*(
hec! onstraint or 9ni:"e 6e+
Foreign 6e+ '*(
ncorrect. %efer to Section 12
;. dentif+ all of the incorrect statements that complete this sentence < primar+ !e+ is 'hoose three(
$ar! for %evie&
'1( )oints
'hoose all correct ans&ers(
< single col"mn that "ni:"el+ identifies each col"mn in a table '*(
One or more col"mns in a table that "ni:"el+ identifies each ro& in that table
< set of col"mns in one table that "ni:"el+ identifies each ro& in another table '*(
Onl+ one col"mn that m"st be n"ll '*(
ncorrect. %efer to Section 12
=. The explanation belo& is a col"mn integrit+ constraint
< col"mn m"st contain onl+ val"es consistent &ith the defined data format of the col"mn. Tr"e or False#
$ar! for %evie&
'1( )oints
Tr"e '*(
False
orrect
8. Foreign !e+s m"st be n"ll. Tr"e or False# $ar! for %evie&
'1( )oints
-
8/9/2019 Final Exam Sem 1 Oracle
3/78
Tr"e
False '*(
orrect
>. The explanation belo& is a 9ser Defined integrit+ r"le and m"st therefore be man"all+ coded5 the
Database cannot enforce this r"le a"tomaticall+
< primar+ !e+ m"st be "ni:"e5 and no part of the primar+ !e+ can be n"ll. Tr"e or False#
$ar! for %evie&
'1( )oints
Tr"e
False '*(
ncorrect. %efer to Section 12
1?. /hen translating an arc relationship to a ph+sical design5 +o" m"st t"rn the arc relationships into
foreign !e+s.
-
8/9/2019 Final Exam Sem 1 Oracle
4/78
@"siness f"nctionalit+ and b"siness r"les5 access paths and fre:"enc+ of access are all ver+ different
bet&een s"bt+pes. '*(
$ost of the relationships are at the s"pert+pe level
ncorrect. %efer to Section 12
Section 1
12. The cla"se can be added to a SEAET statement to ret"rn a s"bset of the data. $ar! for
%evie&
'1( )oints
-
8/9/2019 Final Exam Sem 1 Oracle
5/78
'1( )oints
SEAET *
F%O$ alb"ms
'*(
SEAET albtitle5 albartist5 albdates
F%O$ alb"m
SEAET albtitle5 albartist5 albdates
F%O$ alb"ms
SEAET albtitle albartist albdate
F%O$ alb"ms
ncorrect. See Section 1;
17. n a SEAET cla"se5 &hat is the res"lt of 2 * 2# $ar! for %evie&'1( )oints
;
8 '*(
1?
1
orrect.
1;. /hich SA !e+&ord specifies that an alias &ill be s"bstit"ted for a col"mn name in the o"tp"t of a SA
:"er+# $ar! for %evie&
'1( )oints
-
8/9/2019 Final Exam Sem 1 Oracle
6/78
Goining onl+
Selection onl+
)ro3ection onl+ '*(
)ro3ection and Selection
ncorrect. See Section 1;
18. /hen listing col"mns in the SEAET list5 &hat sho"ld +o" "se to separate the col"mns# $ar! for %evie&
'1( )oints
ommas '*(
Semicolons
Dashes
9nderscores
orrect.
1>. n &hich cla"se of a SEAET statement &o"ld +o" specif+ the name of the table or tables being :"eried#
$ar! for %evie&
'1( )oints
The F%O$ cla"se '*(
The SEAET cla"se
The /BE%E cla"se
-
8/9/2019 Final Exam Sem 1 Oracle
7/78
ncorrect. See Section 1;
)age 2 of 7
Test Final Exam Semester 1
%evie& +o"r ans&ers5 feedbac!5 and :"estion scores belo&.
-
8/9/2019 Final Exam Sem 1 Oracle
8/78
Each
-
8/9/2019 Final Exam Sem 1 Oracle
9/78
ncorrect
27. The E$)AO,EES table incl"des these col"mns
E$)AO,EED 09$@E%'4( 0OT 09AA
A
-
8/9/2019 Final Exam Sem 1 Oracle
10/78
2=. Eval"ate this SEAET statement
SEAET *
F%O$ emplo+ees
/BE%E departmentid 0'1?5 2?5 ?(
-
8/9/2019 Final Exam Sem 1 Oracle
11/78
/BE%E emplo+eeid L 1=;
SEAET lastname5 emplo+eeid
F%O$ emplo+ees
/BE%E emplo+eeid e:"als 1=;
orrect.
2>. Eval"ate this SEAET statement
SEAET lastname5 firstname5 salar+
F%O$ emplo+ees
Bo& &ill the heading for the S
-
8/9/2019 Final Exam Sem 1 Oracle
12/78
Section 1=
1. /hich comparison operator searches for a specified character pattern# $ar! for %evie&
'1( )oints
0
A6E '*(
@ET/EE0R
-
8/9/2019 Final Exam Sem 1 Oracle
13/78
< comparison condition
< constant
orrect.
7. /here in a SA statement can +o" not "se arithmetic operators# $ar! for %evie&
'1( )oints
SEAET
F%O$ '*(
/BE%E
0O0E
ncorrect. See Section 1=.
;. /hich cla"se &o"ld +o" incl"de in a SEAET statement to restrict the data ret"rned to onl+ the
emplo+ees in department 1?# $ar! for %evie&
'1( )oints
/BE%E '*(
F%O$
SEAET
S
orrect.
Section 18
=. /hich of the follo&ing best describes the meaning of the A6E operator# $ar! for %evie&
'1( )oints
Displa+ ro&s based on a range of val"es.
To test for val"es in a list.
$atch a character pattern. '*(
To find 0"ll val"es.
ncorrect. See Section 18
-
8/9/2019 Final Exam Sem 1 Oracle
14/78
8. The O%DE% @, cla"se al&a+s comes last. Tr"e or False# $ar! for %evie&
'1( )oints
Tr"e '*(
False
orrect.
>. /hich of the follo&ing is T%9E regarding the logical
-
8/9/2019 Final Exam Sem 1 Oracle
15/78
'1( )oints
VL(W
VJW
VKLW
VJLW '*(
orrect.
42. ,o" need to change the defa"lt sort order of the O%DE% @, cla"se so that the data is displa+ed in
reverse alphabetical order. /hich !e+&ord sho"ld +o" incl"de in the O%DE% @, cla"se# $ar! for %evie&
'1( )oints
DES '*(
-
8/9/2019 Final Exam Sem 1 Oracle
16/78
'1( )oints
SEAET prod"ctid5 prod"ctname
F%O$ prod"cts
/BE%E price JK
'*(
SEAET prod"ctid5 prod"ctname
F%O$ prod"cts
B
-
8/9/2019 Final Exam Sem 1 Oracle
17/78
/BE%E salar+ K ????
-
8/9/2019 Final Exam Sem 1 Oracle
18/78
-
8/9/2019 Final Exam Sem 1 Oracle
19/78
orrect.
7?. Eval"ate this SA statement
SEAET e.emplo+eeid5 e.lastname5 e.firstname5 m.managerid
F%O$ emplo+ees e5 emplo+ees m
O%DE% @, e.lastname5 e.firstname
/BE%E e.emplo+eeid L m.managerid
This statement fails &hen exec"ted. /hich change &ill correct the problem#
$ar! for %evie&
'1( )oints
%eorder the cla"ses in the :"er+. '*(
%emove the table aliases in the /BE%E cla"se.
%emove the table aliases in the O%DE% @, cla"se.
ncl"de a B
-
8/9/2019 Final Exam Sem 1 Oracle
20/78
2. n a ph+sical data model5 an attrib"te becomes a . $ar! for %evie&
'1( )oints
Table
Foreign 6e+
onstraint
ol"mn '*(
orrect
. /h+ &o"ld this table name 0OT &or! in an Oracle database# this+earendnext+ear $ar! for %evie&
'1( )oints
Table names m"st begin &ith an alphabetic character
Too long
The )l"s sign is not allo&ed in ob3ect names '*(
0one of the above
orrect
4. /hen mapping s"pert+pes5 relationships at the s"pert+pe level transform as "s"al. %elationships at
s"bt+pe level are implemented as foreign !e+s5 b"t the foreign !e+ col"mns all become mandator+. Tr"e or
False# $ar! for %evie&
'1( )oints
Tr"e
False '*(
orrect
7. /hich of the follo&ing are reasons &h+ +o" sho"ld consider "sing a S"bt+pe mplementation# $ar! for
%evie&
'1( )oints
The res"lting table &ill reside in a single database and be "sed b+ 3"st O0E "ser.
/hen the common access paths for the s"pert+pes are different.
@"siness f"nctionalit+ and b"siness r"les5 access paths and fre:"enc+ of access are all ver+ different
bet&een s"bt+pes. '*(
-
8/9/2019 Final Exam Sem 1 Oracle
21/78
$ost of the relationships are at the s"pert+pe level
orrect
;. The Oracle Database can implement a man+ to man+ relationship. ,o" simpl+ create t&o foreign !e+s
bet&een the t&o tables. Tr"e or False# $ar! for %evie&
'1( )oints
Tr"e
False '*(
orrect
=. t is possible to implement non-transferabilit+ via a simple Foreign 6e+ %elationship. Tr"e or False# $ar!
for %evie&
'1( )oints
Tr"e
False '*(
ncorrect. %efer to Section 12
8. The text belo& is an example of &hat constraint t+pe
The val"e in the managerid col"mn of the E$)AO,EES table m"st match a val"e in the emplo+eeid
col"mn in the E$)AO,EES table.
$ar! for %evie&
'1( )oints
Entit+ integrit+
9ser-defined integrit+
ol"mn integrit+
%eferential integrit+ '*(
orrect
>. Entit+ integrit+ refers to $ar! for %evie&
'1( )oints
Tables al&a+s containing text data
Tables al&a+s containing n"meric data
-
8/9/2019 Final Exam Sem 1 Oracle
22/78
ol"mns having )rimar+ 6e+s5 Foreign 6e+s5 9ni:"e 6e+s and hec! constraints defined in the database.
Tables having )rimar+ 6e+s5 Foreign 6e+s5 9ni:"e 6e+s and hec! constraints defined in the database. '*(
ncorrect. %efer to Section 12
1?. dentif+ all of the incorrect statements that complete this sentence < primar+ !e+ is 'hoose three(
$ar! for %evie&
'1( )oints
'hoose all correct ans&ers(
< single col"mn that "ni:"el+ identifies each col"mn in a table '*(
One or more col"mns in a table that "ni:"el+ identifies each ro& in that table
< set of col"mns in one table that "ni:"el+ identifies each ro& in another table '*(
Onl+ one col"mn that m"st be n"ll '*(
ncorrect. %efer to Section 12
)age 1 of 7
Test Final Exam Semester 1
%evie& +o"r ans&ers5 feedbac!5 and :"estion scores belo&.
-
8/9/2019 Final Exam Sem 1 Oracle
23/78
Tr"e
False '*(
orrect.
1. /hat command can be "sed to create a ne& ro& in a table in the database# $ar! for %evie&
'1( )oints
%E
-
8/9/2019 Final Exam Sem 1 Oracle
24/78
1;. The SEAET statement retrieves information from the database. n a SEAET statement5 +o" can do all
of the follo&ing EHE)T $ar! for %evie&
'1( )oints
)ro3ection
$anip"lation '*(
Goining
Selection
orrect.
1=. /hen listing col"mns in the SEAET list5 &hat sho"ld +o" "se to separate the col"mns# $ar! for %evie&
'1( )oints
ommas '*(
Semicolons
Dashes
9nderscores
orrect.
18. n the defa"lt order of precedence5 &hich operator &o"ld be eval"ated first# $ar! for %evie&
'1( )oints
S"btractions
$"ltiplications '*(
. /hen +o" "se the SEAET cla"se to list one or t&o col"mns onl+ from a table and no /BE%E cla"se5
&hich SA capabilit+ is "sed# $ar! for %evie&
'1( )oints
Goining onl+
Selection onl+
-
8/9/2019 Final Exam Sem 1 Oracle
25/78
)ro3ection onl+ '*(
)ro3ection and Selection
ncorrect. See Section 1;
2?. n &hich cla"se of a SEAET statement &o"ld +o" specif+ the name of the table or tables being :"eried#
$ar! for %evie&
'1( )oints
The F%O$ cla"se '*(
The SEAET cla"se
The /BE%E cla"se
-
8/9/2019 Final Exam Sem 1 Oracle
26/78
Section 1=
2. f the E$)AO,EES table has the follo&ing col"mns5 and +o" &ant to &rite a SEAET statement to ret"rn
the emplo+ee last name and department n"mber for emplo+ee n"mber 1=;5 &hich of the follo&ing SA
statements sho"ld +o" "se#
0ame T+pe Aength
E$)AO,EED 09$@E% 22
F%ST0
-
8/9/2019 Final Exam Sem 1 Oracle
27/78
*
orrect. See Section 1=
27. Eval"ate this SEAET statement
SEAET lastname5 firstname5 salar+
F%O$ emplo+ees
Bo& &ill the heading for the S
-
8/9/2019 Final Exam Sem 1 Oracle
28/78
/BE%E lastname A6E Sm
orrect. See Section 1=
28. The ST9DE0T table contains these col"mns
ST9DE0TD 09$@E%'1?( )rimar+ 6e+
A
-
8/9/2019 Final Exam Sem 1 Oracle
29/78
The first statement &ill 0OT displa+ val"es from all of the ro&s in the E$)AO,EES table
The second statement co"ld displa+ a "ni:"e combination of the E$)AO,EED5 $
-
8/9/2019 Final Exam Sem 1 Oracle
30/78
A6E
@ET/EE0R
-
8/9/2019 Final Exam Sem 1 Oracle
31/78
'1( )oints
QL '*(
U
orrect.
Section 18
=. Eval"ate this SA statement
SEAET e.emplo+eeid5 e.lastname5 e.firstname5 m.managerid
F%O$ emplo+ees e5 emplo+ees m
O%DE% @, e.lastname5 e.firstname/BE%E e.emplo+eeid L m.managerid
This statement fails &hen exec"ted. /hich change &ill correct the problem#
$ar! for %evie&
'1( )oints
%eorder the cla"ses in the :"er+. '*(
%emove the table aliases in the /BE%E cla"se.
%emove the table aliases in the O%DE% @, cla"se.
ncl"de a B
-
8/9/2019 Final Exam Sem 1 Oracle
32/78
SEAET lastname5 firstname5 teamid5 salar+
F%O$ pla+ers
/BE%E 'salar+ K 27??? O% salar+ JK
-
8/9/2019 Final Exam Sem 1 Oracle
33/78
orrect.
)age 4 of 7
Test Final Exam Semester 1
%evie& +o"r ans&ers5 feedbac!5 and :"estion scores belo&.
-
8/9/2019 Final Exam Sem 1 Oracle
34/78
orrect.
44. /hich statement abo"t the O%DE% @, cla"se is tr"e# $ar! for %evie&
'1( )oints
,o" can "se a col"mn alias in the O%DE% @, cla"se. '*(
The defa"lt sort order of the O%DE% @, cla"se is descending.
The O%DE% @, cla"se can onl+ contain col"mns that are incl"ded in the SEAET list.
The O%DE% @, cla"se sho"ld immediatel+ precede the F%O$ cla"se in a SEAET statement
orrect.
47. ,o" :"er+ the database &ith this SA statement
SEAET priceF%O$ prod"cts
/BE%E price 0'15 275 7?5 27?(
-
8/9/2019 Final Exam Sem 1 Oracle
35/78
$ar! for %evie&
'1( )oints
The res"lts are sorted n"mericall+ onl+.
The res"lts are sorted alphabeticall+ onl+.
The res"lts are sorted n"mericall+ and then alphabeticall+.
The res"lts are sorted alphabeticall+ and then n"mericall+. '*(
orrect.
4=. Eval"ate this SEAET statement
SEAET lastname5 firstname5 email
F%O$ emplo+ees
O%DE% @, email
f the E$
-
8/9/2019 Final Exam Sem 1 Oracle
36/78
2??5 2?15 2?25 2?5 2?45 2?75 2?;
orrect.
4>. /hich SEAET statement sho"ld +o" "se to limit the displa+ of prod"ct information to those prod"cts
&ith a price of less than 7?# $ar! for %evie&
'1( )oints
SEAET prod"ctid5 prod"ctname
F%O$ prod"cts
/BE%E price JK
'*(
SEAET prod"ctid5 prod"ctname
F%O$ prod"cts
B
-
8/9/2019 Final Exam Sem 1 Oracle
37/78
@ET/EE0 R . t &as filed "nder Final Exam and &as tagged &ith %esponses
1.
hoi
Section 12
1. n a ph+sical data model5 a relationship is represented as a combination of 'hoose T&o( $ar!eren voor
na!i3!en
'1( )"nten
'6ies alle goede ant&oorden.(
ol"mn
)rimar+ 6e+ or 9ni:"e 6e+ '*(
hec! onstraint or 9ni:"e 6e+
Foreign 6e+ '*(
orrect
2. n an Oracle database5 &h+ &o"ld 1T
-
8/9/2019 Final Exam Sem 1 Oracle
38/78
. The transformation from an E% diagram to a ph+sical design involves changing terminolog+. )rimar+
9ni:"e dentifiers in the E% diagram become and relationships become .
$ar!eren voor na!i3!en
'1( )"nten
Foreign !e+s5 )rimar+ !e+s
)rimar+ !e+s5 Foreign !e+s '*(
Foreign !e+s5 mandator+ b"siness r"les
9ni:"e 6e+s5 )rimar+ !e+s
ncorrect. %efer to Section 12
4. The text belo& is an example of &hat constraint t+pe
The val"e in the managerid col"mn of the E$)AO,EES table m"st match a val"e in the emplo+eeid
col"mn in the E$)AO,EES table. $ar!eren voor na!i3!en'1( )"nten
Entit+ integrit+
9ser-defined integrit+
ol"mn integrit+
%eferential integrit+ '*(
ncorrect. %efer to Section 12
7. < table m"st have at least one candidate !e+5 as &ell as its primar+ !e+. Tr"e or False# $ar!eren voor
na!i3!en
'1( )"nten
/aar
0iet &aar '*(
ncorrect. %efer to Section 12
;. The explanation belo& is a 9ser Defined integrit+ r"le and m"st therefore be man"all+ coded5 theDatabase cannot enforce this r"le a"tomaticall+
< primar+ !e+ m"st be "ni:"e5 and no part of the primar+ !e+ can be n"ll. Tr"e or False# $ar!eren voor
na!i3!en
'1( )"nten
/aar
-
8/9/2019 Final Exam Sem 1 Oracle
39/78
0iet &aar '*(
ncorrect. %efer to Section 12
=. The explanation belo& is a col"mn integrit+ constraint
< col"mn m"st contain onl+ val"es consistent &ith the defined data format of the col"mn. Tr"e or False#
$ar!eren voor na!i3!en
'1( )"nten
/aar '*(
0iet &aar
orrect
8. /hat do +o" create &hen +o" transform a man+ to man+ relationship from +o"r E% diagram into a
ph+sical design# $ar!eren voor na!i3!en
'1( )"nten
9ni:"e !e+ constraints
ntersection entit+
ntersection table '*(
T&o tables &ith Foreign !e+ constraints bet&een them
ncorrect. %efer to Section 12
>. The Oracle Database can implement a man+ to man+ relationship. ,o" simpl+ create t&o foreign !e+s
bet&een the t&o tables. Tr"e or False# $ar!eren voor na!i3!en
'1( )"nten
/aar
0iet &aar '*(
ncorrect. %efer to Section 12
1?. /hen mapping s"pert+pes5 relationships at the s"pert+pe level transform as "s"al. %elationships at
s"bt+pe level are implemented as foreign !e+s5 b"t the foreign !e+ col"mns all become mandator+. Tr"e orFalse# $ar!eren voor na!i3!en
'1( )"nten
/aar
0iet &aar '*(
-
8/9/2019 Final Exam Sem 1 Oracle
40/78
orrect
Section 12
11. /hen translating an arc relationship to a ph+sical design5 +o" m"st t"rn the arc relationships into
foreign !e+s.
-
8/9/2019 Final Exam Sem 1 Oracle
41/78
'1( )"nten
/aar
0iet &aar '*(
ncorrect. See Section 1;
17. ,o" cannot "se comp"ters "nless +o" completel+ "nderstand exactl+ ho& the+ &or!. Tr"e or False#
$ar!eren voor na!i3!en
'1( )"nten
/aar
0iet &aar '*(
orrect.
1;. /hen listing col"mns in the SEAET list5 &hat sho"ld +o" "se to separate the col"mns# $ar!eren voor
na!i3!en
'1( )"nten
ommas '*(
Semicolons
Dashes
9nderscores
orrect.
1=. ,o" :"er+ the database &ith this SA statement
SEAET * F%O$ st"dents
/h+ &o"ld +o" "se this statement# $ar!eren voor na!i3!en
'1( )"nten
To insert data
To vie& data '*(
To displa+ the table str"ct"re
To delete data
ncorrect. See Section 1;
-
8/9/2019 Final Exam Sem 1 Oracle
42/78
18. n &hich cla"se of a SEAET statement &o"ld +o" specif+ the name of the table or tables being :"eried#
$ar!eren voor na!i3!en
'1( )"nten
The F%O$ cla"se '*(
The SEAET cla"se
The /BE%E cla"se
. /hich statement best describes ho& arithmetic expressions are handled# $ar!eren voor na!i3!en
'1( )"nten
-
8/9/2019 Final Exam Sem 1 Oracle
43/78
/hich SA SEAET statement capabilities are achieved &hen this statement is exec"ted# $ar!eren voor
na!i3!en
'1( )"nten
Selection onl+ '*(
)ro3ection onl+
Selection and pro3ection onl+
)ro3ection5 selection and 3oining
orrect.
22. f a SA statement ret"rns data from t&o or more tables5 &hich SA capabilit+ is being "sed# $ar!eren
voor na!i3!en
'1( )"nten
Selection
)ro3ection
Goining '*(
nsertion
ncorrect. See Section 1;
Section 1=
2. ,o" need to displa+ emplo+ees &hose salar+ is in the range of ???? and 7????. /hich comparison
operator sho"ld +o" "se# $ar!eren voor na!i3!en
'1( )"nten
0
A6E
@ET/EE0R
-
8/9/2019 Final Exam Sem 1 Oracle
44/78
'*(
Y
ncorrect. See Section 1=.
27. ,o" need to displa+ all the ro&s in the E$)AO,EES table that contain a n"ll val"e in the
DE)
-
8/9/2019 Final Exam Sem 1 Oracle
45/78
ncorrect. See Section 1=
28. /hich cla"se &o"ld +o" incl"de in a SEAET statement to restrict the data ret"rned to onl+ the
emplo+ees in department 1?# $ar!eren voor na!i3!en
'1( )"nten
/BE%E '*(
F%O$
SEAET
S
orrect.
2>. The E$)AO,EES table incl"des these col"mns
E$)AO,EED 09$@E%'4( 0OT 09AAA
-
8/9/2019 Final Exam Sem 1 Oracle
46/78
orrect. See Section 1=
4. ,o" need &rite a SEAET statement that sho"ld onl+ ret"rn ro&s that contain 45 4;5 or 48 for the
DE)
-
8/9/2019 Final Exam Sem 1 Oracle
47/78
ncorrect. See Section 1=
Section 18
=. The )A>>.>> ??
O%DE% @, lastname5 firstname
'*(
SEAET lastname5 firstname
F%O$ pla+ers
/BE%E positionid K ;>??
O%DE% @, lastname5 firstname
SEAET lastname5 firstname
F%O$ pla+ers
/BE%E positionid L ;>??
O%DE% @, lastname DES5 firstname
orrect.
>. /hich statement abo"t the logical operators is tr"e# $ar!eren voor na!i3!en
'1( )"nten
The order of operator precedence is
-
8/9/2019 Final Exam Sem 1 Oracle
48/78
4?. /hich of the follo&ing is T%9E regarding the logical
-
8/9/2019 Final Exam Sem 1 Oracle
49/78
1?
27? '*(
1??
ncorrectQ See Section 18.
48. Eval"ate this SA statement
SEAET prod"ctid5 prod"ctname5 price
F%O$ prod"cts
O%DE% @, prod"ctname5 price
/hat occ"rs &hen the statement is exec"ted# $ar!eren voor na!i3!en
'1( )"nten
The res"lts are sorted n"mericall+ onl+.
The res"lts are sorted alphabeticall+ onl+.
The res"lts are sorted n"mericall+ and then alphabeticall+.
The res"lts are sorted alphabeticall+ and then n"mericall+. '*(
orrect.
4>. /hat val"e &ill the follo&ing SA statement ret"rn#
SEAET emplo+eeid
F%O$ emplo+ees
/BE%E emplo+eeid @ET/EE0 1??
-
8/9/2019 Final Exam Sem 1 Oracle
50/78
O% email S 0OT 09AA
/hich statement is tr"e# $ar!eren voor na!i3!en
'1( )"nten
The O% condition &ill be eval"ated before the
-
8/9/2019 Final Exam Sem 1 Oracle
51/78
orrect
4. The Oracle Database can implement a man+ to man+ relationship. ,o" simpl+ create t&o foreign !e+s
bet&een the t&o tables. Tr"e or False# $ar!eren voor na!i3!en
'1( )"nten
/aar
0iet &aar '*(
orrect
7. The explanation belo& is a col"mn integrit+ constraint
< col"mn m"st contain onl+ val"es consistent &ith the defined data format of the col"mn. Tr"e or False#
$ar!eren voor na!i3!en
'1( )"nten
/aar '*(
0iet &aar
orrect
;. < foreign !e+ cannot refer to a primar+ !e+ in the same table. Tr"e or False# $ar!eren voor na!i3!en
'1( )"nten
/aar
0iet &aar '*(
ncorrect. %efer to Section 12
=. The text belo& is an example of &hat constraint t+pe
f the n"mber of @OO6S lent to a @O%%O/E% in the A@%
-
8/9/2019 Final Exam Sem 1 Oracle
52/78
8. < table m"st have a primar+ !e+. Tr"e or False# $ar!eren voor na!i3!en
'1( )"nten
/aar
0iet &aar '*(
ncorrect. %efer to Section 12
>. /h+ &o"ld this table name 0OT &or! in an Oracle database# this+earendnext+ear $ar!eren voor
na!i3!en
'1( )"nten
Table names m"st begin &ith an alphabetic character
Too long
The )l"s sign is not allo&ed in ob3ect names '*(
0one of the above
orrect
1?. n a ph+sical data model5 an attrib"te becomes a . $ar!eren voor na!i3!en
'1( )"nten
Table
Foreign 6e+
onstraint
ol"mn '*(
ncorrect. %efer to Section 12
Section 12
11. n an Oracle database5 &h+ &o"ld 1T
-
8/9/2019 Final Exam Sem 1 Oracle
53/78
T
-
8/9/2019 Final Exam Sem 1 Oracle
54/78
/aar
0iet &aar '*(
orrect.
1;. ,o" :"er+ the database &ith this SA statement
SEAET *
F%O$ transaction
/BE%E prod"ctid L 47;>
/hich SA SEAET statement capabilities are achieved &hen this statement is exec"ted# $ar!eren voor
na!i3!en
'1( )"nten
Selection onl+ '*(
)ro3ection onl+
Selection and pro3ection onl+
)ro3ection5 selection and 3oining
ncorrect. See Section 1;
1=. ,o" :"er+ the database &ith this SA statement
SEAET * F%O$ st"dents
/h+ &o"ld +o" "se this statement# $ar!eren voor na!i3!en
'1( )"nten
To insert data
To vie& data '*(
To displa+ the table str"ct"re
To delete data
orrect.
18. n a SA statement5 &hich cla"se specifies one or more col"mns to be ret"rned b+ the :"er+# $ar!eren
voor na!i3!en'1( )"nten
SEAET '*(
F%O$
/BE%E
-
8/9/2019 Final Exam Sem 1 Oracle
55/78
-
8/9/2019 Final Exam Sem 1 Oracle
56/78
22. n the defa"lt order of precedence5 &hich operator &o"ld be eval"ated first# $ar!eren voor na!i3!en
'1( )"nten
S"btractions
$"ltiplications '*(
-
8/9/2019 Final Exam Sem 1 Oracle
57/78
F%O$ '*(
/BE%E
0O0E
ncorrect. See Section 1=.
2;. /hich cla"se &o"ld +o" incl"de in a SEAET statement to restrict the data ret"rned to onl+ the
emplo+ees in department 1?# $ar!eren voor na!i3!en
'1( )"nten
/BE%E '*(
F%O$
SEAET
S
orrect.
2=. ,o" need to displa+ emplo+ees &hose salar+ is in the range of ???? and 7????. /hich comparison
operator sho"ld +o" "se# $ar!eren voor na!i3!en
'1( )"nten
0
A6E
@ET/EE0R
-
8/9/2019 Final Exam Sem 1 Oracle
58/78
2>. The E$)AO,EES table incl"des these col"mns
E$)AO,EED 09$@E%'4( 0OT 09AA
A
-
8/9/2019 Final Exam Sem 1 Oracle
59/78
/BE%E price JK
'*(
SEAET prod"ctid5 prod"ctname
F%O$ prod"cts
B
-
8/9/2019 Final Exam Sem 1 Oracle
60/78
One of the statements &ill eliminate all d"plicate DE)
-
8/9/2019 Final Exam Sem 1 Oracle
61/78
4. < foreign !e+ cannot refer to a primar+ !e+ in the same table. Tr"e or False# $ar!eren voor na!i3!en
'1( )"nten
/aar
0iet &aar '*(
ncorrect. %efer to Section 12
7. n an Oracle database5 &h+ &o"ld 1T
-
8/9/2019 Final Exam Sem 1 Oracle
62/78
'1( )"nten
/aar
0iet &aar '*(
ncorrect. %efer to Section 12
>.
-
8/9/2019 Final Exam Sem 1 Oracle
63/78
%E
-
8/9/2019 Final Exam Sem 1 Oracle
64/78
/BE%E
-
8/9/2019 Final Exam Sem 1 Oracle
65/78
1>. The SEAET statement retrieves information from the database. n a SEAET statement5 +o" can do all
of the follo&ing EHE)T $ar!eren voor na!i3!en
'1( )"nten
)ro3ection
$anip"lation '*(
Goining
Selection
ncorrect. See Section 1;
2?. /hich SA statement &ill ret"rn an error# $ar!eren voor na!i3!en
'1( )"nten
SEA * F% s!+ '*(
select star from s!+
SEAET star F%O$ s!+
SEAET * F%O$ s!+
orrect.
Section 1;
21. n a SEAET statement
-
8/9/2019 Final Exam Sem 1 Oracle
66/78
Section 1=
2. /here in a SA statement can +o" not "se arithmetic operators# $ar!eren voor na!i3!en
'1( )"nten
SEAET
F%O$ '*(
/BE%E
0O0E
ncorrect. See Section 1=.
24. /hich cla"se &o"ld +o" incl"de in a SEAET statement to restrict the data ret"rned to onl+ the
emplo+ees in department 1?# $ar!eren voor na!i3!en'1( )"nten
/BE%E '*(
F%O$
SEAET
S
orrect.
27. /hich of the follo&ing elements cannot be incl"ded in a /BE%E cla"se# $ar!eren voor na!i3!en
'1( )"nten
< col"mn alias '*(
< col"mn name
< comparison condition
< constant
ncorrect. See Section 1=.
2;. /hich operator is "sed to combine col"mns of character strings to other col"mns# $ar!eren voor
na!i3!en
'1( )"nten
*
-
8/9/2019 Final Exam Sem 1 Oracle
67/78
Z
[[ '*(
ncorrect. See Section 1=
2=. /hat does the DST0T !e+&ord do &hen it is "sed in a SEAET cla"se# $ar!eren voor na!i3!en
'1( )"nten
Bides 09AA val"es
Eliminates all "ni:"e val"es and compares val"es
Eliminates d"plicate ro&s in the res"lt '*(
Eliminates onl+ "ni:"e ro&s in the res"lt
orrect. See Section 1=
28. ,o" need to displa+ emplo+ees &hose salar+ is in the range of ???? and 7????. /hich comparison
operator sho"ld +o" "se# $ar!eren voor na!i3!en
'1( )"nten
0
A6E
@ET/EE0R
-
8/9/2019 Final Exam Sem 1 Oracle
68/78
DE)
-
8/9/2019 Final Exam Sem 1 Oracle
69/78
*
orrect. See Section 1=
. ,o" &ant to determine the orders that have been placed b+ c"stomers &ho reside in hicago. ,o" &rite
this partial SEAET statement
SEAET orderid5 orderdate5 total
F%O$ orders
/hat sho"ld +o" incl"de in +o"r SEAET statement to achieve the desired res"lts# $ar!eren voor na!i3!en
'1( )"nten
-
8/9/2019 Final Exam Sem 1 Oracle
70/78
DE)( )rimar+6e+
A( 0OT 09AA
Eval"ate these t&o SEAET statements
1. SEAET DST0T emplo+eeid5 departmentid5 managerid F%O$ emplo+ees
2. SEAET emplo+eeid5 departmentid5 managerid F%O$ emplo+ees
/hich of the follo&ing statements is tr"e# $ar!eren voor na!i3!en
'1( )"nten
The t&o statements &ill displa+ the same data. '*(
The first statement &ill displa+ a partic"lar DE)
-
8/9/2019 Final Exam Sem 1 Oracle
71/78
ncorrect. See Section 1=
Section 18
=. The )A?? or greater. ,o" &ant the pla+ers names to be
displa+ed alphabeticall+ b+ last name and then b+ first name. /hich statement sho"ld +o" "se to achieve
the re:"ired res"lts# $ar!eren voor na!i3!en
'1( )"nten
SEAET lastname5 firstname
F%O$ pla+ers
/BE%E positionid KL ;>??
O%DE% @, lastname5 firstname
'*(
SEAET lastname5 firstname
F%O$ pla+ers
/BE%E positionid K ;>??
O%DE% @, lastname5 firstname
SEAET lastname5 firstname
F%O$ pla+ers
/BE%E positionid L ;>??
O%DE% @, lastname DES5 firstname
orrect.
8. The E$)AO,EES table contains these col"mns
E$)AO,EED 09$@E%'>( )6
A
-
8/9/2019 Final Exam Sem 1 Oracle
72/78
F%O$ emplo+ees
O%DE% @, DE)T
Bo& &ill the res"lts differ# $ar!eren voor na!i3!en
'1( )"nten
One of the statements &ill ret"rn a s+ntax error.
One of the statements &ill eliminate all d"plicate DE)
-
8/9/2019 Final Exam Sem 1 Oracle
73/78
41. From left to right5 &hat is the correct order of )recedence# $ar!eren voor na!i3!en
'1( )"nten
-
8/9/2019 Final Exam Sem 1 Oracle
74/78
'6ies alle goede ant&oorden.(
1
7?
27 '*(
1?
27? '*(
1??
ncorrectQ See Section 18.
48. ,o" need to create a report to displa+ all emplo+ees that &ere hired on or before Gan"ar+ 15 1>>;. Thedata sho"ld displa+ in this format
Emplo+ee Start Date and Salar+
148= X Smith 1?-$2 Z 7???
/hich SEAET statement co"ld +o" "se# $ar!eren voor na!i3!en
'1( )"nten
SEAET emplo+eeid [[ X [[ lastname VEmplo+eeW5
hiredate [[ Z [[ salar+ VStart Date and Salar+
F%O$ emplo+ees
/BE%E hiredate JL M?1-G;M
SEAET emplo+eeid [[M M[[ lastname \Emplo+ee\5
hiredate [[M M[[ salar+ \Start Date and Salar+\
F%O$ emplo+ees
/BE%E hiredate JL ?1-G;M
SEAET emplo+eeid [[M\- \[[ lastname \Emplo+ee\5
hiredate [[\ Z \[[ salar+ Start Date and Salar+\
F%O$ emplo+ees
/BE%E hiredate JL M?1-G;M
SEAET emplo+eeid [[M X M[[ lastname MEmplo+eeM5
hiredate [[M Z M[[ salar+ MStart Date and Salar+\F%O$ emplo+ees
/BE%E hiredate JL M?1-G;M
SEAET emplo+eeid [[M X M[[ lastname \Emplo+ee\5
hiredate [[M Z M[[ salar+ \Start Date and Salar+\
F%O$ emplo+ees
/BE%E hiredate JL M?1-G;M
-
8/9/2019 Final Exam Sem 1 Oracle
75/78
'*(
ncorrectQ See Section 18.
4>. Eval"ate this SEAET statement
SEAET lastname5 firstname5 salar+
F%O$ emplo+ees
Bo& &ill the res"lts of this :"er+ be sorted# $ar!eren voor na!i3!en
'1( )"nten
The database &ill displa+ the ro&s in &hatever order it finds it in the database5 so no partic"lar order. '*(
The res"lts &ill be sorted ascending b+ the A
-
8/9/2019 Final Exam Sem 1 Oracle
76/78
28 mai 2?1? at 1147
.
anon+mo"s
Eval"ate this SEAET statement
SEAET lastname5 firstname5 salar+
F%O$ emplo+ees
Bo& &ill the res"lts of this :"er+ be sorted#
The database &ill displa+ the ro&s in &hatever order it finds it in the database5 so no partic"lar order. '*(
28 mai 2?1? at 112;
4.
anon+mo"s
/hich SEAET statement sho"ld +o" "se to limit the displa+ of prod"ct information to those prod"cts &ith a
price of less than 7?#
SEAET prod"ctid5 prod"ctnameF%O$ prod"cts
/BE%E price JK
'*(
28 mai 2?1? at 1127
7.
anon+mo"s
11. t is possible to implement non-transferabilit+ via a simple Foreign 6e+ %elationship. Tr"e or False#
/aar
0iet &aar '*(
21 mai 2?1? at 127
;.
anon+mo"s
Sorr+ it is interception table
21 mai 2?1? at 12
=.
anon+mo"s
$an+ to man+ relationships are implemented via a str"ct"re called a
S"pert+pe
21 mai 2?1? at 12
8.
anon+mo"s
-
8/9/2019 Final Exam Sem 1 Oracle
77/78
.
anon+mo"s
/hen mapping s"pert+pes5 relationships at the s"pert+pe level transform as "s"al. %elationships at s"bt+pe
level are implemented as foreign !e+s5 b"t the foreign !e+ col"mns all become mandator+. Tr"e or False#
False
21 mai 2?1? at 122
1?.
anon+mo"s
8 (
1? decembrie 2??> at 171
14.
Seb+
$ergeRsa traiesti Q
? noiembrie 2??> at 1=?
-
8/9/2019 Final Exam Sem 1 Oracle
78/78
17.
top related