CIS 399 - Introduction to Oracle and SQL

Text:
Introduction to Oracle 10g
Introduction to Oracle 10g
James Perry and Gerald Post
Pearson / Prentice Hall
ISBN 0131746006 (book)
ISBN 0131525360 (software)
(the software is bunded with the book) amazon.com
bookpool.com
Other Reading:
Oracle Connections from PHP
Java 1.4 and JDBC
About Face, by Alan Cooper
Cryptography in the Database, by Kevin Kenan
Instructor:Kevin Huck
Phone:541-346-1373
Email:
Overview: This summer, the Computer and Information Science Department is offering a course entitled "Introduction to ORACLE and SQL". For those of you unfamiliar with Oracle, it is one of the top commercial databases in research and industry today, and widely considered the market leader. There has been a steady demand (and will continue to be) for database administrators and application developers familiar with databases in general, and Oracle in particular. The goals for the class are to prepare you to install and administer databases, create tables and develop applications which use a database - whether it be Oracle 10g, MySQL, PostgreSQL, Microsoft SQL Server, IBM DB2 or any other database management system - most of the skills cary over from one vendor to another. For more information about the course, contact the instructor.
Oracle Web Site:www.oracle.com
Setting up a database:Setup instructions
CRN:44151
Official Name:CIS 399 - Sp St Intr Orac & Sql
Credit Hours:4
Time:2PM - 3PM
Days:Monday, Tuesday, Wednesday, Thursday
Pre-requisite:CIS 313 (or instructor permission)
Office Hours:Monday, Wednesday from 3-4PM in 228 Deschutes, or by appointment. (tentative - due to nearby construction, this may vary...)
Grades:70% Homework, 30% Group Project
Late Policy:Homework assignments are due by 3PM the day they are due. Late homework (accepted up to 24 hours later) is penalized 25%.
Academic Honesty:Short answer - don't cheat, plagarize, fabricate or otherwise steal work. Google is a powerful tool... I use it all the time. HOWEVER, use it appropriately, and cite all references in your source code or where appropriate.
Long answer - University Policy on cheating.
Connection Information:
(Windows)
To connect to the database using local client tools, follow the instructions that are on pages 23--24 of the text. Use the following values for the respective step: 2) Replace LABDB with something meaningful, like CIS399 or test1ix. 4) Use the server name "ix.cs.uoregon.edu". 5) The global database name is "test1.ix.cs.uoregon.edu". Be forewarned, however, that the username/password defaults to "scott/tiger" or something like that. When you test the connection, and it fails (that account is locked), click on the "change login" button to enter your username and password.
Connection Information:
(OS X or Linux)
To connect to the database using local client tools, add the following to the bottom of your tnsnames.ora file:
test1 =
  (DESCRIPTION =
    (ADDRESS =
      (PROTOCOL = TCP)
      (HOST = ix.cs.uoregon.edu)
      (PORT = 1521)
    )
    (CONNECT_DATA =
      (SERVICE_NAME = test1.ix.cs.uoregon.edu)
    )
  )
Then, in order to connect, use "test1" as your connection identifier. For example:
sqlplus username@test1
Using Forms Builder
in Deschutes 100:
(Solaris)
In order to use the forms builder application in room 100, you have to do the following:
  1. Log on to a workstation in the lab, using your ix username/password.
  2. Open a command terminal by right-clicking on the desktop, and selecting the Tools->Terminal item.
  3. In the terminal, execute the following commands for csh (copy and paste them - it's easier than typing):
    setenv ORACLE_HOME /local/apps/Databases/oracle_DS
    setenv ORACLE_SID test1
    setenv PATH ${PATH}:/local/apps/Databases/oracle_DS/bin
    frmbld.sh
    
    or the following commands for bash:
    ORACLE_HOME=/local/apps/Databases/oracle_DS
    export ORACLE_HOME
    ORACLE_SID=test1
    export ORACLE_SID
    PATH="${PATH}":/local/apps/Databases/oracle_DS/bin
    frmbld.sh
    
    When you connect to the database in form builder, enter your database username and password, and for database, enter "test1TCP".
You can't test your forms on the Solaris machines in room 100, but you can compile them. When you are prompted to connect to the database, use your database username/password, and the database name is "test1TCP". When you are ready to test your forms, use the PC in the southeast corner of the lab, or if it is occupied, the PC in my office (228 Deschutes), and do the following:
  1. Log on to the PC using the oracle account.
  2. Start the windows explorer (Start -> Accessories -> Windows Explorer)
  3. Select the menu item Tools -> Mount Network drive...
  4. In the folder box, type \\acme.cs.uoregon.edu\username where username is your ix logon. Do NOT select the "Reconnect at logon" checkbox. Click "Finish".
  5. You will be prompted for your ix username and password. Enter them. Do NOT select the "Remember my password" option.
  6. Your solaris home directory will be mounted, and you will be able to access your forms.
  7. Start the OC4J service by selecting Start -> All Programs -> Oracle Developer Suite - DevSuiteHome -> Forms Developer -> Start OC4J Instance. You can minimize the command window, but do not close it, or the service will be killed.
  8. Start the Forms Builder by selecting Start -> All Programs -> Oracle Developer Suite - DevSuiteHome -> Forms Developer -> Forms Builder.
  9. Open your form by browsing to the drive where your solaris home directory was mounted (i.e. Z:/...).
  10. When you are finished testing, exit Forms Builder.
  11. Stop the OC4J service by selecting Start -> All Programs -> Oracle Developer Suite - DevSuiteHome -> Forms Developer -> Stop OC4J Instance.
  12. Disconnect your mounted drive by opening a Windows Explorer window (see #2, above), and select the menu item Tools -> Disconnect Network Drive. Select your drive, and click "OK".
  13. Log out of the PC.
Changing Schema:
To change schema in sqlplus or iSQL*Plus, issue the following command:
ALTER SESSION SET CURRENT_SCHEMA = schema;
where "schema" is the name of the new schema you want. To confirm the schema you are working in, use this command (in sqlplus):
SELECT SYS_CONTEXT('USERENV','CURRENT_SCHEMA') FROM DUAL;
Note: USERENV is an Oracle provided namespace that describes the current session.
Week Lecture Topics Reading Homework Comments
6/26 - 6/29 Outline Introduction, Relational Databases,
Normalization, SQL*Plus
Chapters 1, 2 HW1 canceled
7/3 - 7/6 Outline Modeling/Design, Creating Accounts & Tables,
Modifying Data, Transactions, Triggers
Chapters 3, 4 HW2 due 7/7 No class 7/4
7/10 - 7/13 Outline Querying, Joins, Views Chapters 5, 6 HW3 due 7/14
7/17 - 7/20 Outline PL/SQL, Stored Procedures, Cursors Chapter 7 HW4 due 7/21 No class 7/17
7/24 - 7/27 Outline Security, Forms Chapters 12, 8 HW5 due 7/28
7/31 - 8/3 Outline Forms, Reports Chapters 8, 9, 10 HW6 due 8/4
8/7 - 8/10 Outline Integrated Oracle Applications
Java/JDBC, PHP, Python/Ruby
Web Application Development
Chapters 11, 9,
Supplementals
HW7 due 8/11
8/14 - 8/17 Outline Database Administration Chapter 13 Group projects presented
in class 8/15, 8/16 & 8/17

Valid XHTML 1.0 Strict