Oracle and SQL (CIS150/50)

Weekly Schedule

April 9th is the last day for students to withdraw from classes. If you are far behind you need to make a decision because I cannot give you a W. If you are wondering about withdrawing and have questions, please contact me and we can talk!

Please do not change your linux or Oracle passwords.

Essentially there are three ways for you to be able to work with Oracle:
1) Download the full version of Oracle and install it on your computer and work locally - that is what I have done
2) Work in the BCC labs with the BCC server installed Oracle
3) Access the BCC server installed Oracle from home using putty - there are instructions for that by Eric at my site.

Remember, all assignments including inclass assignments must be done by everyone - that includes online students and students who missed the class.. Play computer means to figure out the results yourself by evaluating the data rather than running the query. When you are asked to write code you should also show the results that the code generated unless specifically told not to.

If you get an assignment back without a grade you need to fix it and resubmit to get a grade.

Remember HELP is available on Zoom - see HELP section below.

The CIS pool is now available for students that need to access licensed software that they cannot use from home.
Remote access virtual desktop
Instructional video for using Remote Access Virtual Desktop - HTML

Schedule by weekInformation to cover
  Note that the audio and Smartboard presentations for each class are posted within a couple of days. This semester, please use 2019 audio and Smartboard since we do not meet in class.
Please check the weekly schedule multiple times a week, I sometimes add things during the course of the week. You need to pass in the code you write and the output that is produced unless you are told otherwise. Sometimes this involves showing data that was written to a file/table.
Play computer means to figure out the results yourself by evaluating the data rather than running the query.
Please keep copies of all work you submit until you receive your final grade at the end of the semester.
Comment on how I want the assignment: You should take the commands you do in SQL and the results and paste them into a word document. It should be similiar to the way I prepared the notes. You then send me the word document. I do not want you to show the screen itself - they are really hard to read!
HELP schedule I will set up some optional class Zoom meetings that you can attend. Check the week of information to see the times and dates.
Kevin is the tutor or SI for this class. I will send you the information about Kevin's Zoom address. Kevin is available Wed 10-12, Thurs 1-3. Sat 5-7 and Sunday 4-6.
My office hours are 1 on Monday, 10 on Tuesday, 1 on Wednesday, 10 on Thursday. I hold my office hours on Zoom. If it turns out other hours work better for students these may change, so check back. I am also available by request (give me a few time options) especially while we get other support in place. I have been meeting with a lot of students that request it, maybe something you should consider doing. You can email me with a couple of times you can meet and usually one of those will work.
I will send out the information to contact me on Zoom. I will post availability but you can also set something up with me.
Downloading WinSCP on your PC by SI Joe Fletcher
There is access to WiFi from your car under the solar canopies on the Fall River Campus.
Week #11
Week of April 12th

INFORMATION:

I really hope you were able to spend some time on cursors last week.

NOTES/EXAMPLES TO LOOK AT:

Another set of cursor examples
Some more examples:
payprog.sql
payprog1.sql
payprog2.sql
data.txt Data layout for studentchk.sql
studentchk.sql
createdonor.sql Script to create donor
donorcursor1.sql
donorcursor2.sql
donorcursor3.sql
decodecursor1.sql

ACCOMPANYING POWERPOINT PRESENTATIONS

Covers: Another set of cursor exampes
      Separate speaker notes for Another set of cursor examples

TOPIC VIDEOS:

Another set of cursor examples (prob 1)
Another set of cursor examples (prob 2)
Another set of cursor examples (prob 3)
Another set of cursor examples (prob 4)
Cursor examples involving payroll
Cursor examples involving donor DB

SMARTBOARD AND AUDIO NOTES FROM Spring 2020 and Fall 2019:

Still more cursors (11/5/19) Accompanying audio
Still more cursors (11/5/19) See notes under Smartboard presentation
Cursors and exceptions (11/12/19) Accompanying audio
Cursors and exceptions (11/12/19) See notes under Smartboard presentation

ASSIGNMENTS TO DO:

Please check back as usual!
Week #10
Week of April 5th

INFORMATION:

If you missed our discussion on Digital Forensics and Cyber Crimes: First-Hand Knowledge from an Expert in the Field or wanted to go back and re-watch it, please reference the following link to view the Zoom recording: Digital Forensics and Cyber Crimte
If you haven’t already registered for this week’s event on April 6 at 12:30PM discussing Extreme Privacy: How to Disappear in America it is not too late! You may do so via the following registration form: Register Here

Remember that there is a department wide advising session with CIS faculty. The sessions are Wednesday, April 7th from 4PM to 6PM and Thursday, April 8th from 8PM to 10PM. I have sent out the Zoom address, contact me if you do not have it. This is an excellent opportunity to ask CIS faculty questions about the curriculum and your schedule.

I can meet with you at 8 as always.
We are going to come back to Records and Table types because I think it will be better to lay the cursor foundation first. So we are going to look at Introduction to Cursors and Example 1 using cursors and its continuation.

NOTES/EXAMPLES TO LOOK AT:

Introduction to Cursors
Example of cursor with while
Example 1 using cursors
Continuing example 1 using cursors

ACCOMPANYING POWERPOINT PRESENTATIONS

Covers: Cursors in PL/SQL, cursor example and continuation of first cursor example
      Separate speaker notes for Cursors in PL/SQL, cursor example and continuation of first cursor example

TOPIC VIDEOS:

Introduction to Cursors
Example 1 using Cursor but I did it with the wrong data The explanation is good though!
Example 1 using Cursor with correct data
Example with While cursor

SMARTBOARD AND AUDIO NOTES FROM Spring 2020 and Fall 2019:

Data manipulation and intro cursors (10/29/19) Accompanying audio
Data manipulation and intro cursors (10/29/19) See notes under Smartboard presentation
More cursors (10/31/19) Accompanying audio
More cursors (10/31/19) See notes under Smartboard presentation

ASSIGNMENTS TO DO:

Work on understanding cursors.
Use cursors to solve this problem:
Problem #1: I want you to write a script that will handle the inven table and the department table. The script should accumulate the onhand for departments and write to a new table where you will store the dept, the department name and the total of the onhand. I would also like you to use the dbms lines to show the processing that happens. Everyone needs to turn in this script including the dbms output and a listing of what is on the new table. Do it doing the while structure
Problem #2: Re do using the loop structure.
Note that my example of two cursors using the drive table and the donation table will be very helpful in doing this.
Check back as always!
Week #9
Week of March 29th

INFORMATION:

David Papargiris, Director of Forensics Investigations for the Iron Mountain Corporation, is a national expert on Digital Forensics and a fascinating speaker. Try to attend his speech on March 30th from 12:30PM to 1:30 PM on Zoom.
Register Here
I will do a lecture on PL/SQL at 8:00 on Tuesday.

NOTES/EXAMPLES TO LOOK AT:

More on PL/SQL IF statements
Introduction to loops
Data manipulation in PL/SQL - introduction

ACCOMPANYING POWERPOINT PRESENTATIONS

More on PL/SQL IF statements
      Separate speaker notes for More on PL/SQL IF statements
Introduction to loops
      Separate speaker notes for Introduction to loops
Data manipulation in PL/SQL - introduction
      Separate speaker notes on Data manipulation in PL/SQL - introduction

TOPIC VIDEOS:

More on PL/SQL IF
Intro to Loops
Manipulating data
Loops examples with Joe Fletcher

SMARTBOARD AND AUDIO NOTES FROM Spring 2020 and Fall 2019:

Be sure to review the Intro PL/SQL - if and loop Smartboard and Audio under week #8.
Data manipulation and intro cursors (10/29/19) Accompanying audio
Data manipulation and intro cursors (10/29/19) See notes under Smartboard presentation

ASSIGNMENTS TO DO:

Oracle Loop Assignment
Oracle PL/SQL Intro Quiz

Check back!
Week #8
Week of March 22nd

INFORMATION:

On March 25th, a CIS Alum panel will be telling about their careers in IT: how they got there and what they do. They will be talking on Zoom starting at 12:00 and ending sometime between 1:00 and 1:30. Students always tell me how much they learn and how great it is to hear about the real world experiences of people in CIS from Bristol. Please try and attend - the give and take and opportunity for questions is better live on Zoom then in the video.
Registration for March 25th CIS Alum panel If you miss registration, email me for a direct link.
This week we will wrap up the introduction to SQL and move on to look at PL/SQL (Procedual Language/SQL).
Remember I can do Tuesday night at 8:00.

NOTES/EXAMPLES TO LOOK AT:

More on views
Information on database objects
Script for input data
Introduction to PL/SQL Just very briefly to look at the structure we will return to this in a week or so.
Introduction to IF statements

ACCOMPANYING POWERPOINT PRESENTATIONS

More on views
      Separate speaker notes for More on views
PL/SQL - Using IF statements
      Separate speaker notes for PL/SQL - Using IF statements

TOPIC VIDEOS:

More views
Sequence views etc
Input Script Example
Introduction to PL/SQL and IF statements

SMARTBOARD AND AUDIO NOTES FROM Spring 2020 and Fall 2019:

Wrapup SQL (10/17/19) Accompanying audio
Wrapup SQL (10/17/19) See notes under Smartboard presentation
Intro PL/SQL - if and loop (10/22/19) Accompanying audio
Intro PL/SQL - if and loops (10/22/19) See notes under Smartboard presentation

ASSIGNMENTS TO DO:

Finish Basic SQL
IF assignment
Check back!
Vacation Week
Week of March 15th
My office hours will be Tues and Thurs at 10 and Wed at 1. Check back for more. I will be available from 1-3 on Sunday.
Someone asked about next weeks assignments. Here is one of them: IF assignment using PL/SQL
Week #7
Week ofMarch 8thth

INFORMATION:

This week we will focus on indexes, constraints and keys. As always, the most important thing are the Notes that essentially make the textbook for this class.
Lecture from3/9/21 Passcode z9@%N+y^

NOTES/EXAMPLES TO LOOK AT:

Indexes in Oracle - An introduction
More on Primary and Foreign keys
Notes on key questions
Also please look at the accompanying presentations:

ACCOMPANYING POWERPOINT PRESENTATIONS

Indexes in Oracle - An Introduction
      Separate speaker notes for Indexes in Oracle - An Introduction
Primary and Foreign constraints with a relational database
      Separate speaker notes to accompany primary and foreign constraints with a relational database
More on Primary and Foreign Keys also info from questions
      Separate speaker notes for More on Primary and Foreign Keys etc.

TOPIC VIDEOS:

Indexes and constraints
Primary keys and foreign keys
Key and index notes

SMARTBOARD AND AUDIO NOTES FROM Spring 2020 and Fall 2019:

Review groups, relational, subqueries (10/8/19)
Keys and constraints (10/10/19) Accompanying audio
Keys and constraints (10/10/19) See notes under Smartboard

ASSIGNMENTS TO DO:

Oracle Key Example(this is a check off assignment) I want you to go through this example and do what I did so you follow and understand the concepts. Pass in your duplicate.
Key and index assignment
Check back!
Week #6
Week of March 1st

INFORMATION:

I hope you can make it to the CyberSecurity speech on March 2nd from 12:30 to 1:30. The topic is OSINT: The FBI's Secret Weapon to Bring the Capitol Rioters to Justice. The address to register CyberSecurity registration.
On Thursday, March 25th, a group of CIS at Bristol alum will speak on Zoom (probably my address) about there careers and Bristol. This is an event that students find very beneficial.
First there is more about subqueries. Next we will look at views and reports.

NOTES/EXAMPLES TO LOOK AT:

There was a question about equijoin and looking at my notes, I could have done better. Try these!
Equijoin notes
Nonequijoin notes
Some subquery examples to look at to make sure you understand subqueries:
A few more examples
And still more examples
Now we are going to move on to views and reports and more on scripts.
Introduction to views
Introduction to reports
Also please look at the accompanying presentations:

ACCOMPANYING POWERPOINT PRESENTATIONS

Introduction to views
      Separate speaker notes for Introduction to views
Introduction to Reports
      Separate speaker notes for Introduction to reports
Resource on reports
Scripts: To create a script use edit and the name of the script (.sql is added) and to run use @ scriptname or a slash.
createdonor.sql Script to create donor
Insert data into maintain table
Insert data into maintain table ver 2

TOPIC VIDEOS:

Introduction to views
Introduction to reports

SMARTBOARD AND AUDIO NOTES FROM Spring 2020 and Fall 2019:

Views and reports (10/3/19) Accompanying audio
Views and reports (10/3/19) See notes under Smartboard presentation

ASSIGNMENTS TO DO:

Views and Reports
Check back - a work in progress!
Week #5
Week of February 22nd

INFORMATION:

I have an eye infection problem so my eyes need some rest time during the day and I am continuing to get behind. Sorry!
Let me know if you want Zoom during my office hours and suggest other times if my office hours do not work and you need some Zoom time.
We are going to continue with Oracle and subqueries and variables and into maintenance and reports.

REVIEW EXAMPLES:

This is an example that you might find helpful dealing with subqueries:
Examples Solution
A few more examples

NOTES/EXAMPLES TO LOOK AT:

We started looking at variables and got through Using Input Variables and some of more on variables.
Using input variables
More on variables with Oracle's SQL*Plus
Table maintenance revisited (again)
Continuation of table maintenance revisited (again)

ACCOMPANYING POWERPOINT PRESENTATIONS

Using Input Variables
      Separate speaker notes for Using Input Variables
More on variables with Oracle's SQL*Plus
      Separate speaker notes for More on variables with Oracle's SQL*Plus
Table maintenance revisited (again)
      Separate speaker notes for Table maintenance revisted (again)
Continuation of table maintenance revisited (again)
      Separate speaker notes for Continuation of table maintenance revisted (again)

TOPIC VIDEOS:

Introduction to variables
More on variables
Maintain again
Maintain revisit again

SMARTBOARD AND AUDIO NOTES FROM Spring 2020 and Fall 2019:

Variables and maintenance (10/1/19)See accompanying audio
Variables and maintenance (10/1/19)See accompanying pdf

ASSIGNMENTS TO DO:

Coding assignment
Check back!
Week #4
Week of February 15th

INFORMATION:

I will be available for an option intro Oracle lecture Sunday at 8PM on Zoom - note it is evening not morning!!!!
This week I am trying having you contact me to meet on Zoom during my office hours if you want to meet. You can also contact me to set up a different time to meet on Zoom. Just a suggestion, not a requirement.
This is Enrollment Verification week and I have to verify you are in the class. If you have not passed in work or the email a week verifying you are in the class, then you need to contact me now to make sure you are not withdrawn from the class.

NOTES/EXAMPLES TO LOOK AT:

Using join
Join and where
Subqueries
More on subqueries

ACCOMPANYING POWERPOINT PRESENTATIONS

Zipped zersion of subqueries if you find a problem with version online.
Subqueries
      Separate speaker notes for subqueries
More on Subqueries
      Separate speaker notes for More on subqueries

TOPIC VIDEOS:

Using join to link tables
Accompany notes on Subqueries
Explanation of subqueries described in previous notes on subqueries
Presentation Feb 14th on intro material
Password: ^1yTykS%

SMARTBOARD AND AUDIO NOTES FROM Spring 2020 and Fall 2019:

Subqueries (9/24/19) Accompanying audio
More Subqueries (9/26/19) Accompanying audio
Subqueries (9/24/19) See notes under Smartboard presentation
More Subqueries (9/26/19) See notes under Smartboard presentation

ASSIGNMENTS TO DO:

Subquery Assignment
Subquery quiz
Week #3
Week of February 8th

INFORMATION:

There is a lot of support and you should definitely use it if you have questions or encounter a problem. We are hear to help you succeed! Please take advantage of that. If you want to meet me in Zoom, I am available during my office hours or we can set up another time if that works better and you think it would be helpful. However, if you want to meet during my office hours you need to let me know so I will be there rather than just online.
To repeat: If you need help with something, now would be the time to ask your questions!
We are going to start looking at the design of a database and the theory of relational databases. Please read information about third normal form and relational databases. Please read the handout on definitions: Normalization definitions
Normalization

NOTES/EXAMPLES TO LOOK AT:

Please read the two examples - the first two postings under notes.
Introduction to multiple tables (relational) - joins
Relational database examples
Example of non-equijoin: nonequijoin example to accompany notes
Also view the slide presentation on normalization information about relational databases:

ACCOMPANYING POWERPOINT PRESENTATIONS

Normalization - information on third normal form
      Separate speaker notes for normalization presentation
Relational database information - information on 1 to 1, 1 to M, and M to M
      Separate speaker notes for relational database information
Relational database notes and examples Goes with notes Introduction to multiple tables (relational) - joins - uses donor, donations and drive tables
      Separate speaker notes for relational database presentation

TOPIC VIDEOS:

Third Normal Form
Introduction to multiple tables (relational) - joins (accompanying notes)
Relational database examples (accompanying notes)

SMARTBOARD AND AUDIO NOTES FROM Spring 2020 and Fall 2019:

Oracle quiz and relational databases (9/17/19) Accompanying audio
Oracle quiz and relational databases (9/17/19) See notes under Smartboard presentation
Relational databases and intro subqueries (9/19/19) Accompanying audio
Relational databases and intro subqueries (9/19/19) See notes under Smartboard presentation

ASSIGNMENTS TO DO:

Oracle quiz Wk #3I am interested in having you play computer - I do not want you to use the computer to get the results. You can check your results if you want to, but please do it on your own.
Function assignment
In problem #1 just to be clear, I want you to take a name that has been written with the slash separator in the format last/first m and flip it so it has first m last using Oracle functions. Specifically it can be done using substr and instr.
Database Quiz Wk #3
Week #2
Week of February 1st

INFORMATION:

I will go to my Zoom area during office hours this week.
Please do not change any of the passwords we have given you. I need to be able to get to your site as does the IT staff if there is a problem.

NOTES/EXAMPLES TO LOOK AT:

These are the notes that I will attempt to get through this week.
More on maintaining an SQL table
SQL functions
More SQL functions
Group SQL functions

ACCOMPANYING POWERPOINT PRESENTATIONS

These PowerPoint presentations were made to accompany the notes.
More on maintaining an SQL table
      Separate speaker notes for More on maintaining an SQL table
SQL functions - part 1 character
      Separate speaker notes for SQL functions - part 1 characters
SQL functions - part 2 numeric & date
      Separate speaker notes for SQL functions - part 2 numeric & date
More SQL functions (includes DECODE, ways to edit SQL code and nested functions)
      Separate speaker notes for more SQL functions
Group functions
      Separate speaker notes for group functions

TOPIC VIDEOS:

Maintain Oracle
Character Functions in Oracle
Other kinds of Oracle Functions
Decode Function in Oracle
Group Functions in Oracle

SMARTBOARD AND AUDIO NOTES FROM Spring 2020 and Fall 2019:

Where, maintenace, functions in SQL (9/10/19) Check accompanying audio
Where, maintain, functions in SQL (9/10/19) See notes under Smartboard presentation
Functions and groups (9/12/19) Check accompanying audio
Functions and groups (9/12/19) See notes under Smartboard presentation

ASSIGNMENTS TO DO:

I am putting this up now because I wanted to give people time to sort out Oracle, but I can't wait any longer. I have not heard from some of you and I am getting concerned. Please contact Kevin or myself if you are having trouble getting into Oracle or executing the SQL.
Here is a script to create the emp table:
Script to create emp table (createemp.sql)
You can enter edit createemp.sql or another name at the SQL prompt. It will go into the editor and ask if you want to create a new script. Enter yes and paste the script in and save it. Return to the prompt and enter @ createemp.sql and it should run and create the table for you.
If you are using putty, remember to have the script text in notepad and highlight it. When you go into the editor the right click will paste it or you can uses shift + ins to paste. You can then write and exit. Back at the SQL prompt is where you run it with the @.
Second SQL assignment
Quiz on where with two parts:
First part I want you to play computer and show me the output you think would be generated as opposed to running the query and letting Oracle give you the answer. We will do a lot of play computer with the goal of making sure you understand the logic and how Oracle handles it.
Second part Note that you need to show me the SQL and the results on all of the part 2 quiz questions.
Week #1
Week of January 25th

INFORMATION:

Welcome to CIS150 Oracle and SQL For Fall 2020 A new one will be done for Spring 2021.
I recommend one of the text books in the syllabus if you like having a textbook, but a textbook is not required. There is enough material on the web and in my notes that I decided to make the book a recommendation. These books or another book dealing with Oracle SQL (we are using version 19c this semester) can be helpful as a reference.

LOGIN INFORMATION:

You can download Oracle, but that would not be my recommendation unless you are very experienced in complex downloads. Downloading Be very careful when you install, Oracle leaves a lot of footprints that makes reinstalling very difficult.

The first approach to running Oracle will involve using putty to access Oracle.
You should have received the login information you need for this course. If not, let me know.
Two sites that can be used to download PuTTY are:
PuTTY download
PuTTY download
Using Putty (copy and paste)
Basic steps to login to putty and get to Oracle:
1) Start putty and put in the hostname as cisweb.bristolcc.edu and the port as 220
2) At the login screen enter your username and your Linux password.
3) When you see that you are at cisweb, enter sqlplus19c.sh (some handouts have an older version, be sure to use sqlplus19c.sh)
4) You then connect to Oracle and need to enter your username and Oracle password
5) You should see the SQL prompt
Now you can create a table. Note that after you create tables, to see existing tables select table_name from user_tables.

NOTES/EXAMPLES TO LOOK AT:

Accompanying step-by-step notes
First we will focus on getting into Oracle and then these are the notes that we will start to cover this week:
Introduction to SQL in Oracle
Create a table in SQL
SQL Conditions
Note that in many of the notes, the dates are quite old. SQL is SQL is SQL. Changes tend to be at the high end and not at the beginning. These notes were written after my first Oracle training, I have been back but have not seen the need to change the examples. When things are different, I will enter additional notes.

ACCOMPANYING POWERPOINT PRESENTATIONS

Introduction to SQL in Oracle
      Separate speaker notes for Introduction to SQL in Oracle
Create a table in SQL
      Separate speaker notes for Create a table in SQL
SQL Conditions
      Separate speaker notes for SQL Conditions

TOPIC VIDEOS:

Video to accompany Introduction to SQL in Oracle
Video to accompany Create a table in SQL
Video of logging on using putty, establishing a table and testing it
Video to accompany SQL Conditions

SMARTBOARD AND AUDIO NOTES FROM Spring 2020 and Fall 2019:

These are lectures from last Spring and the previous Fall that I recorded. The accompanying Smartboard presentations show what was on the Smartboard and the audio includes my explanation.
Intro to Oracle (9/3/19) Smartboard notes with accompanying audio
Intro to Oracle (9/3/19) See notes under Smartboard presentation to accompany this audio
Putty and more SQL (9/5/19) Smartboard notes with accompanying audio
Putty and more SQL (9/5/19) See notes under Smartboard presentation to accompany this audio

ASSIGNMENTS TO DO:

NOTES: Note: You can use the commit command to make sure your work gets saved.
Copy from SQLPlus so you can paste it onto the document you are submitting as your assignent
All assignments must be turned in using the email addresses priscilla.grocer@bristolcc.edu with a cc to the email address I will send you. I like to have backup.
Your goal should be to get homework in on the Thursday after the week it was assigned.
I strongly urge you to do the COMMIT; after the table is created.
Oracle assignment on introductory material (html)
Oracle assignment on introductory material (doc)
Comment on how I want the assignment: You should take the commands you do in SQL and the results and paste them into a word document. It should be similiar to the way I prepared the notes. You then send me the word document. I do not want you to show the screen itself or pictures of the screen - they are really hard to read!
To repeat: For this semesters assignments, I need the code you write and the results unless there are other specifications in the assignment.


Priscilla.Grocer@bristolcc.edu

Back to the Top
Return to home page