You are on page 1of 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 ha e a primary 'ey. True or #alse$ (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 )e iew (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 manager.i! column o" the /(*L01//S table must match a alue in the employee.i! column in the /(*L01//S table. (ar' "or )e iew (1) *oints /ntity integrity 2ser3!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 )e iew

(ar' "or )e iew

(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": "or )e iew (1) *oints *rimary 7ey or 2nique 7ey (%) &hec' &onstraint or 2nique 7ey #oreign 7ey (%) Section 12 Lesson 2 (Answer all questions in this section) 8. The trans"ormation "rom an /) !iagram to a physical !esign in ol es changing terminology. Secon!ary 2nique 6!enti"iers becomes (ar' "or )e iew (1) *oints &olumns Tables 2nique &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! at either en! o" that relationship. True or #alse$ (ar' "or )e iew (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 )e iew (1) *oints (ar'

2nique '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 le el trans"orm as usual. )elationships at subtype le el are implemente! as "oreign 'eys, but the "oreign 'ey columns all become man!atory. True or #alse$ (ar' "or )e iew (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 )e iew (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 )e iew (1) *oints #/T&? @/T S/L/&T (%)

)/T2)A 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 )e iew (1) *oints AA1;?/)/ ;?6&? ;?/)/ (%) /B/)1 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 the query$ (ar' "or )e iew (1) *oints S/L/&T (%) #)0( ;?/)/ Any o" the abo e options, you can list columns where er you want to in a S/L/&T statement. 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 )e iew (1) *oints

AS (%) 0) AAD S2EST6T2T/ Section 15 Lesson 1 (Answer all questions in this section) 15. 6n the !e"ault or!er o" prece!ence, which operator woul! be e aluate! "irst$ "or )e iew (1) *oints Subtractions (ultiplications (%) A!!itions Di isions Section 15 Lesson 1 (Answer all questions in this section) 18. 1ou query the !atabase with this SCL statement: S/L/&T % #)0( stu!entsF ;hy woul! you use this statement$ (ar' "or )e iew (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) (ar'

19. ;hich 'eywor! can be use! to speci"y a column alias$ (1) *oints AS (%) D/S&)6E/ #)0( ;?/)/ Section 15 Lesson 1 (Answer all questions in this section)

(ar' "or )e iew

1:. The /(*L01//S table contains these columns: SALA)1 A2(E/)(8,2) E0A2S A2(E/)(8,2) &0((6SS60A.*&T A2(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<, &ommission.pct H .4 / aluate these two SCL statements: 1. S/L/&T salary I bonus I commission.pct % salary 3 bonus AS income #)0( employeesF 2. S/L/&T (salary I bonus ) I commission.pct % (salary 3 bonus) income #)0( employeesF ;hat will be the result$ (ar' "or )e iew (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 A0T execute. Section 15 Lesson 1 (Answer all questions in this section)

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 )e iew (1) *oints the #)0( clause (%) the S/L/&T clause the ;?/)/ clause Any o" the abo e options, you can list tables where er 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 )e iew (1) *oints True #alse (%) Section 15 Lesson + 22. There is only one 'in! o" so"tware use! by all computers. True or #ale$ )e iew (1) *oints True #alse (%) Section 18 Lesson 1 2+. ;hich comparison operator searches "or a speci"ie! character pattern$ )e iew (1) *oints (ar' "or (ar' "or

6A L67/ (%) E/T;//A...AAD... 6S A2LL Section 18 Lesson 1 2-. ;here in a SCL statement can you not use arithmetic operators$ (1) *oints S/L/&T #)0( (%) ;?/)/ A0A/ Section 18 Lesson 1 24. 1ou nee! to !isplay only unique combinations o" the LAST.AA(/ an! (AAA@/).6D columns in the /(*L01//S table. ;hich 'eywor! shoul! you inclu!e in the S/L/&T clause$ (ar' "or )e iew 0AL1 2A6C2/ D6ST6A&T (%) D6ST6A&T)0; 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 )e iew (1) *oints J (ar' "or )e iew

K L M (%) Section 18 Lesson 1 28. 1ou nee! to combine the "irst an! last name alues in the /(*L01// table an! !isplay the alues as a combine! character string. ;hich operator shoul! you use$ (ar' "or )e iew (1) *oints I N NN (%) AAD &orrect. See Section 18 Section 18 Lesson 1 29. ;hich comparison con!ition woul! you use to select rows that match a character pattern$ 6A L67/ (%) AL(0ST S6(6LA) Section 18 Lesson 2 2:. 1ou nee! write a S/L/&T statement that shoul! only return rows that contain +-, -5, or -9 "or the D/*A)T(/AT.6D column. ;hich operator shoul! you use in the ;?/)/ clause to compare the D/*A)T(/AT.6D column to this speci"ic list o" alues$ H OH 6A (%) E/T;//A..AAD.. Section 18 Lesson 2 +<. The *LA1/)S table contains these columns: *LA1/).6D A2(E/) (:) *rimary 7ey LAST.AA(/ BA)&?A)2 (2<) #6)ST.AA(/ BA)&?A)2 (2<) T/A(.6D A2(E/) (-) (AAA@/).6D A2(E/) (:) *0S6T60A.6D A2(E/) (-)

;hich S/L/&T statement shoul! you use i" you want to !isplay unique combinations o" the T/A(.6D an! (AAA@/).6D columns$ S/L/&T % #)0( playersF S/L/&T team.i!, manager.i! #)0( playersF S/L/&T D6ST6A&T team.i!, manager.i! #)0( playersF (%) S/L/&T team.i!, D6ST6A&T manager.i! #)0( playersF S/L/&T team.i!, manager.i! D6ST6A&T #)0( playersF Section 18 Lesson 2 (Answer all questions in this section) +1. 6" the /(*L01//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$ Aame Type Length /(*L01//.6D A2(E/) 22 #6)ST.AA(/ BA)&?A)2 2< LAST.AA(/BA)&?A)2 24 /(A6L BA)&?A)2 24 *?0A/.A2(E/) BA)&?A)2 2< SALA)1 A2(E/) 22 &0((6SS60A.*&T A2(E/) 22 (AAA@/).6D A2(E/) 22 D/*A)T(/AT.6D A2(E/) 22 S/L/&T last.name, !epartment.i! #)0( employees ;?/)/ employee.i! H 185F (%) S/L/&T last.name, !epartment.i! #)0( employees ;?/)/ employee.i! equals 185F S/L/&T last.name, employee.i! #)0( employees ;?/)/ employee.i! equals 185F Section 18 Lesson 2

+1. 6" the /(*L01//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$ Aame Type Length /(*L01//.6D A2(E/) 22 #6)ST.AA(/ BA)&?A)2 2< LAST.AA(/BA)&?A)2 24 /(A6L BA)&?A)2 24 *?0A/.A2(E/) BA)&?A)2 2< SALA)1 A2(E/) 22 &0((6SS60A.*&T A2(E/) 22 (AAA@/).6D A2(E/) 22 D/*A)T(/AT.6D A2(E/) 22 (ar' "or )e iew (1) *oints S/L/&T last.name, !epartment.i! #)0( employees ;?/)/ employee.i! H 185F (%) S/L/&T last.name, !epartment.i! #)0( employees ;?/)/ employee.i! equals 185F S/L/&T "irst.name, employee.i! #)0( employees ;?/)/ employee.i! H 185F S/L/&T last.name, employee.i! #)0( employees ;?/)/ employee.i! 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 (AAA@/).6D an! D/*T.6D alues "rom the /(*L01//S table$

S/L/&T manager.i!, !epartment.i! D6ST6A&T #)0( employeesF S/L/&T manager.i!, !epartment.i! #)0( employeesF (%) S/L/&T D6ST6A&T manager.i!, !epartment.i! #)0( employeesF S/L/&T manager.i!, D6ST6A&T !epartment.i! #)0( employeesF Section 18 Lesson 2 (Answer all questions in this section) ++. 1ou want to retrie e 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 achie e the !esire! result$ J (%) P Q % Section 18 Lesson + (Answer all questions in this section) +-. 1ou 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 /(*L01//S table contains these columns: /(*L01//.6D BA)&?A)2(4) *)6(A)1 7/1 LAST.AA(/ BA)&?A)2(+4) ?6)/DAT/ DAT/ D/*A)T(/AT.6D A2(E/)(-) The SALA)1 table contains these columns: SALA)16D BA)&?A)2(4) *)6(A)1 7/1 SALA)1 A2(E/)(4, 2) /(*L01//.6D BA)&?A)2(4) #0)/6@A 7/1 ;hich query shoul! you issue$ (ar' "or )e iew (1) *oints

S/L/&T last.name, hire!ate, salary #)0( employees AAT2)AL R06A salary 2S6A@ employee.i! ;?/)/ hire!ate S <13>an3<< AAD salary T 4<<<<F S/L/&T last.name, hire!ate, salary #)0( employees R06A salary 0A employee.i! H employee.i! ;?/)/ hire!ate S U<13>an3<<U AAD salary T 4<<<<F S/L/&T last.name, hire!ate, salary #)0( employees AAT2)AL R06A salary ;?/)/ hire!ate S U<13>an3<<U AAD salary T 4<<<<F (%) S/L/&T last.name, hire!ate, salary #)0( employees (I) salary ;?/)/ hire!ate S U<13>an3<<U AAD salary T 4<<<<F Section 18 Lesson + (Answer all questions in this section) +4. The ST2D/AT table contains these columns: ST2D/AT.6D A2(E/)(1<) *rimary 7ey LAST.AA(/ BA)&?A)2(24) #6)ST.AA(/ BA)&?A)2(24) (AR0).6D A2(E/)(+) ADB6S0).6D A2(E/)(4) / aluate this statement: S/L/&T D6ST6A&T a! isor.i!, ma>or.i! #)0( stu!entF ;hich statement is true$ /ach ADB6S0).6D can be !isplaye! only once. /ach (AR0).6D can be !isplaye! more than once per ADB6S0).6D. (%) /ach combination o" ADB6S0).6D an! (AR0).6D can be !isplaye! more than once. /ach (AR0).6D can be !isplaye! only once. Section 18 Lesson + (Answer all questions in this section)

+5. The /(*L01//S table contains these columns: /(*L01//.6D A2(E/)(:) *rimary7ey LAST.AA(/ BA)&?A)2 (2<) #6)ST.AA(/ BA)&?A)2 (2<) D/*A)T(/AT.6D A2(E/)(4) A0T A2LL (AAA@/).6D A2(E/)(:) A0T A2LL / aluate these two S/L/&T statements: 1. S/L/&T D6ST6A&T employee.i!, !epartment.i!, manager.i! #)0( employeesF 2. S/L/&T employee.i!, !epartment.i!, manager.i! #)0( employeesF ;hich o" the "ollowing statements is true$ The two statements will !isplay the same !ata. (%) The "irst statement will !isplay a particular D/*A)T(/AT.6D only once. The "irst statement will A0T !isplay alues "rom all o" the rows in the /(*L01// table The secon! statement coul! !isplay a unique combination o" the /(*L01//.6D, (AAA@/).6D, an! D/*A)T(/AT.6D alues more than once. Section 19 Lesson 1 (Answer all questions in this section) +8. 1ou nee! to o erri!e the !e"ault sort or!er o" the 0)D/) E1 clause so that the !ata is !isplaye! in re erse alphabetical or!er. ;hich 'eywor! shoul! you inclu!e in the 0)D/) E1 clause$ D/S& (%) AS& S0)T &?AA@/ Section 19 Lesson 1 (Answer all questions in this section)

+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. (%) Aull alues are !isplaye! "irst. &haracter alues are !isplaye! in re erse alphabetical or!er. Section 19 Lesson 1 (Answer all questions in this section) +:. ;hich logical operator returns T)2/ i" either con!ition is true$ (1) *oints 0) (%) AAD A0T E0T? Section 19 Lesson 1 (Answer all questions in this section) ;hich statement about the logical operators is true$ (1) *oints The or!er o" operator prece!ence is AAD, 0), an! A0T. The or!er o" operator prece!ence is AAD, A0T, an! 0). The or!er o" operator prece!ence is A0T, 0), an! AAD. The or!er o" operator prece!ence is A0T, AAD, an! 0). (%) Section 19 Lesson 1 (Answer all questions in this section) -1. (ar' "or )e iew

(ar' "or )e iew

;hich o" the "ollowing best !escribes the meaning o" the L67/ operator$ (ar' "or )e iew (1) *oints Display rows base! on a range o" alues. To test "or alues in a list. (atch a character pattern. (%) To "in! Aull alues. Section 19 Lesson 1 (Answer all questions in this section) -2. The 0)D/) E1 clause always comes last. True or #alse$ (ar' "or )e iew (1) *oints True (%) #alse Section 19 Lesson 2 (Answer all questions in this section) -+. / aluate this S/L/&T statement: S/L/&T emp.i!, last.name, "irst.name, salary U1early SalaryU #)0( employees ;?/)/ salary 6S A0T A2LL 0)D/) E1 last.name, +F ;hich clause contains an error$ (ar' "or )e iew (1) *oints S/L/&T emp.i!, last.name, "irst.name, salary U1early SalaryU (%) #)0( employees ;?/)/ salary 6S A0T A2LL 0)D/) E1 last.name, +F Section 19 Lesson 2 (Answer all questions in this section) --. / aluate this SCL statement:

S/L/&T pro!uct.i!, pro!uct.name, price #)0( pro!ucts 0)D/) E1 pro!uct.name, priceF ;hat occurs when the statement is execute!$ (1) *oints

(ar' "or )e iew

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 ;?/)/ !epartment.i! H +0) !epartment.i! H -4 0) !epartment.i! H 58F ;hich operator is the equi alent o" the 0) con!itions use! in this S/L/&T statement$ (ar' "or )e iew (1) *oints 6A (%) AAD L67/ E/T;//A ... AAD ... Section 19 Lesson 2 (Answer all questions in this section) -5. / aluate this S/L/&T statement: S/L/&T last.name, "irst.name, email #)0( employees 0)D/) E1 emailF 6" the /(A6L column contains null alues, which statement is true$ )e iew Aull email alues will be !isplaye! "irst in the result. Aull email alues will be !isplaye! last in the result. (%) Aull email alues will not be !isplaye! in the result. The result will not be sorte!. Section 19 Lesson 2

(ar' "or

(Answer all questions in this section) -8. / aluate this S/L/&T statement: S/L/&T last.name, "irst.name, salary #)0( employeesF ?ow will the results o" this query be sorte!$ (ar' "or )e iew The !atabase will !isplay the rows in whate er or!er it "in!s it in the !atabase, so no particular or!er. (%) The results will be sorte! ascen!ing by the LAST.AA(/ column only. The results will be sorte! ascen!ing by LAST.AA(/ an! #6)ST.AA(/ only. The results will be sorte! ascen!ing by LAST.AA(/, #6)ST.AA(/, an! SALA)1. Section 19 Lesson 2 (Answer all questions in this section) -9. / aluate this S/L/&T statement: S/L/&T last.name, "irst.name, !epartment.i!, manager.i! #)0( employeesF 1ou nee! to sort !ata by manager i! alues an! then alphabetically by employee last name an! "irst name alues. ;hich 0)D/) E1 clause coul! you use$ (ar' "or )e iew (1) *oints 0)D/) E1 !epartment.i!, last.name 0)D/) E1 manager.i!, last.name, "irst.name (%) 0)D/) E1 last.name, "irst.name, manager.i! 0)D/) E1 manager.i!, "irst.name, last.name Section 19 Lesson + (Answer all questions in this section) -:. The *LA1/)S table contains these columns: *LA1/)S TAEL/: LAST.AA(/ BA)&?A)2 (2<) #6)ST.AA(/ BA)&?A)2 (2<) SALA)1 A2(E/)(9,2) T/A(.6D A2(E/)(-) (AAA@/).6D A2(E/)(:) *0S6T60A.6D A2(E/)(-)

1ou want to !isplay all playersU names with position 5:<< or greater. 1ou want the players names to be !isplaye! alphabetically by last name an! then by "irst name. ;hich statement shoul! you use to achie e the require! results$ (ar' "or )e iew (1) *oints

S/L/&T last.name, "irst.name #)0( players ;?/)/ position.i! TH 5:<< 0)D/) E1 last.name, "irst.nameF (%) S/L/&T last.name, "irst.name #)0( players ;?/)/ position.i! T 5:<< 0)D/) E1 last.name, "irst.nameF S/L/&T last.name, "irst.name #)0( players ;?/)/ position.i! SH 5:<< 0)D/) E1 last.name, "irst.nameF S/L/&T last.name, "irst.name #)0( players ;?/)/ position.i! TH 5:<< 0)D/) E1 last.name D/S&, "irst.nameF Section 19 Lesson + (Answer all questions in this section) 4<. The /(*L01//S table contains these columns: /(*L01//.6D A2(E/)(:) *7 LAST.AA(/ BA)&?A)2(24) #6)ST.AA(/ BA)&?A)2(24) D/*A)T(/AT.6D A2(E/)(:) &ompare these two SCL statements: 1. S/L/&T D6ST6A&T !epartment.i! D/*T, last.name, "irst.name #)0( employees 0)D/) E1 !epartment.i!F 2. S/L/&T !epartment.i! D/*T, last.name, "irst.name #)0( employees

0)D/) E1 D/*TF ?ow will the results !i""er$ (1) *oints

(ar' "or )e iew

0ne o" the statements will return a syntax error. 0ne o" the statements will eliminate all !uplicate D/*A)T(/AT.6D alues. There is no !i""erence in the result between the two statements. (%) The statements will sort on !i""erent column alues.

You might also like