Database Programming - Section 18

Database Programming Section 18
Instructor Guide
Table of Contents
Database Programming - Section 18..............................................................................................................1
Lesson 1 - Certification Exam Preparation....................................................................................................1
What Will I Learn? ........................................................................................................................................2
Why Learn It?................................................................................................................................................3
Tell Me / Show Me........................................................................................................................................4
Try It / Solve It ..............................................................................................................................................5
Lesson 2 - Certification Exam Preparation....................................................................................................6
What Will I Learn? ........................................................................................................................................7
Why Learn It?................................................................................................................................................8
Tell Me / Show Me........................................................................................................................................9
Try It / Solve It ..............................................................................................................................................15
Lesson 3 - Certification Exam Preparation....................................................................................................19
What Will I Learn? ........................................................................................................................................21
Why Learn It?................................................................................................................................................22
Tell Me / Show Me........................................................................................................................................23
Try It / Solve It ..............................................................................................................................................24
Copyright © Oracle, 2004. All rights reserved.
Database Programming - Section 18
Page i
Lesson 1 - Certification Exam Preparation
Lesson 1 - Certification Exam Preparation
Lesson Preparation
None.
What to Watch For
None.
Connections
None.
Copyright © Oracle, 2004. All rights reserved.
Database Programming - Section 18
Page 1
What Will I Learn?
What Will I Learn?
Copyright © Oracle, 2004. All rights reserved.
Database Programming - Section 18
Page 2
Why Learn It?
Why Learn It?
Copyright © Oracle, 2004. All rights reserved.
Database Programming - Section 18
Page 3
Tell Me / Show Me
Tell Me / Show Me
Copyright © Oracle, 2004. All rights reserved.
Database Programming - Section 18
Page 4
Try It / Solve It
Try It / Solve It
Copyright © Oracle, 2004. All rights reserved.
Database Programming - Section 18
Page 5
Lesson 2 - Certification Exam Preparation
Lesson 2 - Certification Exam Preparation
Lesson Preparation
None.
What to What For
The iSQL*Plus commands are new information. Assist students with this content. Use the SelfTest Software topics: Producing Readable Output with iSQL*Plus as well as using the
iSQL*Plus PowerPoint slides referenced in Tell Me / Show Me.
Connections
None.
Copyright © Oracle, 2004. All rights reserved.
Database Programming - Section 18
Page 6
What Will I Learn?
What Will I Learn?
Copyright © Oracle, 2004. All rights reserved.
Database Programming - Section 18
Page 7
Why Learn It?
Why Learn It?
Copyright © Oracle, 2004. All rights reserved.
Database Programming - Section 18
Page 8
Tell Me / Show Me
Tell Me / Show Me
Copyright © Oracle, 2004. All rights reserved.
Database Programming - Section 18
Page 9
Tell Me / Show Me
Tell Me / Show Me
Copyright © Oracle, 2004. All rights reserved.
Database Programming - Section 18
Page 10
Tell Me / Show Me
Tell Me / Show Me
Copyright © Oracle, 2004. All rights reserved.
Database Programming - Section 18
Page 11
Tell Me / Show Me
Tell Me / Show Me
Copyright © Oracle, 2004. All rights reserved.
Database Programming - Section 18
Page 12
Tell Me / Show Me
Tell Me / Show Me
Copyright © Oracle, 2004. All rights reserved.
Database Programming - Section 18
Page 13
Tell Me / Show Me
Tell Me / Show Me
Copyright © Oracle, 2004. All rights reserved.
Database Programming - Section 18
Page 14
Try It / Solve It
Try It / Solve It
Try It / Solve It
Answers:
1. Substitution variables are used to prompt the user for values to be used in a SQL statement.
2. In iSQL*Plus, you can use single ampersand (&) substitution variables to temporarily store
values. You can use the double-ampersand (&&) substitution variable if you want to reuse the
variable value without prompting the user each time.
3. In iSQL*Plus, you can use single ampersand (&) substitution variables to temporarily store
values. You can use the double-ampersand (&&) substitution variable if you want to reuse the
variable value without prompting the user each time.You can predefine user variables before
executing a SELECT statement. iSQL*Plus provides the DEFINE command for defining and
setting substitution variables.
Copyright © Oracle, 2004. All rights reserved.
Database Programming - Section 18
Page 15
Try It / Solve It
Try It / Solve It
Try It / Solve It
Answers:
4. If the variable is created using the iSQL*Plus DEFINE command, the user is not prompted
to enter a value for the variable. Instead, the defined variable value is automatically substituted
in the SELECT statement.
When iSQL*Plus detects that the SQL statement contains an &, the user is prompted to enter a
value for the substitution variable named in the SQL statement. Once the value has been
entered and the Submit for Execution button has been clicked, the results are displayed in the
output area of the iSQL*Plus session. You can use the double-ampersand (&&) substitution
variable if you want to reuse the variable value without prompting the user each time. The user
will see the prompt for the value only once.
5. Answers will vary:
SELECT employee_id, last_name, job_id, &&column_name
FROM employees
ORDER BY &column_name;
6. See Student Content Tell Me / Show Me for list.
Copyright © Oracle, 2004. All rights reserved.
Database Programming - Section 18
Page 16
Try It / Solve It
Try It / Solve It
Try It / Solve It
Answers:
7. Answers will vary.
COLUMN salary FORMAT $99,999.00
COLUMN manager FORMAT 999999 NULL 'No Manager
COLUMN sal HEADING 'Salary'
8. Use the BREAK command to divide rows into sections and suppress duplicate values. To
ensure that the BREAK command works effectively, use the ORDER BY clause to order the
columns that you are breaking on.
Syntax
BREAK on column[|alias|row]
9. You can control the environment in which iSQL*Plus is currently operating by using the
SET and SHOW commands. See the list of commands in the Student Content Tell Me / Show
Me section.
10. Answers will vary. See Graphic in Tell Me / Show Me section.
Copyright © Oracle, 2004. All rights reserved.
Database Programming - Section 18
Page 17
11. HTML DB can format the output column headings, currency and date displays and use
concatenate. The output is in the HTML DB format. Using iSQL*Plus formatting it is possible
to format the display other than the HTML DB default returned format.
Copyright © Oracle, 2004. All rights reserved.
Database Programming - Section 18
Page 18
Lesson 3 - Certification Exam Preparation
Lesson 3 - Certification Exam Preparation
Lesson Preparation
FREE Student Promotion Codes -- All instructors teaching Year 1 of the Oracle Academy
receive 15 free student promotion codes. If you have not received your promotion code, please
contact the Academy at [email protected] and include "FREE Student Promotion
Codes" in the subject line. Please include your school name. Only students who have passed
the Academy Database Programming Final Exam are eligible to sit for the certification exam.
1. Go to http://oracle.prometric.com and click "First-time Registration" at the bottom of the
screen.
2. Leave the Prometric Testing ID field blank.
3. Select "Oracle" for the "Test Provider or Program." Click Continue.
4. Fill out the registration form. All required fields have arrows and must be completed.
IMPORTANT: For the Company field, enter the school name. When you are finished, click
Submit. (WRITE DOWN YOUR PROMETRIC TESTING ID FOR FUTURE REFERENCE!)
5. Click CONTINUE.
6. Click Take Test.
7. In the "Public Tests" box, select "Oracle" (this should already be defaulted in the field).
Copyright © Oracle, 2004. All rights reserved.
Database Programming - Section 18
Page 19
8. In the "Private Tests" box, enter "Academy" (not case-sensitive) and click Submit in the
"Private Tests" box.
9. A new window appears. Click "Take This Test!"
10. You will then be prompted for the promotion code. Refer to the email you received for this
code.
11. Take the exam!
What to Watch For
None.
Connections
None.
Copyright © Oracle, 2004. All rights reserved.
Database Programming - Section 18
Page 20
What Will I Learn?
What Will I Learn?
Copyright © Oracle, 2004. All rights reserved.
Database Programming - Section 18
Page 21
Why Learn It?
Why Learn It?
Copyright © Oracle, 2004. All rights reserved.
Database Programming - Section 18
Page 22
Tell Me / Show Me
Tell Me / Show Me
Copyright © Oracle, 2004. All rights reserved.
Database Programming - Section 18
Page 23
Try It / Solve It
Try It / Solve It
Try It / Solve It
Proctoring the Exam:
The new online delivery for the Introduction to Oracle9i: SQL Exam #1Z0-007 allows for each
Academy site to deliver the exam within the classroom environment. As this provides
tremendous flexibility for accessing the exam, it also implies more responsibility on behalf of
the instructor. You will be "proctoring" an "unproctored" exam. This means that students will
follow the same process for registering, however, only the instructor will have access to the
promotion code. Please follow the guidelines below for proctoring the Oracle Certified
Professional exam.
In order to proctor an exam, an instructor must have:
- Valid Oracle Internet Academy Instructor status
- Attempted the Introduction to Oracle9i: SQL Exam #1Z0-007.
- Received email from the Academy with valid student promotion code.
Copyright © Oracle, 2004. All rights reserved.
Database Programming - Section 18
Page 24
Steps for proctoring the OCP:
1. Clear the lab area of all miscellaneous paperwork, books and materials.
2. Assign one computer per student.
3. Be sure to have allotted enough time for completion of the exam. There are 120 minutes
allowed for completion. This does not include time for students to register with Prometric.
Copyright © Oracle, 2004. All rights reserved.
Database Programming - Section 18
Page 25
Copyright © Oracle, 2004. All rights reserved.
Database Programming - Section 18
Page 26