SlideShare a Scribd company logo
CIS 336 Week 4 iLab 4 Devry University
Click this link to get the tutorial:
http://homeworkfox.com/tutorials/general-
questions/4152/cis-336-week-4-ilab-4-devry-university/
Lab 4 of 7: Building the Physical Model (28 points)

Submit your assignment to the Dropbox located on the silver tab at the top of this page. For
instructions on how to use the Dropbox, please click here.

(See Syllabus/"Due Dates for Assignments & Exams" for due dates.)

LABOVERVIEW

Scenario/Summary

Lab #4 will introduce the various aspects of the SQL select statement and the methods of
retrieving data from the database tables. The lab will utilize a set of tables found in the script file
(LeeBooks.sql) found in the Doc Sharing area of the website. You will need to download the file,
then run the script in your SQL*Plus session. These tables will be used for the remaining labs in
this class.

The SELECT statement is the primary means of extracting data from database tables, and allows
you to determine exactly which data you want to extract by means of different comparison
operators used in the WHERE clause. This includes the use of specific "wild card" characters
which allow you to search for character or number patterns within the data. You can also
perform mathematical expressions within the SELECT statement to create derived output. The
ORDER BY clause allows you to sort the output data in either ascending (the default) or
descending order. Lab #4 will explore all of these applications of the SELECT statement.

General Lab Information and Considerations

Each query in the script file you will create must be numbered (use - -1 comments for
numbering) and listed in order. The SQL for the following exercises should be written using
Notepad and run in SQL*Plus. Read each problem carefully and follow the directions as stated.

A Clean Script File:

A script file is meant to be like a program. The file can be run every time the code needs to be
executed without having to retype the code again each time. For this reason, it is important that
there are no errors in the code inside the file. You can go back and forth between Notepad and
Oracle when creating your script file to check your queries and verify if they work or not, but
you do not want to create your final output file until after you have verified that everything in
your script is correct by running it, in its entirety at least once and viewing the output. Once this
has been done, you can create your final output file, with echo on to create the document you can
turn in with your lab. Remember in using a spool session, you must type "SPOOL OFF" at the
SQL> prompt after your script stops spooling to capture all of your data!

Lab Do's and Don’t's

Do Not include the LEEBOOKS.SQL as part of your lab script.

Do use Notepad to write your query script file.

Do Not write your queries in Word.

Do test each query before moving on to the next.

Do Not include extra queries for a problem unless the problem explicitly asks for more than one
query.

Do test your queries before creating your final output file.

Do Not turn in a script file that has queries with errors.

Do number each query using - -1 comment notation.

Do Not start your query on the same line as the comment.

Do remember to check your final output and script file for accuracy.

Do Not turn in your lab without first checking your output file to verify that it is correct.

Things to keep in mind:

If you are not sure of the table names in your user schema, you can use the following select
statement to list them.

SELECT * FROM TAB;

If you want to know the name of the columns in a particular table, you can use the following
command to list them.

DESC

Making a script file containing a series of describe statements for each table and then spooling
the output will give you a listing of all the tables with column names.
Be sure to review and verify your final output when you are finished. DO NOT assume anything.

Write queries for each of the stated problems in the steps below that will return a result set of
data to satisfy the requirements. When finished, your script file should have a total of 13 queries
and your resulting output file should show both the query and result set for each.

Deliverables

The deliverable for this lab will include:

Your script file with the 13 queries in it. Be sure your name, course number, and lab number are
in a comment area at the top of your file.

An output file created using SET ECHO ON showing both the SQL code and the results.

Both documents are to be zipped into a single file before submitting to the iLab Dropbox for
Week 4.

LABSTEPS

STEP 1:

Using the BOOKS table, write a query that will list the categories for the books in inventory. List
each category only once in your result set.

STEP 2:

Using the BOOKS table, write a query that will list the title and publisher ID for each book in the
table. Use the column heading of "Publisher ID" for the pubid field.

STEP 3:

Using the BOOKS table, write a query that will list the book title, retail price, and the amount of
markup for each book. The amount of markup is the retail price minus the cost. Use the column
heading “Price Markup” for the arithmetic expression column.

STEP 4:

Using the BOOK_CUSTOMER table, write a query that will list the customer’s first name, last
name, and city for those customers living in zip code 31206.

STEP 5:

Using the BOOK_ORDER table, write a query that will list everything about the orders placed
prior to April 2, 2009.
STEP 6:

Using the BOOK_ORDER table, write a query that will list everything about the orders that have
not been shipped yet.

STEP 7:

Using the BOOK_CUSTOMER table, write a query using the AND and OR operators that will
list the customer information for those customers living in either Florida or New Jersey who
have not been referred by another customer.

STEP 8:

Using the BOOKS table, write a query that will list all information about those books that are not
computer books and do not cost more than $30.00 retail.

STEP 9:

Using the AUTHOR table, write a query that will list all information about authors whose first
name ends with an “A”. Put the results in descending order of last name, and then ascending
order by first name. This should be done using a single query.

STEP 10:

Using the BOOK_ORDER table, write a query using the > and < operators that will list the
orders that were placed between April 1, 2009 and April 4, 2009. Only show the orders for April
2nd and 3rd in your result set.

STEP 11:

Using the BOOK_ORDER table, write a query that will list the orders that were placed between
April 2, 2009 and April 4, 2009 including those placed on the 2nd and 4th. Use a different
approach (operator) in writing this query than used in the query for #10, that is, do not use > and
< signs in your query.

STEP 12:

Using the BOOKS table, write a query that will list the book title, publisher ID, and published
date for all books that were published by publisher 4 or after January 1, 2001. Order the results in
ascending order by publisher ID and give the publish date and publisher ID columns meaningful
titles.

STEP 13:

Many organizations use percentage of markup (e.g., profit margin) when analyzing financial
data. To determine the percentage of markup for a particular item, simply subtract the cost for
the item from the retail price to obtain the dollar amount of profit, and then divide the profit by
the cost of the item. The resulting solution is then multiplied by 100 to determine the percent of
markup. Using a SELECT statement, display the title of each book and its percent of markup.
For the column displaying the percent of markup, use “Markup %” as the column heading.

This is the end of lab #4

More Related Content

What's hot

RefWorks How to version 1
RefWorks How to version 1RefWorks How to version 1
RefWorks How to version 1
Traciwm
 
RefWorks Basics
RefWorks BasicsRefWorks Basics
RefWorks Basics
Michele Laing
 
SPSS
SPSSSPSS
Getting Started with SharePoint Status Indicators - EPC Group
Getting Started with SharePoint Status Indicators - EPC GroupGetting Started with SharePoint Status Indicators - EPC Group
Getting Started with SharePoint Status Indicators - EPC Group
EPC Group
 
EndNote X2 Workshop for FASS Graduate Students
EndNote X2 Workshop for FASS Graduate StudentsEndNote X2 Workshop for FASS Graduate Students
EndNote X2 Workshop for FASS Graduate Students
NUS Libraries
 
Phpmyadmin administer mysql
Phpmyadmin administer mysqlPhpmyadmin administer mysql
Phpmyadmin administer mysql
Mohd yasin Karim
 
Abap
AbapAbap
Abap
ramraj100
 
Ref Works Training Staff1
Ref Works Training Staff1Ref Works Training Staff1
Ref Works Training Staff1
Monash University ( South Africa )
 
6 ref works 2.0 search online databases in refworks 2.0
6 ref works 2.0 search online databases in refworks 2.06 ref works 2.0 search online databases in refworks 2.0
6 ref works 2.0 search online databases in refworks 2.0
UCT
 
Oracle 10g Forms Lesson 9
Oracle 10g Forms Lesson 9Oracle 10g Forms Lesson 9
Oracle 10g Forms Lesson 9
KAMA3
 

What's hot (10)

RefWorks How to version 1
RefWorks How to version 1RefWorks How to version 1
RefWorks How to version 1
 
RefWorks Basics
RefWorks BasicsRefWorks Basics
RefWorks Basics
 
SPSS
SPSSSPSS
SPSS
 
Getting Started with SharePoint Status Indicators - EPC Group
Getting Started with SharePoint Status Indicators - EPC GroupGetting Started with SharePoint Status Indicators - EPC Group
Getting Started with SharePoint Status Indicators - EPC Group
 
EndNote X2 Workshop for FASS Graduate Students
EndNote X2 Workshop for FASS Graduate StudentsEndNote X2 Workshop for FASS Graduate Students
EndNote X2 Workshop for FASS Graduate Students
 
Phpmyadmin administer mysql
Phpmyadmin administer mysqlPhpmyadmin administer mysql
Phpmyadmin administer mysql
 
Abap
AbapAbap
Abap
 
Ref Works Training Staff1
Ref Works Training Staff1Ref Works Training Staff1
Ref Works Training Staff1
 
6 ref works 2.0 search online databases in refworks 2.0
6 ref works 2.0 search online databases in refworks 2.06 ref works 2.0 search online databases in refworks 2.0
6 ref works 2.0 search online databases in refworks 2.0
 
Oracle 10g Forms Lesson 9
Oracle 10g Forms Lesson 9Oracle 10g Forms Lesson 9
Oracle 10g Forms Lesson 9
 

Viewers also liked

Προκαταρκτικό Πρόγραμμα Ημερίδας
Προκαταρκτικό Πρόγραμμα Ημερίδας Προκαταρκτικό Πρόγραμμα Ημερίδας
Προκαταρκτικό Πρόγραμμα Ημερίδας
Evita Gantina
 
Unit 73 ig1 assignment computer game audio cut sequence production 2013_y2
Unit 73 ig1 assignment computer game audio cut sequence production 2013_y2Unit 73 ig1 assignment computer game audio cut sequence production 2013_y2
Unit 73 ig1 assignment computer game audio cut sequence production 2013_y2
warburton9191
 
Apa itu artritis gout
Apa itu artritis goutApa itu artritis gout
Apa itu artritis gout
Mona Indah
 
Search engines
Search enginesSearch engines
Search engines
Anshuman Tyagi
 
Ο Τοκετός Σήμερα. Πού και Πώς;
Ο Τοκετός Σήμερα. Πού και Πώς;Ο Τοκετός Σήμερα. Πού και Πώς;
Ο Τοκετός Σήμερα. Πού και Πώς;
Evita Gantina
 
Audience Research Questions - Results
Audience Research Questions - ResultsAudience Research Questions - Results
Audience Research Questions - Results
Madigan Hughes
 
DJ Mag/Mixmag Case Studies
DJ Mag/Mixmag Case StudiesDJ Mag/Mixmag Case Studies
DJ Mag/Mixmag Case Studies
db04803167
 
Bulgaria
BulgariaBulgaria
Bulgaria
Nikolay Minev
 
Dimov
DimovDimov
Students Perceptions of a Grading Contract Model
Students Perceptions of a Grading  Contract ModelStudents Perceptions of a Grading  Contract Model
Students Perceptions of a Grading Contract Model
Nayelee Villanueva
 
WJPR 4588
WJPR 4588WJPR 4588
WJPR 4588
SUMANT LAD
 
Project reclamation
Project reclamationProject reclamation
Project reclamation
vkratan80
 
Mauçapémasos le village
Mauçapémasos le villageMauçapémasos le village
Mauçapémasos le village
Comune di San Prospero
 
Chimney one go
Chimney one goChimney one go
Chimney one go
Anshuman Tyagi
 
Le Pluriel Des Noms
Le Pluriel Des NomsLe Pluriel Des Noms
Le Pluriel Des Noms
Comune di San Prospero
 
Presentation on well point system
Presentation on well point systemPresentation on well point system
Presentation on well point system
Anshuman Tyagi
 
Thermal Power Plant Basic to Knowledge
Thermal Power Plant Basic to KnowledgeThermal Power Plant Basic to Knowledge
Thermal Power Plant Basic to Knowledge
Anshuman Tyagi
 

Viewers also liked (20)

Προκαταρκτικό Πρόγραμμα Ημερίδας
Προκαταρκτικό Πρόγραμμα Ημερίδας Προκαταρκτικό Πρόγραμμα Ημερίδας
Προκαταρκτικό Πρόγραμμα Ημερίδας
 
Unit 73 ig1 assignment computer game audio cut sequence production 2013_y2
Unit 73 ig1 assignment computer game audio cut sequence production 2013_y2Unit 73 ig1 assignment computer game audio cut sequence production 2013_y2
Unit 73 ig1 assignment computer game audio cut sequence production 2013_y2
 
Programma in italia
Programma in italiaProgramma in italia
Programma in italia
 
Apa itu artritis gout
Apa itu artritis goutApa itu artritis gout
Apa itu artritis gout
 
Search engines
Search enginesSearch engines
Search engines
 
Ο Τοκετός Σήμερα. Πού και Πώς;
Ο Τοκετός Σήμερα. Πού και Πώς;Ο Τοκετός Σήμερα. Πού και Πώς;
Ο Τοκετός Σήμερα. Πού και Πώς;
 
Audience Research Questions - Results
Audience Research Questions - ResultsAudience Research Questions - Results
Audience Research Questions - Results
 
Wagon tippler
Wagon tipplerWagon tippler
Wagon tippler
 
DJ Mag/Mixmag Case Studies
DJ Mag/Mixmag Case StudiesDJ Mag/Mixmag Case Studies
DJ Mag/Mixmag Case Studies
 
Bulgaria
BulgariaBulgaria
Bulgaria
 
Dimov
DimovDimov
Dimov
 
Students Perceptions of a Grading Contract Model
Students Perceptions of a Grading  Contract ModelStudents Perceptions of a Grading  Contract Model
Students Perceptions of a Grading Contract Model
 
WJPR 4588
WJPR 4588WJPR 4588
WJPR 4588
 
Project reclamation
Project reclamationProject reclamation
Project reclamation
 
Mauçapémasos le village
Mauçapémasos le villageMauçapémasos le village
Mauçapémasos le village
 
L'évolution de la langue française
L'évolution de la langue françaiseL'évolution de la langue française
L'évolution de la langue française
 
Chimney one go
Chimney one goChimney one go
Chimney one go
 
Le Pluriel Des Noms
Le Pluriel Des NomsLe Pluriel Des Noms
Le Pluriel Des Noms
 
Presentation on well point system
Presentation on well point systemPresentation on well point system
Presentation on well point system
 
Thermal Power Plant Basic to Knowledge
Thermal Power Plant Basic to KnowledgeThermal Power Plant Basic to Knowledge
Thermal Power Plant Basic to Knowledge
 

Similar to Cis336 week 4 i lab 4

Cis336 week 5 i lab5
Cis336 week 5 i lab5Cis336 week 5 i lab5
Cis336 week 5 i lab5
xcvxbdfbdf
 
Cis336 week 5 i lab5
Cis336 week 5 i lab5Cis336 week 5 i lab5
Cis336 week 5 i lab5
acascascascsaf
 
Cis336 week 5 i lab5
Cis336 week 5 i lab5Cis336 week 5 i lab5
Cis336 week 5 i lab5
dfgdfgscorpions123
 
Cis336 week 5 i lab5
Cis336 week 5 i lab5Cis336 week 5 i lab5
Cis336 week 5 i lab5
wefsfewf
 
Cis336 week 5 i lab5
Cis336 week 5 i lab5Cis336 week 5 i lab5
Cis336 week 5 i lab5
scorpions123rgerg
 
Cis336 week 5 i lab 5
Cis336 week 5 i lab 5Cis336 week 5 i lab 5
Cis336 week 5 i lab 5
CIS339
 
Cis336 week 5 i lab 5
Cis336 week 5 i lab 5Cis336 week 5 i lab 5
Cis336 week 5 i lab 5
jskdhklsduopuo0980
 
Cis336 week 5 i lab 5
Cis336 week 5 i lab 5Cis336 week 5 i lab 5
Cis336 week 5 i lab 5
jackiechaner
 
Cis336 week 7 i lab 7
Cis336 week 7 i lab 7Cis336 week 7 i lab 7
Cis336 week 7 i lab 7
CIS339
 
ECET 450 Laboratory 2Lab 2 involves two parts.Part A involv.docx
ECET 450 Laboratory 2Lab 2 involves two parts.Part A involv.docxECET 450 Laboratory 2Lab 2 involves two parts.Part A involv.docx
ECET 450 Laboratory 2Lab 2 involves two parts.Part A involv.docx
jenkinsmandie
 
Using macros.pptx
Using macros.pptxUsing macros.pptx
Using macros.pptx
Katrina Pritchard
 
POS/409 ENTIRE CLASS UOP TUTORIALS
POS/409 ENTIRE CLASS UOP TUTORIALSPOS/409 ENTIRE CLASS UOP TUTORIALS
POS/409 ENTIRE CLASS UOP TUTORIALS
Sharon Reynolds
 
Bis 345-week-4-i lab-new
Bis 345-week-4-i lab-newBis 345-week-4-i lab-new
Bis 345-week-4-i lab-new
assignmentcloud85
 
CIS 336 (DEVRY) Entire Course NEW
CIS 336 (DEVRY) Entire Course NEWCIS 336 (DEVRY) Entire Course NEW
CIS 336 (DEVRY) Entire Course NEW
shyamuopuop
 
Luke Cushanick Admin Tips and Tricks for Salesforce Trailblazer Community Chr...
Luke Cushanick Admin Tips and Tricks for Salesforce Trailblazer Community Chr...Luke Cushanick Admin Tips and Tricks for Salesforce Trailblazer Community Chr...
Luke Cushanick Admin Tips and Tricks for Salesforce Trailblazer Community Chr...
Anna Loughnan Colquhoun
 
BUSI 301 Book Review RubricScoreCommentsResearch 25.docx
BUSI 301 Book Review RubricScoreCommentsResearch 25.docxBUSI 301 Book Review RubricScoreCommentsResearch 25.docx
BUSI 301 Book Review RubricScoreCommentsResearch 25.docx
humphrieskalyn
 
ECET 450 Laboratory 2Part BPurposeThis laborato.docx
ECET 450 Laboratory 2Part BPurposeThis laborato.docxECET 450 Laboratory 2Part BPurposeThis laborato.docx
ECET 450 Laboratory 2Part BPurposeThis laborato.docx
jack60216
 
Advanced Spreadsheet Skills-1.pptx
Advanced Spreadsheet Skills-1.pptxAdvanced Spreadsheet Skills-1.pptx
Advanced Spreadsheet Skills-1.pptx
CliffordBorromeo
 
Pl lab solution
Pl lab solutionPl lab solution
Pl lab solution
Ashwin Kumar
 
Comp 220 ilab 5 of 7
Comp 220 ilab 5 of 7Comp 220 ilab 5 of 7
Comp 220 ilab 5 of 7
ashhadiqbal
 

Similar to Cis336 week 4 i lab 4 (20)

Cis336 week 5 i lab5
Cis336 week 5 i lab5Cis336 week 5 i lab5
Cis336 week 5 i lab5
 
Cis336 week 5 i lab5
Cis336 week 5 i lab5Cis336 week 5 i lab5
Cis336 week 5 i lab5
 
Cis336 week 5 i lab5
Cis336 week 5 i lab5Cis336 week 5 i lab5
Cis336 week 5 i lab5
 
Cis336 week 5 i lab5
Cis336 week 5 i lab5Cis336 week 5 i lab5
Cis336 week 5 i lab5
 
Cis336 week 5 i lab5
Cis336 week 5 i lab5Cis336 week 5 i lab5
Cis336 week 5 i lab5
 
Cis336 week 5 i lab 5
Cis336 week 5 i lab 5Cis336 week 5 i lab 5
Cis336 week 5 i lab 5
 
Cis336 week 5 i lab 5
Cis336 week 5 i lab 5Cis336 week 5 i lab 5
Cis336 week 5 i lab 5
 
Cis336 week 5 i lab 5
Cis336 week 5 i lab 5Cis336 week 5 i lab 5
Cis336 week 5 i lab 5
 
Cis336 week 7 i lab 7
Cis336 week 7 i lab 7Cis336 week 7 i lab 7
Cis336 week 7 i lab 7
 
ECET 450 Laboratory 2Lab 2 involves two parts.Part A involv.docx
ECET 450 Laboratory 2Lab 2 involves two parts.Part A involv.docxECET 450 Laboratory 2Lab 2 involves two parts.Part A involv.docx
ECET 450 Laboratory 2Lab 2 involves two parts.Part A involv.docx
 
Using macros.pptx
Using macros.pptxUsing macros.pptx
Using macros.pptx
 
POS/409 ENTIRE CLASS UOP TUTORIALS
POS/409 ENTIRE CLASS UOP TUTORIALSPOS/409 ENTIRE CLASS UOP TUTORIALS
POS/409 ENTIRE CLASS UOP TUTORIALS
 
Bis 345-week-4-i lab-new
Bis 345-week-4-i lab-newBis 345-week-4-i lab-new
Bis 345-week-4-i lab-new
 
CIS 336 (DEVRY) Entire Course NEW
CIS 336 (DEVRY) Entire Course NEWCIS 336 (DEVRY) Entire Course NEW
CIS 336 (DEVRY) Entire Course NEW
 
Luke Cushanick Admin Tips and Tricks for Salesforce Trailblazer Community Chr...
Luke Cushanick Admin Tips and Tricks for Salesforce Trailblazer Community Chr...Luke Cushanick Admin Tips and Tricks for Salesforce Trailblazer Community Chr...
Luke Cushanick Admin Tips and Tricks for Salesforce Trailblazer Community Chr...
 
BUSI 301 Book Review RubricScoreCommentsResearch 25.docx
BUSI 301 Book Review RubricScoreCommentsResearch 25.docxBUSI 301 Book Review RubricScoreCommentsResearch 25.docx
BUSI 301 Book Review RubricScoreCommentsResearch 25.docx
 
ECET 450 Laboratory 2Part BPurposeThis laborato.docx
ECET 450 Laboratory 2Part BPurposeThis laborato.docxECET 450 Laboratory 2Part BPurposeThis laborato.docx
ECET 450 Laboratory 2Part BPurposeThis laborato.docx
 
Advanced Spreadsheet Skills-1.pptx
Advanced Spreadsheet Skills-1.pptxAdvanced Spreadsheet Skills-1.pptx
Advanced Spreadsheet Skills-1.pptx
 
Pl lab solution
Pl lab solutionPl lab solution
Pl lab solution
 
Comp 220 ilab 5 of 7
Comp 220 ilab 5 of 7Comp 220 ilab 5 of 7
Comp 220 ilab 5 of 7
 

More from 7Fase1

Cis336 week 2 i lab 2
Cis336 week 2 i lab 2Cis336 week 2 i lab 2
Cis336 week 2 i lab 2
7Fase1
 
Cis336 week 1 i lab 1
Cis336 week 1 i lab 1Cis336 week 1 i lab 1
Cis336 week 1 i lab 1
7Fase1
 
Cis336 all i labs week 1 to week 7 devry university
Cis336 all i labs week 1 to week 7 devry universityCis336 all i labs week 1 to week 7 devry university
Cis336 all i labs week 1 to week 7 devry university
7Fase1
 
Cmgt410
Cmgt410Cmgt410
Cmgt410
7Fase1
 
Cmgt 410 week 4 individual assignment project controls
Cmgt 410 week 4 individual assignment project controlsCmgt 410 week 4 individual assignment project controls
Cmgt 410 week 4 individual assignment project controls
7Fase1
 
Cmgt 410 week 2 individual assignment project task
Cmgt 410 week 2 individual assignment project taskCmgt 410 week 2 individual assignment project task
Cmgt 410 week 2 individual assignment project task
7Fase1
 

More from 7Fase1 (10)

Doc1
Doc1Doc1
Doc1
 
Doc1
Doc1Doc1
Doc1
 
Doc1
Doc1Doc1
Doc1
 
Cis336 week 2 i lab 2
Cis336 week 2 i lab 2Cis336 week 2 i lab 2
Cis336 week 2 i lab 2
 
Cis336 week 1 i lab 1
Cis336 week 1 i lab 1Cis336 week 1 i lab 1
Cis336 week 1 i lab 1
 
Cis336 all i labs week 1 to week 7 devry university
Cis336 all i labs week 1 to week 7 devry universityCis336 all i labs week 1 to week 7 devry university
Cis336 all i labs week 1 to week 7 devry university
 
Cmgt410
Cmgt410Cmgt410
Cmgt410
 
Cmgt 410 week 4 individual assignment project controls
Cmgt 410 week 4 individual assignment project controlsCmgt 410 week 4 individual assignment project controls
Cmgt 410 week 4 individual assignment project controls
 
Cmgt 410 week 2 individual assignment project task
Cmgt 410 week 2 individual assignment project taskCmgt 410 week 2 individual assignment project task
Cmgt 410 week 2 individual assignment project task
 
Doc1
Doc1Doc1
Doc1
 

Recently uploaded

LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
danishmna97
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems S.M.S.A.
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
Neo4j
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
KAMESHS29
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
DianaGray10
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
Kumud Singh
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
Neo4j
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Aggregage
 

Recently uploaded (20)

LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
 

Cis336 week 4 i lab 4

  • 1. CIS 336 Week 4 iLab 4 Devry University Click this link to get the tutorial: http://homeworkfox.com/tutorials/general- questions/4152/cis-336-week-4-ilab-4-devry-university/ Lab 4 of 7: Building the Physical Model (28 points) Submit your assignment to the Dropbox located on the silver tab at the top of this page. For instructions on how to use the Dropbox, please click here. (See Syllabus/"Due Dates for Assignments & Exams" for due dates.) LABOVERVIEW Scenario/Summary Lab #4 will introduce the various aspects of the SQL select statement and the methods of retrieving data from the database tables. The lab will utilize a set of tables found in the script file (LeeBooks.sql) found in the Doc Sharing area of the website. You will need to download the file, then run the script in your SQL*Plus session. These tables will be used for the remaining labs in this class. The SELECT statement is the primary means of extracting data from database tables, and allows you to determine exactly which data you want to extract by means of different comparison operators used in the WHERE clause. This includes the use of specific "wild card" characters which allow you to search for character or number patterns within the data. You can also perform mathematical expressions within the SELECT statement to create derived output. The ORDER BY clause allows you to sort the output data in either ascending (the default) or descending order. Lab #4 will explore all of these applications of the SELECT statement. General Lab Information and Considerations Each query in the script file you will create must be numbered (use - -1 comments for numbering) and listed in order. The SQL for the following exercises should be written using Notepad and run in SQL*Plus. Read each problem carefully and follow the directions as stated. A Clean Script File: A script file is meant to be like a program. The file can be run every time the code needs to be executed without having to retype the code again each time. For this reason, it is important that there are no errors in the code inside the file. You can go back and forth between Notepad and Oracle when creating your script file to check your queries and verify if they work or not, but
  • 2. you do not want to create your final output file until after you have verified that everything in your script is correct by running it, in its entirety at least once and viewing the output. Once this has been done, you can create your final output file, with echo on to create the document you can turn in with your lab. Remember in using a spool session, you must type "SPOOL OFF" at the SQL> prompt after your script stops spooling to capture all of your data! Lab Do's and Don’t's Do Not include the LEEBOOKS.SQL as part of your lab script. Do use Notepad to write your query script file. Do Not write your queries in Word. Do test each query before moving on to the next. Do Not include extra queries for a problem unless the problem explicitly asks for more than one query. Do test your queries before creating your final output file. Do Not turn in a script file that has queries with errors. Do number each query using - -1 comment notation. Do Not start your query on the same line as the comment. Do remember to check your final output and script file for accuracy. Do Not turn in your lab without first checking your output file to verify that it is correct. Things to keep in mind: If you are not sure of the table names in your user schema, you can use the following select statement to list them. SELECT * FROM TAB; If you want to know the name of the columns in a particular table, you can use the following command to list them. DESC Making a script file containing a series of describe statements for each table and then spooling the output will give you a listing of all the tables with column names.
  • 3. Be sure to review and verify your final output when you are finished. DO NOT assume anything. Write queries for each of the stated problems in the steps below that will return a result set of data to satisfy the requirements. When finished, your script file should have a total of 13 queries and your resulting output file should show both the query and result set for each. Deliverables The deliverable for this lab will include: Your script file with the 13 queries in it. Be sure your name, course number, and lab number are in a comment area at the top of your file. An output file created using SET ECHO ON showing both the SQL code and the results. Both documents are to be zipped into a single file before submitting to the iLab Dropbox for Week 4. LABSTEPS STEP 1: Using the BOOKS table, write a query that will list the categories for the books in inventory. List each category only once in your result set. STEP 2: Using the BOOKS table, write a query that will list the title and publisher ID for each book in the table. Use the column heading of "Publisher ID" for the pubid field. STEP 3: Using the BOOKS table, write a query that will list the book title, retail price, and the amount of markup for each book. The amount of markup is the retail price minus the cost. Use the column heading “Price Markup” for the arithmetic expression column. STEP 4: Using the BOOK_CUSTOMER table, write a query that will list the customer’s first name, last name, and city for those customers living in zip code 31206. STEP 5: Using the BOOK_ORDER table, write a query that will list everything about the orders placed prior to April 2, 2009.
  • 4. STEP 6: Using the BOOK_ORDER table, write a query that will list everything about the orders that have not been shipped yet. STEP 7: Using the BOOK_CUSTOMER table, write a query using the AND and OR operators that will list the customer information for those customers living in either Florida or New Jersey who have not been referred by another customer. STEP 8: Using the BOOKS table, write a query that will list all information about those books that are not computer books and do not cost more than $30.00 retail. STEP 9: Using the AUTHOR table, write a query that will list all information about authors whose first name ends with an “A”. Put the results in descending order of last name, and then ascending order by first name. This should be done using a single query. STEP 10: Using the BOOK_ORDER table, write a query using the > and < operators that will list the orders that were placed between April 1, 2009 and April 4, 2009. Only show the orders for April 2nd and 3rd in your result set. STEP 11: Using the BOOK_ORDER table, write a query that will list the orders that were placed between April 2, 2009 and April 4, 2009 including those placed on the 2nd and 4th. Use a different approach (operator) in writing this query than used in the query for #10, that is, do not use > and < signs in your query. STEP 12: Using the BOOKS table, write a query that will list the book title, publisher ID, and published date for all books that were published by publisher 4 or after January 1, 2001. Order the results in ascending order by publisher ID and give the publish date and publisher ID columns meaningful titles. STEP 13: Many organizations use percentage of markup (e.g., profit margin) when analyzing financial data. To determine the percentage of markup for a particular item, simply subtract the cost for
  • 5. the item from the retail price to obtain the dollar amount of profit, and then divide the profit by the cost of the item. The resulting solution is then multiplied by 100 to determine the percent of markup. Using a SELECT statement, display the title of each book and its percent of markup. For the column displaying the percent of markup, use “Markup %” as the column heading. This is the end of lab #4