final oracle exam

20
Section 12 Lesson 1 (Answer all questions in this section) 1. The explanation below is a column integrity constraint: A column must contain only alues consistent with the !e"ine! !ata "ormat o" the column. True or #alse$ True (%) #alse &orrect Section 12 Lesson 1  (Answer all questions in this section) 2. A table must hae a primary 'ey. True or #alse$ ar' "or eiew (1) *oints True #alse (%) &orrect Section 12 Lesson 1 (Answer all questions in this section)  +. The explanation below is a user!e"ine! integrity rule: A primary 'ey must be unique, an! no part o" the primary 'ey can be null. True or #alse$ ar' "or eiew (1) *oints True #alse (%) Section 12 Lesson 1 (Answer all questions in this section) -. The text below is an example o" what constraint type: The alue in the manageri! column o" the /*L0//S table must match a alue in the employeei! column in the /*L0//S table. ar' "or eiew (1) *oints /ntity integrity ser3!e"ine! integrity &olumn integrity e"erential integrity (%) Section 12 Lesson 2 (Answer all questions in this section) 4. Attributes become tables in a !atabase. True or #alse$ ar' "or eiew

Upload: zuzudeeia

Post on 04-Jun-2018

214 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Final oracle exam

8/13/2019 Final oracle exam

http://slidepdf.com/reader/full/final-oracle-exam 1/20

Section 12 Lesson 1

(Answer all questions in this section)

1.The explanation below is a column integrity constraint: A column must contain only

alues consistent with the !e"ine! !ata "ormat o" the column. True or #alse$

True (%)#alse

&orrect

Section 12 Lesson 1

 

(Answer all questions in this section)

2.A table must hae a primary 'ey. True or #alse$ ar' "or eiew

(1) *oints

True#alse (%)

&orrect

Section 12 Lesson 1

(Answer all questions in this section) 

+.

The explanation below is a user!e"ine! integrity rule: A primary 'ey must be unique, an!

no part o" the primary 'ey can be null. True or #alse$ ar' "or eiew(1) *oints

True#alse (%)

Section 12 Lesson 1(Answer all questions in this section)

-.

The text below is an example o" what constraint type: The alue in the manageri!

column o" the /*L0//S table must match a alue in the employeei! column in the/*L0//S table. ar' "or eiew

(1) *oints

/ntity integrityser3!e"ine! integrity

&olumn integrity

e"erential integrity (%)Section 12 Lesson 2

(Answer all questions in this section)

4.

Attributes become tables in a !atabase. True or #alse$ ar' "or eiew

Page 2: Final oracle exam

8/13/2019 Final oracle exam

http://slidepdf.com/reader/full/final-oracle-exam 2/20

(1) *oints

True#alse (%)

&orrect

Section 12 Lesson 2

(Answer all questions in this section)

 5.

6n a physical !ata mo!el, a relationship is represente! as a combination o": ar'

"or eiew

(1) *oints

*rimary 7ey or nique 7ey (%)

&hec' &onstraint or nique 7ey

#oreign 7ey (%)Section 12 Lesson 2

(Answer all questions in this section)8.

The trans"ormation "rom an / !iagram to a physical !esign inoles changing

terminology. Secon!ary nique 6!enti"iers becomes ar' "or eiew(1) *oints

&olumns

Tablesnique &onstraints (%)

*rimary 7ey &onstraints

Section 12 Lesson +(Answer all questions in this section)

9.

0ne3to30ne relationships are trans"orme! into &hec' &onstraints in the tables create! ateither en! o" that relationship. True or #alse$ ar' "or eiew

(1) *oints

True#alse (%)

&orrect

Section 12 Lesson +

(Answer all questions in this section)

 .

;hat !o you create when you trans"orm a one to one relationship "rom your / !iagram

into a physical !esign$ ar' "or eiew

(1) *oints

Page 3: Final oracle exam

8/13/2019 Final oracle exam

http://slidepdf.com/reader/full/final-oracle-exam 3/20

 

nique 'ey constraints

 6ntersection entity

 

6ntersection table (%) 

Two tables with a #oreign 'ey constraints between them

Section 12 Lesson -

(Answer all questions in this section)

 

1<.;hen mapping supertypes, relationships at the supertype leel trans"orm as usual.

elationships at subtype leel are implemente! as "oreign 'eys, but the "oreign 'ey

columns all become man!atory. True or #alse$ ar' "or eiew

(1) *oints

True 

#alse (%)

 Section 12 Lesson -

(Answer all questions in this section)

 

11.An =Arc 6mplementation= can be !one >ust li'e any other elationship 3 you simply a!!

the require! #oreign 7eys. True or #alse$ ar' "or eiew

(1) *oints

True

 #alse (%)

Section 1+ Lesson 1

(Answer all questions in this section) 

12.

;hat comman! will return !ata "rom the !atabase to you$ ar' "or eiew(1) *oints

#/T&? 

@/T

 

S/L/&T (%)

Page 4: Final oracle exam

8/13/2019 Final oracle exam

http://slidepdf.com/reader/full/final-oracle-exam 4/20

 

/T

 Section 1+ Lesson 1

 

(Answer all questions in this section) 

1+.

The clause can be a!!e! to a select statement to return a subset o" the !ata. ar' "or eiew

(1) *oints

A;?// 

;?6&?

 

;?// (%) 

/B/ 

Section 15 Lesson 1

 (Answer all questions in this section)

 

1-.

6n a SCL statement, which clause speci"ies one or more columns to be returne! by thequery$ ar' "or eiew

(1) *oints

S/L/&T (%)

 

#0 

;?//

 

Any o" the aboe options, you can list columns whereer you want to in a S/L/&Tstatement.

Section 15 Lesson 1 

(Answer all questions in this section)

 14.

;hich SCL 'eywor! speci"ies that an alias will be substitute! "or a column name in the

output o" a SCL query$ ar' "or eiew

(1) *oints

Page 5: Final oracle exam

8/13/2019 Final oracle exam

http://slidepdf.com/reader/full/final-oracle-exam 5/20

 

AS (%)

 0 

 

AD 

SEST6TT/

 Section 15 Lesson 1

(Answer all questions in this section)

 

15.6n the !e"ault or!er o" prece!ence, which operator woul! be ealuate! "irst$ ar'

"or eiew

(1) *oints

Subtractions

 ultiplications (%)

 

A!!itions 

Diisions

 

Section 15 Lesson 1 

(Answer all questions in this section)

 18.

ou query the !atabase with this SCL statement:

S/L/&T % #0 stu!entsF;hy woul! you use this statement$ ar' "or eiew

(1) *oints

To insert !ata 

To iew !ata (%)

 To !isplay the table structure

 

To !elete !ata 

Section 15 Lesson 1

 

(Answer all questions in this section)

Page 6: Final oracle exam

8/13/2019 Final oracle exam

http://slidepdf.com/reader/full/final-oracle-exam 6/20

 

19.

;hich 'eywor! can be use! to speci"y a column alias$ ar' "or eiew(1) *oints

AS (%) 

D/S&6E/

 #0

 

;?//

Section 15 Lesson 1

 

(Answer all questions in this section)

 1.

The /*L0//S table contains these columns:SALA E/(8,2)

E0S E/(8,2)

&06SS60*&T E/(2,2)All three columns contain alues greater than Gero. There is one row o" !ata in the table

an! the alues are as "ollows:

Salary H 4<<, Eonus H 4<, &ommissionpct H .4

/aluate these two SCL statements:1.

S/L/&T salary I bonus I commissionpct % salary 3 bonus AS income

#0 employeesF2.

S/L/&T (salary I bonus ) I commissionpct % (salary 3 bonus) income

#0 employeesF;hat will be the result$ ar' "or eiew

(1) *oints

Statement 1 will return a higher alue than statement 2. (%) 

Statement 2 will return a higher alue than statement 1.

 Statement 1 will !isplay a !i""erent column hea!ing.

 

0ne o" the statements will 0T execute.

Section 15 Lesson 1

(Answer all questions in this section)

 

Page 7: Final oracle exam

8/13/2019 Final oracle exam

http://slidepdf.com/reader/full/final-oracle-exam 7/20

2<.

6n which clause o" a S/L/&T statement woul! you speci"y the name o" the table or tables

 being querie!$ ar' "or eiew(1) *oints

the #0 clause (%) 

the S/L/&T clause

 the ;?// clause

 

Any o" the aboe options, you can list tables whereer you want to in a S/L/&T

statement. 

&orrect.

Section 15 Lesson + 

(Answer all questions in this section) 

21.

All computers in the worl! spea's the same languages, so you only nee! to learn one programming language 3 0racle SCL. True or #alse$ ar' "or eiew

(1) *oints

True 

#alse (%)

 Section 15 Lesson +

 

22.There is only one 'in! o" so"tware use! by all computers. True or #ale$ ar' "or

eiew

(1) *oints

True

 

#alse (%) 

Section 18 Lesson 1

 2+.

;hich comparison operator searches "or a speci"ie! character pattern$ ar' "or

eiew

(1) *oints

Page 8: Final oracle exam

8/13/2019 Final oracle exam

http://slidepdf.com/reader/full/final-oracle-exam 8/20

 

6

 L67/ (%)

 

E/T;//...AD... 

6S LL

 Section 18 Lesson 1

 

2-.

;here in a SCL statement can you not use arithmetic operators$ ar' "or eiew(1) *oints

S/L/&T

 #0 (%)

 ;?//

 

 0/ 

Section 18 Lesson 1

 

24.ou nee! to !isplay only unique combinations o" the LASTA/ an! AA@/6D

columns in the /*L0//S table. ;hich 'eywor! shoul! you inclu!e in the S/L/&T

clause$ ar' "or eiew

0L

 6C/

 

D6ST6&T (%)

 D6ST6&T0;

 

Section 18 Lesson 1 

25.

;hen using the L67/ con!ition to search "or symbols, which character can you use as the /S&A*/ option$ ar' "or eiew

(1) *oints

J

Page 9: Final oracle exam

8/13/2019 Final oracle exam

http://slidepdf.com/reader/full/final-oracle-exam 9/20

 

K

 

 

M (%)

Section 18 Lesson 1

 28.

ou nee! to combine the "irst an! last name alues in the /*L0// table an!

!isplay the alues as a combine! character string. ;hich operator shoul! you use$

ar' "or eiew(1) *oints

I

NNN (%)

AD&orrect. See Section 18

Section 18 Lesson 1

29.;hich comparison con!ition woul! you use to select rows that match a character pattern$

6

L67/ (%)

AL0STS66LA 

Section 18 Lesson 2

2.ou nee! write a S/L/&T statement that shoul! only return rows that contain +-, -5, or

-9 "or the D/*AT/T6D column. ;hich operator shoul! you use in the ;?//

clause to compare the D/*AT/T6D column to this speci"ic list o" alues$H

OH

6 (%)

E/T;//..AD..

Section 18 Lesson 2

+<.The *LA/S table contains these columns:

*LA/6D E/ () *rimary 7ey

LASTA/ BA&?A2 (2<)#6STA/ BA&?A2 (2<)

T/A6D E/ (-)

AA@/6D E/ ()

*0S6T606D E/ (-)

Page 10: Final oracle exam

8/13/2019 Final oracle exam

http://slidepdf.com/reader/full/final-oracle-exam 10/20

;hich S/L/&T statement shoul! you use i" you want to !isplay unique combinations o"

the T/A6D an! AA@/6D columns$

S/L/&T % #0 playersFS/L/&T teami!, manageri! #0 playersF

S/L/&T D6ST6&T teami!, manageri! #0 playersF (%)

S/L/&T teami!, D6ST6&T manageri! #0 playersFS/L/&T teami!, manageri! D6ST6&T #0 playersF

Section 18 Lesson 2

 (Answer all questions in this section)+1.

6" the /*L0//S table has the "ollowing columns, an! you want to write a S/L/&T

statement to return the employee last name an! !epartment number "or employee number

185, which o" the "ollowing SCL statements shoul! you use$ ame Type Length

/*L0//6D E/ 22

#6STA/ BA&?A2 2<

LASTA/BA&?A2 24/A6L BA&?A2 24

*?0/E/ BA&?A2 2<SALA E/ 22

&06SS60*&T E/ 22

AA@/6D E/ 22D/*AT/T6D E/ 22

 

S/L/&T lastname, !epartmenti!

#0 employees;?// employeei! H 185F

(%)

 S/L/&T lastname, !epartmenti!

#0 employees

;?// employeei! equals 185F

S/L/&T lastname, employeei!

#0 employees

;?// employeei! equals 185F

Section 18 Lesson 2 

Page 11: Final oracle exam

8/13/2019 Final oracle exam

http://slidepdf.com/reader/full/final-oracle-exam 11/20

+1.

6" the /*L0//S table has the "ollowing columns, an! you want to write a S/L/&T

statement to return the employee last name an! !epartment number "or employee number185, which o" the "ollowing SCL statements shoul! you use$

 ame Type Length

/*L0//6D E/ 22#6STA/ BA&?A2 2<

LASTA/BA&?A2 24

/A6L BA&?A2 24*?0/E/ BA&?A2 2<

SALA E/ 22

&06SS60*&T E/ 22

AA@/6D E/ 22D/*AT/T6D E/ 22

 ar' "or eiew

(1) *oints

S/L/&T lastname, !epartmenti!

#0 employees;?// employeei! H 185F

(%)

 S/L/&T lastname, !epartmenti!

#0 employees

;?// employeei! equals 185F

S/L/&T "irstname, employeei!

#0 employees

;?// employeei! H 185F

S/L/&T lastname, employeei!

#0 employees;?// employeei! equals 185F

Section 18 Lesson 2

 (Answer all questions in this section)

 

+2.;hich S/L/&T statement will !isplay both unique an! non3unique combinations o" the

AA@/6D an! D/*T6D alues "rom the /*L0//S table$

Page 12: Final oracle exam

8/13/2019 Final oracle exam

http://slidepdf.com/reader/full/final-oracle-exam 12/20

 

S/L/&T manageri!, !epartmenti! D6ST6&T #0 employeesF

 S/L/&T manageri!, !epartmenti! #0 employeesF (%)

 

S/L/&T D6ST6&T manageri!, !epartmenti! #0 employeesF 

S/L/&T manageri!, D6ST6&T !epartmenti! #0 employeesF

Section 18 Lesson 2

 

(Answer all questions in this section)

 ++.

ou want to retriee a list o" customers whose last names begin with the letters #r .

;hich symbol shoul! you inclu!e in the ;?// clause o" your S/L/&T statement to

achiee the !esire! result$

J (%) 

P

 Q

 

%

 Section 18 Lesson +

 

(Answer all questions in this section) 

+-.ou want to create a report that !isplays all employees who were hire! be"ore Ranuary 1,

2<<< an! whose annual salaries are greater than 4<<<<.

The /*L0//S table contains these columns:

/*L0//6D BA&?A2(4) *6A 7/LASTA/ BA&?A2(+4)

?6/DAT/ DAT/

D/*AT/T6D E/(-)The SALA table contains these columns:

SALA6D BA&?A2(4) *6A 7/

SALA E/(4, 2)/*L0//6D BA&?A2(4) #0/6@ 7/

;hich query shoul! you issue$ ar' "or eiew

(1) *oints

Page 13: Final oracle exam

8/13/2019 Final oracle exam

http://slidepdf.com/reader/full/final-oracle-exam 13/20

 

S/L/&T lastname, hire!ate, salary

#0 employees ATAL R06 salary S6@ employeei!;?// hire!ate <13>an3<< AD salary 4<<<<F

S/L/&T lastname, hire!ate, salary#0 employees R06 salary

0 employeei! H employeei!

;?// hire!ate U<13>an3<<U AD salary 4<<<<F

S/L/&T lastname, hire!ate, salary

#0 employees ATAL R06 salary

;?// hire!ate U<13>an3<<U AD salary 4<<<<F(%)

 

S/L/&T lastname, hire!ate, salary

#0 employees (I) salary;?// hire!ate U<13>an3<<U AD salary 4<<<<F

Section 18 Lesson +

 

(Answer all questions in this section) 

+4.

The STD/T table contains these columns:

STD/T6D E/(1<) *rimary 7eyLASTA/ BA&?A2(24)

#6STA/ BA&?A2(24)

AR06D E/(+)ADB6S06D E/(4)

/aluate this statement:

S/L/&T D6ST6&T a!isori!, ma>ori!#0 stu!entF

;hich statement is true$

 

/ach ADB6S06D can be !isplaye! only once. 

/ach AR06D can be !isplaye! more than once per ADB6S06D. (%)

 /ach combination o" ADB6S06D an! AR06D can be !isplaye! more than once.

 

/ach AR06D can be !isplaye! only once.

Section 18 Lesson +

(Answer all questions in this section)

Page 14: Final oracle exam

8/13/2019 Final oracle exam

http://slidepdf.com/reader/full/final-oracle-exam 14/20

Page 15: Final oracle exam

8/13/2019 Final oracle exam

http://slidepdf.com/reader/full/final-oracle-exam 15/20

+9.

;hich statement about the !e"ault sort or!er is true$

The lowest numeric alues are !isplaye! last.

 

The earliest !ate alues are !isplaye! "irst. (%) 

 ull alues are !isplaye! "irst.

 &haracter alues are !isplaye! in reerse alphabetical or!er.

Section 19 Lesson 1

 (Answer all questions in this section)

+.

;hich logical operator returns T/ i" either con!ition is true$ ar' "or eiew

(1) *oints

0 (%) 

AD

  0T

 

E0T?

Section 19 Lesson 1

 

(Answer all questions in this section);hich statement about the logical operators is true$ ar' "or eiew

(1) *oints

The or!er o" operator prece!ence is AD, 0, an! 0T.

 

The or!er o" operator prece!ence is AD, 0T, an! 0. 

The or!er o" operator prece!ence is 0T, 0, an! AD.

 The or!er o" operator prece!ence is 0T, AD, an! 0. (%)

Section 19 Lesson 1 

(Answer all questions in this section)

-1.

Page 16: Final oracle exam

8/13/2019 Final oracle exam

http://slidepdf.com/reader/full/final-oracle-exam 16/20

;hich o" the "ollowing best !escribes the meaning o" the L67/ operator$ ar' "or

eiew

(1) *oints

Display rows base! on a range o" alues.

 To test "or alues in a list.

 

atch a character pattern. (%) 

To "in! ull alues.

Section 19 Lesson 1 

(Answer all questions in this section)

-2.

The 0D/ E clause always comes last. True or #alse$ ar' "or eiew(1) *oints

True (%)

 #alse

Section 19 Lesson 2

 (Answer all questions in this section)

 

-+./aluate this S/L/&T statement:

S/L/&T empi!, lastname, "irstname, salary Uearly SalaryU

#0 employees;?// salary 6S 0T LL

0D/ E lastname, +F

;hich clause contains an error$ ar' "or eiew

(1) *ointsS/L/&T empi!, lastname, "irstname, salary Uearly SalaryU (%)

#0 employees

;?// salary 6S 0T LL0D/ E lastname, +F

Section 19 Lesson 2 

(Answer all questions in this section)

--.

/aluate this SCL statement:

Page 17: Final oracle exam

8/13/2019 Final oracle exam

http://slidepdf.com/reader/full/final-oracle-exam 17/20

S/L/&T pro!ucti!, pro!uctname, price

#0 pro!ucts

0D/ E pro!uctname, priceF;hat occurs when the statement is execute!$ ar' "or eiew

(1) *oints

The results are sorte! numerically only.

The results are sorte! alphabetically only.

The results are sorte! numerically an! then alphabetically.The results are sorte! alphabetically an! then numerically. (%)

Section 19 Lesson 2

 (Answer all questions in this section)

-4.

/aluate this S/L/&T statement:

S/L/&T %#0 employees

;?// !epartmenti! H +-0 !epartmenti! H -4

0 !epartmenti! H 58F

;hich operator is the equialent o" the 0 con!itions use! in this S/L/&T statement$ ar' "or eiew

(1) *oints

6 (%)AD

L67/

E/T;// ... AD ...

Section 19 Lesson 2

 (Answer all questions in this section)

-5.

/aluate this S/L/&T statement:

S/L/&T lastname, "irstname, email#0 employees

0D/ E emailF

6" the /A6L column contains null alues, which statement is true$ ar' "oreiew

 ull email alues will be !isplaye! "irst in the result.

 ull email alues will be !isplaye! last in the result. (%) ull email alues will not be !isplaye! in the result.

The result will not be sorte!.

Section 19 Lesson 2

Page 18: Final oracle exam

8/13/2019 Final oracle exam

http://slidepdf.com/reader/full/final-oracle-exam 18/20

 

(Answer all questions in this section)

-8./aluate this S/L/&T statement:

S/L/&T lastname, "irstname, salary

#0 employeesF?ow will the results o" this query be sorte!$ ar' "or eiew

The !atabase will !isplay the rows in whateer or!er it "in!s it in the !atabase, so no particular or!er. (%)

The results will be sorte! ascen!ing by the LASTA/ column only.

The results will be sorte! ascen!ing by LASTA/ an! #6STA/ only.

The results will be sorte! ascen!ing by LASTA/, #6STA/, an! SALA.

Section 19 Lesson 2

 

(Answer all questions in this section)-9.

/aluate this S/L/&T statement:S/L/&T lastname, "irstname, !epartmenti!, manageri!

#0 employeesF

ou nee! to sort !ata by manager i! alues an! then alphabetically by employee lastname

 an! "irst name alues.

;hich 0D/ E clause coul! you use$ ar' "or eiew

(1) *oints

0D/ E !epartmenti!, lastname0D/ E manageri!, lastname, "irstname (%)

0D/ E lastname, "irstname, manageri!

0D/ E manageri!, "irstname, lastname

Section 19 Lesson +

 

(Answer all questions in this section)-.

The *LA/S table contains these columns:

*LA/S TAEL/:LASTA/ BA&?A2 (2<)

#6STA/ BA&?A2 (2<)

SALA E/(9,2)T/A6D E/(-)

AA@/6D E/()

*0S6T606D E/(-)

Page 19: Final oracle exam

8/13/2019 Final oracle exam

http://slidepdf.com/reader/full/final-oracle-exam 19/20

ou want to !isplay all playersU names with position 5<< or greater. ou want the

 players names to

 be !isplaye! alphabetically by last name an! then by "irst name. ;hich statement shoul!you use to

 achiee the require! results$ ar' "or eiew

(1) *oints

S/L/&T lastname, "irstname

#0 players

;?// positioni! H 5<<

0D/ E lastname, "irstnameF(%)

S/L/&T lastname, "irstname

#0 players

;?// positioni! 5<<0D/ E lastname, "irstnameF

S/L/&T lastname, "irstname#0 players

;?// positioni! H 5<<

0D/ E lastname, "irstnameFS/L/&T lastname, "irstname

#0 players

;?// positioni! H 5<<

0D/ E lastname D/S&, "irstnameF

Section 19 Lesson +

 (Answer all questions in this section)

 

4<.

The /*L0//S table contains these columns:

/*L0//6D E/() *7

LASTA/ BA&?A2(24)#6STA/ BA&?A2(24)

D/*AT/T6D E/()

&ompare these two SCL statements:1.

S/L/&T D6ST6&T !epartmenti! D/*T, lastname, "irstname

#0 employees0D/ E !epartmenti!F

2.

S/L/&T !epartmenti! D/*T, lastname, "irstname

#0 employees

Page 20: Final oracle exam

8/13/2019 Final oracle exam

http://slidepdf.com/reader/full/final-oracle-exam 20/20

0D/ E D/*TF

?ow will the results !i""er$ ar' "or eiew

(1) *oints

0ne o" the statements will return a syntax error.

0ne o" the statements will eliminate all !uplicate D/*AT/T6D alues.There is no !i""erence in the result between the two statements. (%)

The statements will sort on !i""erent column alues.