SlideShare a Scribd company logo
1 of 29
MET CS 669 Database Design and Implementation for Business
Lab 5: Subqueries
Overview of the Lab
In this lab we learn to work with subqueries, which significantly
extend the expressional power of queries. Through the use of
subqueries, a single query can extract result sets that could not
be extracted without subqueries. Subqueries enable the query
creator to ask the database for many complex structures in a
single query. This lab teaches you the mechanics crafting SQL
queries that harness the power of subqueries to handle more
complex use cases.
From a technical perspective, together, we will learn:
· what correlated and uncorrelated subqueries are and the theory
supporting both.
· to use subqueries that return a single value, a list of values,
and a table of values.
· to use subqueries that use aggregation.
· to address use cases by using uncorrelated subqueries in the
column select list, the where clause, and the from clause.
· to address use cases by using correlated subqueries and an
EXIST clause in the WHERE clause.
Lab 5 Explanations Reminder
As a reminder, it is important to read through the Lab 5
Explanation document to successfully complete this lab,
available in the assignment inbox alongside this lab. The
explanation document illustrates how to correctly execute each
SQL construct step-by-step, and explains important theoretical
and practical details.
Other Reminders
· The examples in this lab will execute in modern versions of
Oracle, Microsoft SQL Server, and PostgreSQL as is.
· The screenshots in this lab display execution of SQL in the
default SQL clients supported in the course – Oracle SQL
Developer, SQL Server Management Studio, and pgAdmin – but
your screenshots may vary somewhat as different version of
these clients are released.
· Don’t forget to commit your changes if you work on the lab in
different sittings, using the “COMMIT” command, so that you
do not lose your work.
Section One – Subqueries
Section Background
In this lab, you will practice crafting subqueries for the schema
illustrated below.
This schema’s structure supports basic medical product and
currency information for an international medical supplier,
including store locations, the products they sell, shipping
offerings, the currency each location accepts, as well as
conversion factors for converting from U.S. dollars into the
accepted currency. Due to the specific and technical nature of
the names of medical products, the supplier also keeps a list of
alternative names for each product that may help customers
identify them. This schema models prices and exchange rates at
a specific point in time. While a real-world schema would make
provision for changes to prices and exchange rates over time,
the tables needed to support this have been intentionally
excluded from our schema, because their addition would add
unneeded complexity on your journey of learning subqueries,
expressions, and value manipulation. The schema has just the
right amount of complexity for your learning.
The data for the tables is listed below.
Currencies
Name
Ratio
British Pound
0.67
Canadian Dollar
1.34
US Dollar
1.00
Euro
0.92
Mexican Peso
16.76
Store Locations
Name
Currency
Berlin Extension
Euro
Cancun Extension
Mexican Peso
London Extension
British Pound
New York Extension
US Dollar
Toronto Extension
Canadian Dollar
Product
Name
US Dollar Price
Glucometer
$50
Bag Valve Mask
$25
Digital Thermometer
$250
Electronic Stethoscope
$350
Handheld Pulse Oximeter
$450
Sells
Store Location
Product
Berlin Extension
Glucometer
Berlin Extension
Bag Valve Mask
Berlin Extension
Digital Thermometer
Berlin Extension
Handheld Pulse Oximeter
Cancun Extension
Bag Valve Mask
Cancun Extension
Digital Thermometer
Cancun Extension
Handheld Pulse Oximeter
London Extension
Glucometer
London Extension
Bag Valve Mask
London Extension
Digital Thermometer
London Extension
Electronic Stethoscope
London Extension
Handheld Pulse Oximeter
New York Extension
Glucometer
New York Extension
Bag Valve Mask
New York Extension
Digital Thermometer
New York Extension
Electronic Stethoscope
New York Extension
Handheld Pulse Oximeter
Toronto Extension
Glucometer
Toronto Extension
Bag Valve Mask
Toronto Extension
Digital Thermometer
Toronto Extension
Electronic Stethoscope
Toronto Extension
Handheld Pulse Oximeter
Shipping_offering
Offering
Same Day
Overnight
Two Day
Offers
Store Location
Shipping Offering
Berlin Extension
Two Day
Cancun Extension
Two Day
London Extension
Same Day
London Extension
Overnight
London Extension
Two Day
New York Extension
Overnight
New York Extension
Two Day
Toronto Extension
Two Day
Alternate Names
Name
Product
Glucose Meter
Glucometer
Blood Glucose Meter
Glucometer
Glucose Monitoring System
Glucometer
Thermometer
Digital Thermometer
Ambu Bag
Bag Valve Mask
Oxygen Bag Valve Mask
Oxygen Bag Valve Mask
Cardiology Stethoscope
Electronic Stethoscope
Portable Pulse Oximeter
Handheld Pulse Oximeter
Handheld Pulse Oximeter System
Handheld Pulse Oximeter
The DDL and DML to create and populate the tables in the
schema are listed below. You can copy and paste this into your
SQL client to create and populate the tables.
DROP TABLE Sells;
DROP TABLE Offers;
DROP TABLE Store_location;
DROP TABLE Alternate_name;
DROP TABLE Product;
DROP TABLE Currency;
DROP TABLE Shipping_offering;
CREATE TABLE Currency (
currency_id DECIMAL(12) NOT NULL PRIMARY KEY,
currency_name VARCHAR(255) NOT NULL,
us_dollars_to_currency_ratio DECIMAL(12,2) NOT NULL);
CREATE TABLE Store_location (
store_location_id DECIMAL(12) NOT NULL PRIMARY KEY,
store_name VARCHAR(255) NOT NULL,
currency_accepted_id DECIMAL(12) NOT NULL);
CREATE TABLE Product (
product_id DECIMAL(12) NOT NULL PRIMARY KEY,
product_name VARCHAR(255) NOT NULL,
price_in_us_dollars DECIMAL(12,2) NOT NULL);
CREATE TABLE Sells (
sells_id DECIMAL(12) NOT NULL PRIMARY KEY,
product_id DECIMAL(12) NOT NULL,
store_location_id DECIMAL(12) NOT NULL);
CREATE TABLE Shipping_offering (
shipping_offering_id DECIMAL(12) NOT NULL PRIMARY
KEY,
offering VARCHAR(255) NOT NULL);
CREATE TABLE Offers (
offers_id DECIMAL(12) NOT NULL PRIMARY KEY,
store_location_id DECIMAL(12) NOT NULL,
shipping_offering_id DECIMAL(12) NOT NULL);
CREATE TABLE Alternate_name (
alternate_name_id DECIMAL(12) NOT NULL PRIMARY KEY,
name VARCHAR(255) NOT NULL,
product_id DECIMAL(12) NOT NULL);
ALTER TABLE Store_location
ADD CONSTRAINT fk_location_to_currency FOREIGN
KEY(currency_accepted_id) REFERENCES
Currency(currency_id);
ALTER TABLE Sells
ADD CONSTRAINT fk_sells_to_product FOREIGN
KEY(product_id) REFERENCES Product(product_id);
ALTER TABLE Sells
ADD CONSTRAINT fk_sells_to_location FOREIGN
KEY(store_location_id) REFERENCES
Store_location(store_location_id);
ALTER TABLE Offers
ADD CONSTRAINT fk_offers_to_location FOREIGN
KEY(store_location_id) REFERENCES
Store_location(store_location_id);
ALTER TABLE Offers
ADD CONSTRAINT fk_offers_to_offering FOREIGN
KEY(shipping_offering_id)
REFERENCES Shipping_offering(shipping_offering_id);
ALTER TABLE Alternate_name
ADD CONSTRAINT fk_name_to_product FOREIGN
KEY(product_id)
REFERENCES Product(product_id);
INSERT INTO Currency(currency_id, currency_name,
us_dollars_to_currency_ratio)
VALUES(1, 'Britsh Pound', 0.67);
INSERT INTO Currency(currency_id, currency_name,
us_dollars_to_currency_ratio)
VALUES(2, 'Canadian Dollar', 1.34);
INSERT INTO Currency(currency_id, currency_name,
us_dollars_to_currency_ratio)
VALUES(3, 'US Dollar', 1.00);
INSERT INTO Currency(currency_id, currency_name,
us_dollars_to_currency_ratio)
VALUES(4, 'Euro', 0.92);
INSERT INTO Currency(currency_id, currency_name,
us_dollars_to_currency_ratio)
VALUES(5, 'Mexican Peso', 16.76);
INSERT INTO Shipping_offering(shipping_offering_id,
offering)
VALUES (50, 'Same Day');
INSERT INTO Shipping_offering(shipping_offering_id,
offering)
VALUES (51, 'Overnight');
INSERT INTO Shipping_offering(shipping_offering_id,
offering)
VALUES (52, 'Two Day');
--Glucometer
INSERT INTO Product(product_id, product_name,
price_in_us_dollars)
VALUES(100, 'Glucometer', 50);
INSERT INTO Alternate_name(alternate_name_id, name,
product_id)
VALUES(10000, 'Glucose Meter', 100);
INSERT INTO Alternate_name(alternate_name_id, name,
product_id)
VALUES(10001, 'Blood Glucose Meter', 100);
INSERT INTO Alternate_name(alternate_name_id, name,
product_id)
VALUES(10002, 'Glucose Monitoring System', 100);
--Bag Valve Mask
INSERT INTO Product(product_id, product_name,
price_in_us_dollars)
VALUES(101, 'Bag Valve Mask', 25);
INSERT INTO Alternate_name(alternate_name_id, name,
product_id)
VALUES(10003, 'Ambu Bag', 101);
INSERT INTO Alternate_name(alternate_name_id, name,
product_id)
VALUES(10004, 'Oxygen Bag Valve Mask', 101);
--Digital Thermometer
INSERT INTO Product(product_id, product_name,
price_in_us_dollars)
VALUES(102, 'Digital Thermometer', 250);
INSERT INTO Alternate_name(alternate_name_id, name,
product_id)
VALUES(10005, 'Thermometer', 102);
--Electronic Stethoscope
INSERT INTO Product(product_id, product_name,
price_in_us_dollars)
VALUES(103, 'Electronic Stethoscope', 350);
INSERT INTO Alternate_name(alternate_name_id, name,
product_id)
VALUES(10006, 'Cardiology Stethoscope', 103);
--Handheld Pulse Oximeter
INSERT INTO Product(product_id, product_name,
price_in_us_dollars)
VALUES(104, 'Handheld Pulse Oximeter', 450);
INSERT INTO Alternate_name(alternate_name_id, name,
product_id)
VALUES(10007, 'Portable Pulse Oximeter', 104);
INSERT INTO Alternate_name(alternate_name_id, name,
product_id)
VALUES(10008, 'Handheld Pulse Oximeter System', 104);
--Berlin Extension
INSERT INTO Store_location(store_location_id, store_name,
currency_accepted_id)
VALUES(10, 'Berlin Extension', 4);
INSERT INTO Sells(sells_id, store_location_id, product_id)
VALUES(1000, 10, 100);
INSERT INTO Sells(sells_id, store_location_id, product_id)
VALUES(1001, 10, 101);
INSERT INTO Sells(sells_id, store_location_id, product_id)
VALUES(1002, 10, 102);
INSERT INTO Sells(sells_id, store_location_id, product_id)
VALUES(1003, 10, 104);
INSERT INTO Offers(offers_id, store_location_id,
shipping_offering_id)
VALUES(150, 10, 52);
--Cancun Extension
INSERT INTO Store_location(store_location_id, store_name,
currency_accepted_id)
VALUES(11, 'Cancun Extension', 5);
INSERT INTO Sells(sells_id, store_location_id, product_id)
VALUES(1004, 11, 101);
INSERT INTO Sells(sells_id, store_location_id, product_id)
VALUES(1005, 11, 102);
INSERT INTO Sells(sells_id, store_location_id, product_id)
VALUES(1006, 11, 104);
INSERT INTO Offers(offers_id, store_location_id,
shipping_offering_id)
VALUES(151, 11, 52);
--London Extension
INSERT INTO Store_location(store_location_id, store_name,
currency_accepted_id)
VALUES(12, 'London Extension', 1);
INSERT INTO Sells(sells_id, store_location_id, product_id)
VALUES(1007, 12, 100);
INSERT INTO Sells(sells_id, store_location_id, product_id)
VALUES(1008, 12, 101);
INSERT INTO Sells(sells_id, store_location_id, product_id)
VALUES(1009, 12, 102);
INSERT INTO Sells(sells_id, store_location_id, product_id)
VALUES(1010, 12, 103);
INSERT INTO Sells(sells_id, store_location_id, product_id)
VALUES(1011, 12, 104);
INSERT INTO Offers(offers_id, store_location_id,
shipping_offering_id)
VALUES(152, 12, 50);
INSERT INTO Offers(offers_id, store_location_id,
shipping_offering_id)
VALUES(153, 12, 51);
INSERT INTO Offers(offers_id, store_location_id,
shipping_offering_id)
VALUES(154, 12, 52);
--New York Extension
INSERT INTO Store_location(store_location_id, store_name,
currency_accepted_id)
VALUES(13, 'New York Extension', 3);
INSERT INTO Sells(sells_id, store_location_id, product_id)
VALUES(1012, 13, 100);
INSERT INTO Sells(sells_id, store_location_id, product_id)
VALUES(1013, 13, 101);
INSERT INTO Sells(sells_id, store_location_id, product_id)
VALUES(1014, 13, 102);
INSERT INTO Sells(sells_id, store_location_id, product_id)
VALUES(1015, 13, 103);
INSERT INTO Sells(sells_id, store_location_id, product_id)
VALUES(1016, 13, 104);
INSERT INTO Offers(offers_id, store_location_id,
shipping_offering_id)
VALUES(155, 13, 51);
INSERT INTO Offers(offers_id, store_location_id,
shipping_offering_id)
VALUES(156, 13, 52);
--Toronto Extension
INSERT INTO Store_location(store_location_id, store_name,
currency_accepted_id)
VALUES(14, 'Toronto Extension', 2);
INSERT INTO Sells(sells_id, store_location_id, product_id)
VALUES(1017, 14, 100);
INSERT INTO Sells(sells_id, store_location_id, product_id)
VALUES(1018, 14, 101);
INSERT INTO Sells(sells_id, store_location_id, product_id)
VALUES(1019, 14, 102);
INSERT INTO Sells(sells_id, store_location_id, product_id)
VALUES(1020, 14, 103);
INSERT INTO Sells(sells_id, store_location_id, product_id)
VALUES(1021, 14, 104);
INSERT INTO Offers(offers_id, store_location_id,
shipping_offering_id)
VALUES(157, 14, 52);
As a reminder, for each step that requires SQL, make sure to
capture a screenshot of the command and the results of its
execution. Further, make sure to eliminate unneeded columns
from the result set, to name your columns something user-
friendly and human readable, and to format any prices as
currencies.
Section Steps
1. Create the tables in the schema, including all of their
columns, datatypes, and constraints, and populate the tables
with data. You can do so by executing the DDL and DML above
in your SQL client. You only need to capture one or two
demonstrative screenshots for this step. No need to screenshot
execution of every line of code (that could require dozens of
screenshots).
2. Write two queries which together retrieve the price of a
digital thermometer in London. The first query will retrieve the
currency ratio for the currency accepted in London. Your
second query will hardcode the currency ratio retrieved in the
first query, in order to determine the price of the thermometer
in London. The first query should be dynamic in that the needed
currency should be looked up rather than hardcoded. That is, the
currency should be obtained by looking up the currency the
store location accepts, not hardcoded by manually eyeballing
the tables yourself.
3. In step 2, you determined the price of a digital thermometer
in London by writing two queries. For this step, determine the
same by writing a single query that contains an uncorrelated
subquery. Explain:
a. how your solution makes use of the uncorrelated subquery to
help retrieve the result
we embed the query that retrieves the ratio for Euros. The
embedded query is termed a subquery because it resides inside
of another query. The subquery has the advantage that should
the ratio change over time, the overall query will always
retrieve the correct results
b. how and when the uncorrelated subquery is executed in the
context of the outer query, and
The result of the subquery does not depend on which product
price is retrieved. The ratio of the Euro is the ratio of the Euro;
the ratio does not vary if the prices of the products vary. So the
SQL engine executes the subquery on its own.
c. the advantages of this solution over your solution for step 2.
Place a subquery inside of another subquery. It means where we
place a subquery determines the role results play in the outer
query.
4. Imagine a charity in London is hosting a fundraiser to
purchase medical supplies for organizations that provide care to
people in impoverished areas. The charity is targeting both
people with average income as well a few wealthier people, and
to this end asks for a selection of products both groups can
contribute to purchase. Specifically, for the average income
group, they would like to know what products cost less than 25
Euros, and for the wealthier group, they would like to know
what products cost more than 300 Euros.
a. Develop a single query to provide them this result, which
should contain uncorrelated subqueries and should list the
names of the products as well as their prices in Euros.
b. Explain how what each subquery does, its role in the overall
query, and how the subqueries were integrated to give the
correct results.
In the list cost more than 300 and less than 25, because of the
subquery in the WHERE clause.
5. Imagine that Denisha is a traveling doctor who works for an
agency that sends her to various locations throughout the world
with very little notice. As a result, she needs to know about
medical supplies that are available in all store locations (not
just some locations). This way, regardless of where she is sent,
she knows she can purchase those products. She is also
interested in viewing the alternate names for these products, so
she is absolutely certain what each product is.
Note: It is important to Denisha that she can purchase the
product in any location; only products sold in all stores should
be listed, that is, if a product is sold in some stores, but not all
stores, it should not be listed.
a. Develop a single query to list out these results, making sure
to use uncorrelated subqueries where needed (one subquery will
be put into the WHERE clause of the outer query).
b. Explain how what each subquery does, its role in the overall
query, and how the subqueries were integrated to give the
correct results.
In your thinking about how to address this use case, one item
should be brought to your attention – the phrase “all store
locations”. By eyeballing the data, you can determine the
number of locations and hardcode that number, which will
satisfy Denisha’s request at this present time; however, as the
number of locations change over time (with stores opening or
closing), such hardcoding would fail. It’s better to dynamically
determine the total number of locations in the query itself so
that the results are correct over time.
6. For this problem you will write a single query to address the
same use case as in step 5, but change your query so that the
main uncorrelated subquery is in the FROM clause rather than
in the WHERE clause. The results should be the same as in step
5, except of course possibly row ordering which can vary.
Explain how you integrated the subquery into the FROM clause
to derive the same results as step 5.
7. For this problem you will write a single query to address the
same use case as in step 5, but change your query to use a
correlated query combined with an EXISTS clause. The results
should be the same as in step 5, except of course possibly row
ordering which can vary. Explain:
a. how your solution makes use of the correlated subquery and
EXISTS clause to help retrieve the result
b. how and when the correlated subquery is executed in the
context of the outer query.
8. Compare and contrast the construction of the three different
queries you developed in steps 5-7, which all address the same
use case. What advantages and disadvantages do each
construction have over the others? Which do you prefer and
why?
Evaluation
Your lab will be reviewed by your facilitator or instructor with
the following criteria and grade breakdown.
Use the Ask the Facilitators Discussion Forum if you have any
questions regarding how to approach this lab. Make sure to
include your name in the filename and submit it in the
Assignments section of the course.
Page 1 of 11
Copyright 2016, 2018-2019 Boston University. All Rights
Reserved.
Page 9 of 10
Criterion A B C DF
Letter
Grade
Correctness and
Completeness of
Results (70%)
All steps' results are
entirely complete and
correct
About ¾ of the steps'
results are correct and
complete
About half of the steps'
results are correct and
complete
About ¼ of the steps'
results are correct and
complete
Virtually none of the
step's results are correct
and complete
Constitution of
SQL and
Explanations
(30%)
Excellent use and
integration of
appropriate SQL
constructs and
supporting
explanations
Good use and
integration of
appropriate SQL
constructs and
supporting
explanations
Mediocre use and
integration of
appropriate SQL
constructs and
supporting
explanations
Substandard use and
integration of
appropriate SQL
constructs and
supporting
explanations
Virtually all SQL
constructs and supporting
explanations are
unsuitable or improperly
integrated
Assignment Grade:#N/A
The resulting grade is calculated as a weighted average as listed
using A+=100, A=96, A-=92, B+=88, B=85, B-=82 etc.
To obtain an A grade for the course, your weighted average
should be >=95, A- >=90, B+ >=87, B >= 82, B- >= 80 etc.
Sheet1Criterion A B C DFLetter GradeCorrectness and
Completeness of Results (70%) All steps' results are entirely
complete and correctAbout ¾ of the steps' results are correct
and completeAbout half of the steps' results are correct and
completeAbout ¼ of the steps' results are correct and
completeVirtually none of the step's results are correct and
completeConstitution of SQL and Explanations (30%)Excellent
use and integration of appropriate SQL constructs and
supporting explanationsGood use and integration of appropriate
SQL constructs and supporting explanationsMediocre use and
integration of appropriate SQL constructs and supporting
explanationsSubstandard use and integration of appropriate SQL
constructs and supporting explanationsVirtually all SQL
constructs and supporting explanations are unsuitable or
improperly integratedAssignment Grade:ERROR:#N/AThe
resulting grade is calculated as a weighted average as listed
using A+=100, A=96, A-=92, B+=88, B=85, B-=82 etc.To
obtain an A grade for the course, your weighted average should
be >=95, A- >=90, B+ >=87, B >= 82, B- >= 80
etc.A+100A96A-92B+88B85B-82C+78C75C-72D67F0
Productproduct_id
{pk}product_nameprice_in_us_dollarsSellssells_id
{pk}product_id {fk1}store_location_id
{fk2}Currencycurrency_id
{pk}currency_nameus_dollars_to_currency_ratioStore_locations
tore_location_id {pk}store_namecurrency_accepted_id
{fk1}uses0..*1..1has1..10..*has1..10..*Shipping_offeringshippi
ng_offering_id {pk}offeringhasOffersoffers_id
{pk}store_location_id {fk1}shipping_offering_id
{fk2}has1..11..11..*0..*1..1Alternate_Namealtername_name_id
{pk}nameproduct_id {fk1}has1..*1..1
Product
<<Stereotype>>
parameter
product_id {pk}
product_name
price_in_us_dollars
Sells
<<Stereotype>>
parameter
sells_id {pk}
product_id {fk1}
store_location_id {fk2}
Currency
<<Stereotype>>
parameter
currency_id {pk}
currency_name
us_dollars_to_currency_ratio
Store_location
<<Stereotype>>
parameter
store_location_id {pk}
store_name
currency_accepted_id {fk1}
uses
M1
M2
M3
M4
0..*
1..1
has
M1
M2
M3
M4
1..1
0..*
has
M1
M2
M3
M4
1..1
0..*
Shipping_offering
<<Stereotype>>
parameter
shipping_offering_id {pk}
offering
has
M1
M2
M3
M4
Offers
<<Stereotype>>
parameter
offers_id {pk}
store_location_id {fk1}
shipping_offering_id {fk2}
has
M1
M2
M3
M4
1..1
1..1
1..*
0..*
1..1
Alternate_Name
<<Stereotype>>
parameter
altername_name_id {pk}
name
product_id {fk1}
has
M1
M2
M3
M4
1..*
1..1
UNIT 6 LEARNING ACTIVITES
Select five activities. Type all activities on one document.
Name that document, “Unit Six Activities,” label each activity
by number, and do not submit until all five items have been
completed.All videos and readings necessary for completion of
the following activities are located either in “Unit Six to Read”
or “Unit Six to View.” Practice sites will be posted with Unit
Six “To Do.”
Activity One: Watch the “TurnItIn” video (Found in Unit Six
to View) and then list the steps for turning in one of your essays
for a plagiarism check.
1
Work Time Required: About 20 minutes.
Activity Two: View the video on EasyBib. Then, click on the
url link found as first item in “Unit Six to Read”(url.htm) link
and select, “MLA 8th Edition” from the list found under the
heading, “Our Guides.” Select and read, “Fundamentals of an
MLA Citation” and list the core elements of an MLA 8 citation,
as they are described in the guide.
2
Work Time Required: About 15-20 minutes
Activity Three: Now, continue to work on the same page and
select any three of the “How to Cite…” options on the menu.
(Website, book and journal) List the information you should
gather for the three types of sources you have selected. 1. (For
Example, if I want to correctly cite a journal, I need to include
the following information…)
3
Work Time Required: About 20-30 minutes.
Activity Four: Open the link for your Reading Workout
Challenge. (Found in “To Do” Follow the directions to read and
respond in writing. Hint! If you copy and paste the workout
pages into your saved activities document, you will be able to
type your answers directly onto the pages.
4
Work Time Required: About 30 minutes
Activity Five: Open and study the sample MLA Works Cited
Sample Page (Found in Unit 6 to View.) Create a “Works
Cited” page by using EasyBib to cite any five sources you have
used for your ENG. 111 essays. Refer to the video on EasyBib
and the sample page if you need more information as to how
you should set up your citing page or use EasyBib
5
Work Time Required: About 20 minutes
6
Activity Six: (Revision and editing) Visit the Roane State
Community College site for revision (Located in “To Read” and
select Guide to Comma Use and Run-on Sentences from the
side-bar menu. Study the information and examples carefully.
Correct the errors found in the student-written paragraph below.
State the type of error and how you corrected it. Feel free to
comment on errors other than those of punctuation and sentence
construction if you wish.
Activity Six Revise Paragraph cont…..
Transgenders base their sexual preference on sexuality
feelings and personal reasoning. In reality not all humans will
be the same so a new change has been developed; in which
being transgender is the world's new change today. Certain
people in today's society have yet to accept them and they
behave cruelly towards them. Transgenders have their reasons
and purposes for becoming who they are and always wanted to
be because they have to be comfortable with themselves if not
can cause mental health issues. They undergo many procedures
and through a process to express themselves, through the
correct and believable way of their mindsets. So they have to be
strong sometimes independent and maybe have someone by their
side. Everyone deserves to be happy accepted and free into
today’s world, no one should be left out because of their
sexuality. The world believes appearance is all what matters to
but that's not true.
Work Time Required: About 20 minutes
Activity Seven: Read each statement below. Respond in the left
column as to whether you agree (A) or disagree (D) with each
statement. Think about why you agree or disagree and write one
sentence explaining you viewpoint.
7
Before Reading
Agree/Disagree
Statement/Question
After Reading
Agree/Disagree
1. Recreational use of marijuana is harmful.
2. Consuming marijuana by smoking can harm the lungs.
3. Marijuana is an intoxicant.
4. Marijuana can result in slowed reaction times.
5. Continued use of marijuana can result in adverse changes in
the brain.
Work Time Required: About 10 minutes
Activity Eight:Go to Unit 6 to View and click on the link for
Cornell Notetaking (Cornell System Educational Videos |
WatchKnowLearn) and choose Podcast # 6. View the podcast.
Stop the video and follow the directions for preparing a page for
Cornell Notetaking, and, then, take notes as you listen to the
video on the effects of marijuana on the brain. (Found in Unit 6
to View) You can stop the video by clicking on the screen if the
narrative moves too quickly for you, but remember, you cannot
stop your professor in the middle of a lecture. When you are
finished, recreate your front page of notes in M. Word and copy
and paste it into your activities submission. Be sure to include a
summary of the page. Use the summary cheat sheet (Found in
Unit 6 to View” if you need help writing your summary.
8
9
Work Time Required: About 30-45 minutes
Activity Nine:Select and submit any one of the essays you have
written for English 111 to the Brainfuse link found on the menu
located on the left side of your homepage. Compare the
feedback you receive from Brainfuse with that you received
from your instructor.
9
Work Time Required: About 30 minutes
100
Activity Ten: Open the link below and study the template it
contains. Discuss how using a template when planning an essay
is useful.
Doc2 Five Paragraph Essay Structure Unit Six.docx
Work Time Required: About 5-10 minutes

More Related Content

Similar to MET CS 669 Database Design and Implementation for BusinessLab .docx

Capgemini oracle live-sql
Capgemini oracle live-sqlCapgemini oracle live-sql
Capgemini oracle live-sqlJohan Louwers
 
Avoiding cursors with sql server 2005 tech republic
Avoiding cursors with sql server 2005   tech republicAvoiding cursors with sql server 2005   tech republic
Avoiding cursors with sql server 2005 tech republicKaing Menglieng
 
PL/SQL New and Advanced Features for Extreme Performance
PL/SQL New and Advanced Features for Extreme PerformancePL/SQL New and Advanced Features for Extreme Performance
PL/SQL New and Advanced Features for Extreme PerformanceZohar Elkayam
 
20231013_274_ClubServicenow_Catalog.pdf
20231013_274_ClubServicenow_Catalog.pdf20231013_274_ClubServicenow_Catalog.pdf
20231013_274_ClubServicenow_Catalog.pdfTiago Macul
 
Object Oriented Analysis and Design with UML2 part2
Object Oriented Analysis and Design with UML2 part2Object Oriented Analysis and Design with UML2 part2
Object Oriented Analysis and Design with UML2 part2Haitham Raik
 
ADBMS ASSIGNMENT
ADBMS ASSIGNMENTADBMS ASSIGNMENT
ADBMS ASSIGNMENTLori Moore
 
Effective Java. By materials of Josch Bloch's book
Effective Java. By materials of Josch Bloch's bookEffective Java. By materials of Josch Bloch's book
Effective Java. By materials of Josch Bloch's bookRoman Tsypuk
 
Dictionary and sets-converted
Dictionary and sets-convertedDictionary and sets-converted
Dictionary and sets-convertedMicheal Ogundero
 
Sql server 2008 r2 xml wp
Sql server 2008 r2 xml wpSql server 2008 r2 xml wp
Sql server 2008 r2 xml wpKlaudiia Jacome
 
1 MVC – Ajax and Modal Views AJAX stands for Asynch.docx
1  MVC – Ajax and Modal Views AJAX stands for Asynch.docx1  MVC – Ajax and Modal Views AJAX stands for Asynch.docx
1 MVC – Ajax and Modal Views AJAX stands for Asynch.docxhoney725342
 
Breaking Dependencies Legacy Code - Cork Software Crafters - September 2019
Breaking Dependencies Legacy Code -  Cork Software Crafters - September 2019Breaking Dependencies Legacy Code -  Cork Software Crafters - September 2019
Breaking Dependencies Legacy Code - Cork Software Crafters - September 2019Paulo Clavijo
 
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
 
Introduction to GraphQL with Ruby
Introduction to GraphQL with RubyIntroduction to GraphQL with Ruby
Introduction to GraphQL with RubyDigital Natives
 
TDD And Refactoring
TDD And RefactoringTDD And Refactoring
TDD And RefactoringNaresh Jain
 

Similar to MET CS 669 Database Design and Implementation for BusinessLab .docx (20)

SQL Tunning
SQL TunningSQL Tunning
SQL Tunning
 
Capgemini oracle live-sql
Capgemini oracle live-sqlCapgemini oracle live-sql
Capgemini oracle live-sql
 
Best practices tekx
Best practices tekxBest practices tekx
Best practices tekx
 
Avoiding cursors with sql server 2005 tech republic
Avoiding cursors with sql server 2005   tech republicAvoiding cursors with sql server 2005   tech republic
Avoiding cursors with sql server 2005 tech republic
 
PL/SQL New and Advanced Features for Extreme Performance
PL/SQL New and Advanced Features for Extreme PerformancePL/SQL New and Advanced Features for Extreme Performance
PL/SQL New and Advanced Features for Extreme Performance
 
20231013_274_ClubServicenow_Catalog.pdf
20231013_274_ClubServicenow_Catalog.pdf20231013_274_ClubServicenow_Catalog.pdf
20231013_274_ClubServicenow_Catalog.pdf
 
Object Oriented Analysis and Design with UML2 part2
Object Oriented Analysis and Design with UML2 part2Object Oriented Analysis and Design with UML2 part2
Object Oriented Analysis and Design with UML2 part2
 
ADBMS ASSIGNMENT
ADBMS ASSIGNMENTADBMS ASSIGNMENT
ADBMS ASSIGNMENT
 
Sql Portfolio
Sql PortfolioSql Portfolio
Sql Portfolio
 
Introtosqltuning
IntrotosqltuningIntrotosqltuning
Introtosqltuning
 
Effective Java. By materials of Josch Bloch's book
Effective Java. By materials of Josch Bloch's bookEffective Java. By materials of Josch Bloch's book
Effective Java. By materials of Josch Bloch's book
 
Dictionary and sets-converted
Dictionary and sets-convertedDictionary and sets-converted
Dictionary and sets-converted
 
Oracle etl openworld
Oracle etl openworldOracle etl openworld
Oracle etl openworld
 
Sql server 2008 r2 xml wp
Sql server 2008 r2 xml wpSql server 2008 r2 xml wp
Sql server 2008 r2 xml wp
 
1 MVC – Ajax and Modal Views AJAX stands for Asynch.docx
1  MVC – Ajax and Modal Views AJAX stands for Asynch.docx1  MVC – Ajax and Modal Views AJAX stands for Asynch.docx
1 MVC – Ajax and Modal Views AJAX stands for Asynch.docx
 
Breaking Dependencies Legacy Code - Cork Software Crafters - September 2019
Breaking Dependencies Legacy Code -  Cork Software Crafters - September 2019Breaking Dependencies Legacy Code -  Cork Software Crafters - September 2019
Breaking Dependencies Legacy Code - Cork Software Crafters - September 2019
 
Oracle SQL Basics
Oracle SQL BasicsOracle SQL Basics
Oracle SQL Basics
 
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...
 
Introduction to GraphQL with Ruby
Introduction to GraphQL with RubyIntroduction to GraphQL with Ruby
Introduction to GraphQL with Ruby
 
TDD And Refactoring
TDD And RefactoringTDD And Refactoring
TDD And Refactoring
 

More from buffydtesurina

Create three classes for the words An abstract class called Word, a.docx
Create three classes for the words An abstract class called Word, a.docxCreate three classes for the words An abstract class called Word, a.docx
Create three classes for the words An abstract class called Word, a.docxbuffydtesurina
 
Create an imaginary person you want to write to in your journal. Alt.docx
Create an imaginary person you want to write to in your journal. Alt.docxCreate an imaginary person you want to write to in your journal. Alt.docx
Create an imaginary person you want to write to in your journal. Alt.docxbuffydtesurina
 
Create an environmental public health emergency plan for you as an i.docx
Create an environmental public health emergency plan for you as an i.docxCreate an environmental public health emergency plan for you as an i.docx
Create an environmental public health emergency plan for you as an i.docxbuffydtesurina
 
Create an elevator speech (a 30-second speech) that illustrates why .docx
Create an elevator speech (a 30-second speech) that illustrates why .docxCreate an elevator speech (a 30-second speech) that illustrates why .docx
Create an elevator speech (a 30-second speech) that illustrates why .docxbuffydtesurina
 
Create an Access database with the data given in Problem Exercise .docx
Create an Access database with the data given in Problem Exercise .docxCreate an Access database with the data given in Problem Exercise .docx
Create an Access database with the data given in Problem Exercise .docxbuffydtesurina
 
create avatar with adobe illustratorUsing the Basic Shapes and t.docx
create avatar with adobe illustratorUsing the Basic Shapes and t.docxcreate avatar with adobe illustratorUsing the Basic Shapes and t.docx
create avatar with adobe illustratorUsing the Basic Shapes and t.docxbuffydtesurina
 
Create an argument about the supernatural facets of the natural worl.docx
Create an argument about the supernatural facets of the natural worl.docxCreate an argument about the supernatural facets of the natural worl.docx
Create an argument about the supernatural facets of the natural worl.docxbuffydtesurina
 
Create a SIOP lesson plan that integrates students reading levels.docx
Create a SIOP lesson plan that integrates students reading levels.docxCreate a SIOP lesson plan that integrates students reading levels.docx
Create a SIOP lesson plan that integrates students reading levels.docxbuffydtesurina
 
Create an 8- to 10-slide Microsoft® PowerPoint® presentati.docx
Create an 8- to 10-slide Microsoft® PowerPoint® presentati.docxCreate an 8- to 10-slide Microsoft® PowerPoint® presentati.docx
Create an 8- to 10-slide Microsoft® PowerPoint® presentati.docxbuffydtesurina
 
Create a Problem Statement for a study that explore Compensation I.docx
Create a Problem Statement for a study that explore Compensation I.docxCreate a Problem Statement for a study that explore Compensation I.docx
Create a Problem Statement for a study that explore Compensation I.docxbuffydtesurina
 
Create a scenario that demonstrates a poor exchange of informa.docx
Create a scenario that demonstrates a poor exchange of informa.docxCreate a scenario that demonstrates a poor exchange of informa.docx
Create a scenario that demonstrates a poor exchange of informa.docxbuffydtesurina
 
Create a mobile application using Android™ Studio that saves d.docx
Create a mobile application using Android™ Studio that saves d.docxCreate a mobile application using Android™ Studio that saves d.docx
Create a mobile application using Android™ Studio that saves d.docxbuffydtesurina
 
Create a power point presentation on the subject of Banruptcy. Descr.docx
Create a power point presentation on the subject of Banruptcy. Descr.docxCreate a power point presentation on the subject of Banruptcy. Descr.docx
Create a power point presentation on the subject of Banruptcy. Descr.docxbuffydtesurina
 
Create a Microsoft PowerPoint presentation explaining the various ty.docx
Create a Microsoft PowerPoint presentation explaining the various ty.docxCreate a Microsoft PowerPoint presentation explaining the various ty.docx
Create a Microsoft PowerPoint presentation explaining the various ty.docxbuffydtesurina
 
Create a PowerPoint® presentation of 9 to 12 slides that you w.docx
Create a PowerPoint® presentation of 9 to 12 slides that you w.docxCreate a PowerPoint® presentation of 9 to 12 slides that you w.docx
Create a PowerPoint® presentation of 9 to 12 slides that you w.docxbuffydtesurina
 
Create a PowerPoint presentation to analyzes the objectives of perso.docx
Create a PowerPoint presentation to analyzes the objectives of perso.docxCreate a PowerPoint presentation to analyzes the objectives of perso.docx
Create a PowerPoint presentation to analyzes the objectives of perso.docxbuffydtesurina
 
Create a PowerPoint presentation with 12 to 15 slides that addresses.docx
Create a PowerPoint presentation with 12 to 15 slides that addresses.docxCreate a PowerPoint presentation with 12 to 15 slides that addresses.docx
Create a PowerPoint presentation with 12 to 15 slides that addresses.docxbuffydtesurina
 
Create a PowerPoint presentation that is seven slides in length, inc.docx
Create a PowerPoint presentation that is seven slides in length, inc.docxCreate a PowerPoint presentation that is seven slides in length, inc.docx
Create a PowerPoint presentation that is seven slides in length, inc.docxbuffydtesurina
 
Create a power point presentationAttached is the assignment fo.docx
Create a power point presentationAttached is the assignment fo.docxCreate a power point presentationAttached is the assignment fo.docx
Create a power point presentationAttached is the assignment fo.docxbuffydtesurina
 
Create a Policy Memo that explain and assess the advantages and chal.docx
Create a Policy Memo that explain and assess the advantages and chal.docxCreate a Policy Memo that explain and assess the advantages and chal.docx
Create a Policy Memo that explain and assess the advantages and chal.docxbuffydtesurina
 

More from buffydtesurina (20)

Create three classes for the words An abstract class called Word, a.docx
Create three classes for the words An abstract class called Word, a.docxCreate three classes for the words An abstract class called Word, a.docx
Create three classes for the words An abstract class called Word, a.docx
 
Create an imaginary person you want to write to in your journal. Alt.docx
Create an imaginary person you want to write to in your journal. Alt.docxCreate an imaginary person you want to write to in your journal. Alt.docx
Create an imaginary person you want to write to in your journal. Alt.docx
 
Create an environmental public health emergency plan for you as an i.docx
Create an environmental public health emergency plan for you as an i.docxCreate an environmental public health emergency plan for you as an i.docx
Create an environmental public health emergency plan for you as an i.docx
 
Create an elevator speech (a 30-second speech) that illustrates why .docx
Create an elevator speech (a 30-second speech) that illustrates why .docxCreate an elevator speech (a 30-second speech) that illustrates why .docx
Create an elevator speech (a 30-second speech) that illustrates why .docx
 
Create an Access database with the data given in Problem Exercise .docx
Create an Access database with the data given in Problem Exercise .docxCreate an Access database with the data given in Problem Exercise .docx
Create an Access database with the data given in Problem Exercise .docx
 
create avatar with adobe illustratorUsing the Basic Shapes and t.docx
create avatar with adobe illustratorUsing the Basic Shapes and t.docxcreate avatar with adobe illustratorUsing the Basic Shapes and t.docx
create avatar with adobe illustratorUsing the Basic Shapes and t.docx
 
Create an argument about the supernatural facets of the natural worl.docx
Create an argument about the supernatural facets of the natural worl.docxCreate an argument about the supernatural facets of the natural worl.docx
Create an argument about the supernatural facets of the natural worl.docx
 
Create a SIOP lesson plan that integrates students reading levels.docx
Create a SIOP lesson plan that integrates students reading levels.docxCreate a SIOP lesson plan that integrates students reading levels.docx
Create a SIOP lesson plan that integrates students reading levels.docx
 
Create an 8- to 10-slide Microsoft® PowerPoint® presentati.docx
Create an 8- to 10-slide Microsoft® PowerPoint® presentati.docxCreate an 8- to 10-slide Microsoft® PowerPoint® presentati.docx
Create an 8- to 10-slide Microsoft® PowerPoint® presentati.docx
 
Create a Problem Statement for a study that explore Compensation I.docx
Create a Problem Statement for a study that explore Compensation I.docxCreate a Problem Statement for a study that explore Compensation I.docx
Create a Problem Statement for a study that explore Compensation I.docx
 
Create a scenario that demonstrates a poor exchange of informa.docx
Create a scenario that demonstrates a poor exchange of informa.docxCreate a scenario that demonstrates a poor exchange of informa.docx
Create a scenario that demonstrates a poor exchange of informa.docx
 
Create a mobile application using Android™ Studio that saves d.docx
Create a mobile application using Android™ Studio that saves d.docxCreate a mobile application using Android™ Studio that saves d.docx
Create a mobile application using Android™ Studio that saves d.docx
 
Create a power point presentation on the subject of Banruptcy. Descr.docx
Create a power point presentation on the subject of Banruptcy. Descr.docxCreate a power point presentation on the subject of Banruptcy. Descr.docx
Create a power point presentation on the subject of Banruptcy. Descr.docx
 
Create a Microsoft PowerPoint presentation explaining the various ty.docx
Create a Microsoft PowerPoint presentation explaining the various ty.docxCreate a Microsoft PowerPoint presentation explaining the various ty.docx
Create a Microsoft PowerPoint presentation explaining the various ty.docx
 
Create a PowerPoint® presentation of 9 to 12 slides that you w.docx
Create a PowerPoint® presentation of 9 to 12 slides that you w.docxCreate a PowerPoint® presentation of 9 to 12 slides that you w.docx
Create a PowerPoint® presentation of 9 to 12 slides that you w.docx
 
Create a PowerPoint presentation to analyzes the objectives of perso.docx
Create a PowerPoint presentation to analyzes the objectives of perso.docxCreate a PowerPoint presentation to analyzes the objectives of perso.docx
Create a PowerPoint presentation to analyzes the objectives of perso.docx
 
Create a PowerPoint presentation with 12 to 15 slides that addresses.docx
Create a PowerPoint presentation with 12 to 15 slides that addresses.docxCreate a PowerPoint presentation with 12 to 15 slides that addresses.docx
Create a PowerPoint presentation with 12 to 15 slides that addresses.docx
 
Create a PowerPoint presentation that is seven slides in length, inc.docx
Create a PowerPoint presentation that is seven slides in length, inc.docxCreate a PowerPoint presentation that is seven slides in length, inc.docx
Create a PowerPoint presentation that is seven slides in length, inc.docx
 
Create a power point presentationAttached is the assignment fo.docx
Create a power point presentationAttached is the assignment fo.docxCreate a power point presentationAttached is the assignment fo.docx
Create a power point presentationAttached is the assignment fo.docx
 
Create a Policy Memo that explain and assess the advantages and chal.docx
Create a Policy Memo that explain and assess the advantages and chal.docxCreate a Policy Memo that explain and assess the advantages and chal.docx
Create a Policy Memo that explain and assess the advantages and chal.docx
 

Recently uploaded

Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 

Recently uploaded (20)

Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 

MET CS 669 Database Design and Implementation for BusinessLab .docx

  • 1. MET CS 669 Database Design and Implementation for Business Lab 5: Subqueries Overview of the Lab In this lab we learn to work with subqueries, which significantly extend the expressional power of queries. Through the use of subqueries, a single query can extract result sets that could not be extracted without subqueries. Subqueries enable the query creator to ask the database for many complex structures in a single query. This lab teaches you the mechanics crafting SQL queries that harness the power of subqueries to handle more complex use cases. From a technical perspective, together, we will learn: · what correlated and uncorrelated subqueries are and the theory supporting both. · to use subqueries that return a single value, a list of values, and a table of values. · to use subqueries that use aggregation. · to address use cases by using uncorrelated subqueries in the column select list, the where clause, and the from clause. · to address use cases by using correlated subqueries and an EXIST clause in the WHERE clause. Lab 5 Explanations Reminder As a reminder, it is important to read through the Lab 5 Explanation document to successfully complete this lab, available in the assignment inbox alongside this lab. The explanation document illustrates how to correctly execute each
  • 2. SQL construct step-by-step, and explains important theoretical and practical details. Other Reminders · The examples in this lab will execute in modern versions of Oracle, Microsoft SQL Server, and PostgreSQL as is. · The screenshots in this lab display execution of SQL in the default SQL clients supported in the course – Oracle SQL Developer, SQL Server Management Studio, and pgAdmin – but your screenshots may vary somewhat as different version of these clients are released. · Don’t forget to commit your changes if you work on the lab in different sittings, using the “COMMIT” command, so that you do not lose your work. Section One – Subqueries Section Background In this lab, you will practice crafting subqueries for the schema illustrated below. This schema’s structure supports basic medical product and currency information for an international medical supplier, including store locations, the products they sell, shipping offerings, the currency each location accepts, as well as conversion factors for converting from U.S. dollars into the
  • 3. accepted currency. Due to the specific and technical nature of the names of medical products, the supplier also keeps a list of alternative names for each product that may help customers identify them. This schema models prices and exchange rates at a specific point in time. While a real-world schema would make provision for changes to prices and exchange rates over time, the tables needed to support this have been intentionally excluded from our schema, because their addition would add unneeded complexity on your journey of learning subqueries, expressions, and value manipulation. The schema has just the right amount of complexity for your learning. The data for the tables is listed below. Currencies Name Ratio British Pound 0.67 Canadian Dollar 1.34 US Dollar 1.00 Euro 0.92 Mexican Peso 16.76 Store Locations Name
  • 4. Currency Berlin Extension Euro Cancun Extension Mexican Peso London Extension British Pound New York Extension US Dollar Toronto Extension Canadian Dollar Product Name US Dollar Price Glucometer $50 Bag Valve Mask $25 Digital Thermometer $250 Electronic Stethoscope $350 Handheld Pulse Oximeter $450
  • 5. Sells Store Location Product Berlin Extension Glucometer Berlin Extension Bag Valve Mask Berlin Extension Digital Thermometer Berlin Extension Handheld Pulse Oximeter Cancun Extension Bag Valve Mask Cancun Extension Digital Thermometer Cancun Extension Handheld Pulse Oximeter London Extension Glucometer London Extension Bag Valve Mask London Extension Digital Thermometer London Extension Electronic Stethoscope London Extension Handheld Pulse Oximeter New York Extension Glucometer New York Extension Bag Valve Mask New York Extension Digital Thermometer New York Extension Electronic Stethoscope
  • 6. New York Extension Handheld Pulse Oximeter Toronto Extension Glucometer Toronto Extension Bag Valve Mask Toronto Extension Digital Thermometer Toronto Extension Electronic Stethoscope Toronto Extension Handheld Pulse Oximeter Shipping_offering Offering Same Day Overnight Two Day
  • 7. Offers Store Location Shipping Offering Berlin Extension Two Day Cancun Extension Two Day London Extension Same Day London Extension Overnight London Extension Two Day New York Extension Overnight New York Extension Two Day Toronto Extension Two Day Alternate Names Name Product
  • 8. Glucose Meter Glucometer Blood Glucose Meter Glucometer Glucose Monitoring System Glucometer Thermometer Digital Thermometer Ambu Bag Bag Valve Mask Oxygen Bag Valve Mask Oxygen Bag Valve Mask Cardiology Stethoscope Electronic Stethoscope Portable Pulse Oximeter Handheld Pulse Oximeter Handheld Pulse Oximeter System Handheld Pulse Oximeter The DDL and DML to create and populate the tables in the schema are listed below. You can copy and paste this into your SQL client to create and populate the tables. DROP TABLE Sells; DROP TABLE Offers; DROP TABLE Store_location; DROP TABLE Alternate_name; DROP TABLE Product; DROP TABLE Currency; DROP TABLE Shipping_offering;
  • 9. CREATE TABLE Currency ( currency_id DECIMAL(12) NOT NULL PRIMARY KEY, currency_name VARCHAR(255) NOT NULL, us_dollars_to_currency_ratio DECIMAL(12,2) NOT NULL); CREATE TABLE Store_location ( store_location_id DECIMAL(12) NOT NULL PRIMARY KEY, store_name VARCHAR(255) NOT NULL, currency_accepted_id DECIMAL(12) NOT NULL); CREATE TABLE Product ( product_id DECIMAL(12) NOT NULL PRIMARY KEY, product_name VARCHAR(255) NOT NULL, price_in_us_dollars DECIMAL(12,2) NOT NULL); CREATE TABLE Sells ( sells_id DECIMAL(12) NOT NULL PRIMARY KEY, product_id DECIMAL(12) NOT NULL, store_location_id DECIMAL(12) NOT NULL); CREATE TABLE Shipping_offering ( shipping_offering_id DECIMAL(12) NOT NULL PRIMARY KEY, offering VARCHAR(255) NOT NULL); CREATE TABLE Offers ( offers_id DECIMAL(12) NOT NULL PRIMARY KEY, store_location_id DECIMAL(12) NOT NULL, shipping_offering_id DECIMAL(12) NOT NULL); CREATE TABLE Alternate_name ( alternate_name_id DECIMAL(12) NOT NULL PRIMARY KEY, name VARCHAR(255) NOT NULL, product_id DECIMAL(12) NOT NULL); ALTER TABLE Store_location
  • 10. ADD CONSTRAINT fk_location_to_currency FOREIGN KEY(currency_accepted_id) REFERENCES Currency(currency_id); ALTER TABLE Sells ADD CONSTRAINT fk_sells_to_product FOREIGN KEY(product_id) REFERENCES Product(product_id); ALTER TABLE Sells ADD CONSTRAINT fk_sells_to_location FOREIGN KEY(store_location_id) REFERENCES Store_location(store_location_id); ALTER TABLE Offers ADD CONSTRAINT fk_offers_to_location FOREIGN KEY(store_location_id) REFERENCES Store_location(store_location_id); ALTER TABLE Offers ADD CONSTRAINT fk_offers_to_offering FOREIGN KEY(shipping_offering_id) REFERENCES Shipping_offering(shipping_offering_id); ALTER TABLE Alternate_name ADD CONSTRAINT fk_name_to_product FOREIGN KEY(product_id) REFERENCES Product(product_id); INSERT INTO Currency(currency_id, currency_name, us_dollars_to_currency_ratio) VALUES(1, 'Britsh Pound', 0.67); INSERT INTO Currency(currency_id, currency_name, us_dollars_to_currency_ratio) VALUES(2, 'Canadian Dollar', 1.34); INSERT INTO Currency(currency_id, currency_name, us_dollars_to_currency_ratio)
  • 11. VALUES(3, 'US Dollar', 1.00); INSERT INTO Currency(currency_id, currency_name, us_dollars_to_currency_ratio) VALUES(4, 'Euro', 0.92); INSERT INTO Currency(currency_id, currency_name, us_dollars_to_currency_ratio) VALUES(5, 'Mexican Peso', 16.76); INSERT INTO Shipping_offering(shipping_offering_id, offering) VALUES (50, 'Same Day'); INSERT INTO Shipping_offering(shipping_offering_id, offering) VALUES (51, 'Overnight'); INSERT INTO Shipping_offering(shipping_offering_id, offering) VALUES (52, 'Two Day'); --Glucometer INSERT INTO Product(product_id, product_name, price_in_us_dollars) VALUES(100, 'Glucometer', 50); INSERT INTO Alternate_name(alternate_name_id, name, product_id) VALUES(10000, 'Glucose Meter', 100); INSERT INTO Alternate_name(alternate_name_id, name, product_id) VALUES(10001, 'Blood Glucose Meter', 100); INSERT INTO Alternate_name(alternate_name_id, name, product_id) VALUES(10002, 'Glucose Monitoring System', 100); --Bag Valve Mask INSERT INTO Product(product_id, product_name, price_in_us_dollars) VALUES(101, 'Bag Valve Mask', 25);
  • 12. INSERT INTO Alternate_name(alternate_name_id, name, product_id) VALUES(10003, 'Ambu Bag', 101); INSERT INTO Alternate_name(alternate_name_id, name, product_id) VALUES(10004, 'Oxygen Bag Valve Mask', 101); --Digital Thermometer INSERT INTO Product(product_id, product_name, price_in_us_dollars) VALUES(102, 'Digital Thermometer', 250); INSERT INTO Alternate_name(alternate_name_id, name, product_id) VALUES(10005, 'Thermometer', 102); --Electronic Stethoscope INSERT INTO Product(product_id, product_name, price_in_us_dollars) VALUES(103, 'Electronic Stethoscope', 350); INSERT INTO Alternate_name(alternate_name_id, name, product_id) VALUES(10006, 'Cardiology Stethoscope', 103); --Handheld Pulse Oximeter INSERT INTO Product(product_id, product_name, price_in_us_dollars) VALUES(104, 'Handheld Pulse Oximeter', 450); INSERT INTO Alternate_name(alternate_name_id, name, product_id) VALUES(10007, 'Portable Pulse Oximeter', 104); INSERT INTO Alternate_name(alternate_name_id, name, product_id) VALUES(10008, 'Handheld Pulse Oximeter System', 104); --Berlin Extension INSERT INTO Store_location(store_location_id, store_name,
  • 13. currency_accepted_id) VALUES(10, 'Berlin Extension', 4); INSERT INTO Sells(sells_id, store_location_id, product_id) VALUES(1000, 10, 100); INSERT INTO Sells(sells_id, store_location_id, product_id) VALUES(1001, 10, 101); INSERT INTO Sells(sells_id, store_location_id, product_id) VALUES(1002, 10, 102); INSERT INTO Sells(sells_id, store_location_id, product_id) VALUES(1003, 10, 104); INSERT INTO Offers(offers_id, store_location_id, shipping_offering_id) VALUES(150, 10, 52); --Cancun Extension INSERT INTO Store_location(store_location_id, store_name, currency_accepted_id) VALUES(11, 'Cancun Extension', 5); INSERT INTO Sells(sells_id, store_location_id, product_id) VALUES(1004, 11, 101); INSERT INTO Sells(sells_id, store_location_id, product_id) VALUES(1005, 11, 102); INSERT INTO Sells(sells_id, store_location_id, product_id) VALUES(1006, 11, 104); INSERT INTO Offers(offers_id, store_location_id, shipping_offering_id) VALUES(151, 11, 52); --London Extension INSERT INTO Store_location(store_location_id, store_name, currency_accepted_id) VALUES(12, 'London Extension', 1); INSERT INTO Sells(sells_id, store_location_id, product_id) VALUES(1007, 12, 100); INSERT INTO Sells(sells_id, store_location_id, product_id) VALUES(1008, 12, 101);
  • 14. INSERT INTO Sells(sells_id, store_location_id, product_id) VALUES(1009, 12, 102); INSERT INTO Sells(sells_id, store_location_id, product_id) VALUES(1010, 12, 103); INSERT INTO Sells(sells_id, store_location_id, product_id) VALUES(1011, 12, 104); INSERT INTO Offers(offers_id, store_location_id, shipping_offering_id) VALUES(152, 12, 50); INSERT INTO Offers(offers_id, store_location_id, shipping_offering_id) VALUES(153, 12, 51); INSERT INTO Offers(offers_id, store_location_id, shipping_offering_id) VALUES(154, 12, 52); --New York Extension INSERT INTO Store_location(store_location_id, store_name, currency_accepted_id) VALUES(13, 'New York Extension', 3); INSERT INTO Sells(sells_id, store_location_id, product_id) VALUES(1012, 13, 100); INSERT INTO Sells(sells_id, store_location_id, product_id) VALUES(1013, 13, 101); INSERT INTO Sells(sells_id, store_location_id, product_id) VALUES(1014, 13, 102); INSERT INTO Sells(sells_id, store_location_id, product_id) VALUES(1015, 13, 103); INSERT INTO Sells(sells_id, store_location_id, product_id) VALUES(1016, 13, 104); INSERT INTO Offers(offers_id, store_location_id, shipping_offering_id) VALUES(155, 13, 51); INSERT INTO Offers(offers_id, store_location_id, shipping_offering_id) VALUES(156, 13, 52);
  • 15. --Toronto Extension INSERT INTO Store_location(store_location_id, store_name, currency_accepted_id) VALUES(14, 'Toronto Extension', 2); INSERT INTO Sells(sells_id, store_location_id, product_id) VALUES(1017, 14, 100); INSERT INTO Sells(sells_id, store_location_id, product_id) VALUES(1018, 14, 101); INSERT INTO Sells(sells_id, store_location_id, product_id) VALUES(1019, 14, 102); INSERT INTO Sells(sells_id, store_location_id, product_id) VALUES(1020, 14, 103); INSERT INTO Sells(sells_id, store_location_id, product_id) VALUES(1021, 14, 104); INSERT INTO Offers(offers_id, store_location_id, shipping_offering_id) VALUES(157, 14, 52); As a reminder, for each step that requires SQL, make sure to capture a screenshot of the command and the results of its execution. Further, make sure to eliminate unneeded columns from the result set, to name your columns something user- friendly and human readable, and to format any prices as currencies. Section Steps 1. Create the tables in the schema, including all of their columns, datatypes, and constraints, and populate the tables with data. You can do so by executing the DDL and DML above in your SQL client. You only need to capture one or two
  • 16. demonstrative screenshots for this step. No need to screenshot execution of every line of code (that could require dozens of screenshots). 2. Write two queries which together retrieve the price of a digital thermometer in London. The first query will retrieve the currency ratio for the currency accepted in London. Your second query will hardcode the currency ratio retrieved in the first query, in order to determine the price of the thermometer in London. The first query should be dynamic in that the needed currency should be looked up rather than hardcoded. That is, the currency should be obtained by looking up the currency the store location accepts, not hardcoded by manually eyeballing the tables yourself. 3. In step 2, you determined the price of a digital thermometer in London by writing two queries. For this step, determine the same by writing a single query that contains an uncorrelated subquery. Explain: a. how your solution makes use of the uncorrelated subquery to help retrieve the result we embed the query that retrieves the ratio for Euros. The embedded query is termed a subquery because it resides inside of another query. The subquery has the advantage that should the ratio change over time, the overall query will always retrieve the correct results b. how and when the uncorrelated subquery is executed in the context of the outer query, and
  • 17. The result of the subquery does not depend on which product price is retrieved. The ratio of the Euro is the ratio of the Euro; the ratio does not vary if the prices of the products vary. So the SQL engine executes the subquery on its own. c. the advantages of this solution over your solution for step 2. Place a subquery inside of another subquery. It means where we place a subquery determines the role results play in the outer query. 4. Imagine a charity in London is hosting a fundraiser to purchase medical supplies for organizations that provide care to people in impoverished areas. The charity is targeting both people with average income as well a few wealthier people, and to this end asks for a selection of products both groups can contribute to purchase. Specifically, for the average income group, they would like to know what products cost less than 25 Euros, and for the wealthier group, they would like to know what products cost more than 300 Euros. a. Develop a single query to provide them this result, which should contain uncorrelated subqueries and should list the names of the products as well as their prices in Euros. b. Explain how what each subquery does, its role in the overall query, and how the subqueries were integrated to give the correct results. In the list cost more than 300 and less than 25, because of the subquery in the WHERE clause. 5. Imagine that Denisha is a traveling doctor who works for an agency that sends her to various locations throughout the world with very little notice. As a result, she needs to know about medical supplies that are available in all store locations (not just some locations). This way, regardless of where she is sent, she knows she can purchase those products. She is also
  • 18. interested in viewing the alternate names for these products, so she is absolutely certain what each product is. Note: It is important to Denisha that she can purchase the product in any location; only products sold in all stores should be listed, that is, if a product is sold in some stores, but not all stores, it should not be listed. a. Develop a single query to list out these results, making sure to use uncorrelated subqueries where needed (one subquery will be put into the WHERE clause of the outer query). b. Explain how what each subquery does, its role in the overall query, and how the subqueries were integrated to give the correct results. In your thinking about how to address this use case, one item should be brought to your attention – the phrase “all store locations”. By eyeballing the data, you can determine the number of locations and hardcode that number, which will satisfy Denisha’s request at this present time; however, as the number of locations change over time (with stores opening or closing), such hardcoding would fail. It’s better to dynamically determine the total number of locations in the query itself so that the results are correct over time. 6. For this problem you will write a single query to address the same use case as in step 5, but change your query so that the main uncorrelated subquery is in the FROM clause rather than in the WHERE clause. The results should be the same as in step 5, except of course possibly row ordering which can vary. Explain how you integrated the subquery into the FROM clause to derive the same results as step 5. 7. For this problem you will write a single query to address the same use case as in step 5, but change your query to use a correlated query combined with an EXISTS clause. The results
  • 19. should be the same as in step 5, except of course possibly row ordering which can vary. Explain: a. how your solution makes use of the correlated subquery and EXISTS clause to help retrieve the result b. how and when the correlated subquery is executed in the context of the outer query. 8. Compare and contrast the construction of the three different queries you developed in steps 5-7, which all address the same use case. What advantages and disadvantages do each construction have over the others? Which do you prefer and why? Evaluation Your lab will be reviewed by your facilitator or instructor with the following criteria and grade breakdown. Use the Ask the Facilitators Discussion Forum if you have any questions regarding how to approach this lab. Make sure to include your name in the filename and submit it in the Assignments section of the course.
  • 20. Page 1 of 11 Copyright 2016, 2018-2019 Boston University. All Rights Reserved. Page 9 of 10 Criterion A B C DF Letter Grade Correctness and Completeness of Results (70%) All steps' results are entirely complete and correct About ¾ of the steps' results are correct and complete About half of the steps' results are correct and complete About ¼ of the steps' results are correct and complete Virtually none of the step's results are correct and complete Constitution of SQL and Explanations (30%)
  • 21. Excellent use and integration of appropriate SQL constructs and supporting explanations Good use and integration of appropriate SQL constructs and supporting explanations Mediocre use and integration of appropriate SQL constructs and supporting explanations Substandard use and integration of appropriate SQL constructs and supporting explanations Virtually all SQL constructs and supporting explanations are unsuitable or improperly integrated Assignment Grade:#N/A The resulting grade is calculated as a weighted average as listed using A+=100, A=96, A-=92, B+=88, B=85, B-=82 etc. To obtain an A grade for the course, your weighted average should be >=95, A- >=90, B+ >=87, B >= 82, B- >= 80 etc. Sheet1Criterion A B C DFLetter GradeCorrectness and Completeness of Results (70%) All steps' results are entirely
  • 22. complete and correctAbout ¾ of the steps' results are correct and completeAbout half of the steps' results are correct and completeAbout ¼ of the steps' results are correct and completeVirtually none of the step's results are correct and completeConstitution of SQL and Explanations (30%)Excellent use and integration of appropriate SQL constructs and supporting explanationsGood use and integration of appropriate SQL constructs and supporting explanationsMediocre use and integration of appropriate SQL constructs and supporting explanationsSubstandard use and integration of appropriate SQL constructs and supporting explanationsVirtually all SQL constructs and supporting explanations are unsuitable or improperly integratedAssignment Grade:ERROR:#N/AThe resulting grade is calculated as a weighted average as listed using A+=100, A=96, A-=92, B+=88, B=85, B-=82 etc.To obtain an A grade for the course, your weighted average should be >=95, A- >=90, B+ >=87, B >= 82, B- >= 80 etc.A+100A96A-92B+88B85B-82C+78C75C-72D67F0 Productproduct_id {pk}product_nameprice_in_us_dollarsSellssells_id {pk}product_id {fk1}store_location_id {fk2}Currencycurrency_id {pk}currency_nameus_dollars_to_currency_ratioStore_locations tore_location_id {pk}store_namecurrency_accepted_id {fk1}uses0..*1..1has1..10..*has1..10..*Shipping_offeringshippi ng_offering_id {pk}offeringhasOffersoffers_id {pk}store_location_id {fk1}shipping_offering_id {fk2}has1..11..11..*0..*1..1Alternate_Namealtername_name_id {pk}nameproduct_id {fk1}has1..*1..1 Product <<Stereotype>> parameter product_id {pk} product_name price_in_us_dollars Sells
  • 23. <<Stereotype>> parameter sells_id {pk} product_id {fk1} store_location_id {fk2} Currency <<Stereotype>> parameter currency_id {pk} currency_name us_dollars_to_currency_ratio Store_location <<Stereotype>> parameter store_location_id {pk} store_name currency_accepted_id {fk1} uses M1 M2 M3 M4 0..* 1..1 has M1 M2 M3 M4 1..1 0..* has M1 M2 M3 M4
  • 24. 1..1 0..* Shipping_offering <<Stereotype>> parameter shipping_offering_id {pk} offering has M1 M2 M3 M4 Offers <<Stereotype>> parameter offers_id {pk} store_location_id {fk1} shipping_offering_id {fk2} has M1 M2 M3 M4 1..1 1..1 1..* 0..* 1..1 Alternate_Name <<Stereotype>> parameter altername_name_id {pk} name product_id {fk1} has M1
  • 25. M2 M3 M4 1..* 1..1 UNIT 6 LEARNING ACTIVITES Select five activities. Type all activities on one document. Name that document, “Unit Six Activities,” label each activity by number, and do not submit until all five items have been completed.All videos and readings necessary for completion of the following activities are located either in “Unit Six to Read” or “Unit Six to View.” Practice sites will be posted with Unit Six “To Do.” Activity One: Watch the “TurnItIn” video (Found in Unit Six to View) and then list the steps for turning in one of your essays for a plagiarism check. 1 Work Time Required: About 20 minutes. Activity Two: View the video on EasyBib. Then, click on the url link found as first item in “Unit Six to Read”(url.htm) link and select, “MLA 8th Edition” from the list found under the heading, “Our Guides.” Select and read, “Fundamentals of an MLA Citation” and list the core elements of an MLA 8 citation, as they are described in the guide. 2 Work Time Required: About 15-20 minutes Activity Three: Now, continue to work on the same page and select any three of the “How to Cite…” options on the menu. (Website, book and journal) List the information you should
  • 26. gather for the three types of sources you have selected. 1. (For Example, if I want to correctly cite a journal, I need to include the following information…) 3 Work Time Required: About 20-30 minutes. Activity Four: Open the link for your Reading Workout Challenge. (Found in “To Do” Follow the directions to read and respond in writing. Hint! If you copy and paste the workout pages into your saved activities document, you will be able to type your answers directly onto the pages. 4 Work Time Required: About 30 minutes Activity Five: Open and study the sample MLA Works Cited Sample Page (Found in Unit 6 to View.) Create a “Works Cited” page by using EasyBib to cite any five sources you have used for your ENG. 111 essays. Refer to the video on EasyBib and the sample page if you need more information as to how you should set up your citing page or use EasyBib 5 Work Time Required: About 20 minutes 6 Activity Six: (Revision and editing) Visit the Roane State Community College site for revision (Located in “To Read” and select Guide to Comma Use and Run-on Sentences from the side-bar menu. Study the information and examples carefully. Correct the errors found in the student-written paragraph below.
  • 27. State the type of error and how you corrected it. Feel free to comment on errors other than those of punctuation and sentence construction if you wish. Activity Six Revise Paragraph cont….. Transgenders base their sexual preference on sexuality feelings and personal reasoning. In reality not all humans will be the same so a new change has been developed; in which being transgender is the world's new change today. Certain people in today's society have yet to accept them and they behave cruelly towards them. Transgenders have their reasons and purposes for becoming who they are and always wanted to be because they have to be comfortable with themselves if not can cause mental health issues. They undergo many procedures and through a process to express themselves, through the correct and believable way of their mindsets. So they have to be strong sometimes independent and maybe have someone by their side. Everyone deserves to be happy accepted and free into today’s world, no one should be left out because of their sexuality. The world believes appearance is all what matters to but that's not true. Work Time Required: About 20 minutes Activity Seven: Read each statement below. Respond in the left column as to whether you agree (A) or disagree (D) with each statement. Think about why you agree or disagree and write one sentence explaining you viewpoint. 7 Before Reading Agree/Disagree Statement/Question After Reading Agree/Disagree 1. Recreational use of marijuana is harmful.
  • 28. 2. Consuming marijuana by smoking can harm the lungs. 3. Marijuana is an intoxicant. 4. Marijuana can result in slowed reaction times. 5. Continued use of marijuana can result in adverse changes in the brain. Work Time Required: About 10 minutes Activity Eight:Go to Unit 6 to View and click on the link for Cornell Notetaking (Cornell System Educational Videos | WatchKnowLearn) and choose Podcast # 6. View the podcast. Stop the video and follow the directions for preparing a page for Cornell Notetaking, and, then, take notes as you listen to the video on the effects of marijuana on the brain. (Found in Unit 6 to View) You can stop the video by clicking on the screen if the narrative moves too quickly for you, but remember, you cannot stop your professor in the middle of a lecture. When you are finished, recreate your front page of notes in M. Word and copy and paste it into your activities submission. Be sure to include a summary of the page. Use the summary cheat sheet (Found in Unit 6 to View” if you need help writing your summary. 8 9 Work Time Required: About 30-45 minutes Activity Nine:Select and submit any one of the essays you have
  • 29. written for English 111 to the Brainfuse link found on the menu located on the left side of your homepage. Compare the feedback you receive from Brainfuse with that you received from your instructor. 9 Work Time Required: About 30 minutes 100 Activity Ten: Open the link below and study the template it contains. Discuss how using a template when planning an essay is useful. Doc2 Five Paragraph Essay Structure Unit Six.docx Work Time Required: About 5-10 minutes