This document provides instructions for an assignment involving querying an online vehicle sales database and creating dimensional tables for a data warehouse. The key tasks are:
1. Counting rows in each table and verifying minimum counts.
2. Writing a SQL query to find the zip code and make with the largest total car purchases.
3. Creating a PL/SQL block to display total sales for a given zip code.
4. Creating another PL/SQL block to display the zip code with the largest total sales.
5. Verifying the existing financing plans dimension table.
6. Creating and populating the dealerships dimension table.
7. Renaming the vehicles table, creating the
Question 1 Select all the true statements about variance analysi.docx
1. Question 1
Select all the true statements about variance analysis.
Variance analysis only examines actual costs over a specific
period of time.
Variance analysis examines cost differences between standards
and actuals.
Cost elements can be isolated to identify specific drivers of
variance.
Variance analysis is only applicable to the manufacturing
sector.
0.25 points
Question 2
A variance with a negative number (e.g., -2) is always called an
unfavorable variance.
True
False
0.25 points
Question 3
Calculate the direct materials variance and determine if it is
favorable or unfavorable.
Quantity
Price
Standard
20
2. $1.50
Actual
22
$1.25
1.50, favorable
1.50, unfavorable
2.50, favorable
2.50, unfavorable
0.25 points
Question 4
Calculate the price variance for direct materials used to make a
product.
Quantity
Price
Standard
20
$1.50
Actual
22
$1.25
Spent $5.50 more as compared to the standard.
Spent $5.50 less as compared to the standard.
3. Spent $3.50 more as compared to the standard.
Spent $3.50 less as compared to the standard.
Question 5
Calculate the quantity variance of the direct materials used to
make a product.
Quantity
Price
Standard
20
$1.50
Actual
22
$1.25
Variance is $3, favorable
Variance is $3, unfavorable
Variance is $2.5, favorable
Variance is $2.5, unfavorable
0.25 points
Question 6
4. Calculate the variance in direct labor costs and determine if this
is favorable or unfavorable.
Product Hours
Rate of Pay
Standard
8
$80
Actual
10
$70
$20 variance, favorable
$20 variance, unfavorable
$60 variance, favorable
$60 variance, unfavorable
0.25 points
Question 7
Calculate the variance for rate of pay in regards to the
production of a product. Was this favorable or unfavorable?
Hours
Rate of Pay
Standard
8
$80
Actual
10
$70
5. $100 variance, favorable
$100 variance, unfavorable
$80 variance, favorable
$80 variance, unfavorable
Question 8
Calculate the variance for hours worked in regards to the
production of a product. Was this favorable or unfavorable?
Hours
Rate of Pay
Standard
8
$80
Actual
10
$70
$140 variance, favorable
$140 variance, unfavorable
$160 variance, favorable
6. $160 variance, unfavorable
0.25 points
Question 9
Use the break-even formula to calculate the number of widgets
that must be sold to "break-even."
Widgets sell for $1,000 each. The cost to produce is $200 per
Widget, the commission is $100 per Widget, and total fixed
operating costs are $100,000 regardless of activity level (units
manufactured).
Sales = Total Variable Costs + Total Fixed Costs
100
125
143
111
0.25 points
Question 10
Select all the true statements about the break-even point.
It analyzes how demand impacts sales.
It is defined as the point at which all sales exactly equal all the
costs incurred to develop, produce, and deliver a product.
It is a risk-assessment tool.
7. It helps companies determine if they can operate profitably at
different levels of sales.
Question 11
If a manager knows how much profit or target income is
desired, CVP can be used to estimate sales revenue needed.
True
False
0.25 points
Question 12
Calculate the contribution to margin and net income.
Suppose widgets were selling for $1,000 each. The cost to
produce them is $200, the commission for each sold is $100,
and the company incurs $100,000 of fixed costs regardless of
the level of activity.
Total
Per Unit
Ratio
Sales (500 x $1,000)
$500,000
$1,000
100%
Variable costs (500 x $300)
$150,000
$300
30%
Contribution margin
$Blank 1
$700
70%
Fixed costs
$100,000
8. Net income
$Blank 2
0.25 points
Question 13
Select all that apply. The contribution margin:
Is expressed as: variable expenses — revenues.
Is expressed as: revenues — variable expenses.
Reveals how much a company's revenues will contribute to the
company's fixed expenses and net income.
Reveals how much a company's variable expenses will
contribute to the company's revenues and net income.
Question 14
Compute net income for 100 units of production.
Total
Per Unit
Ratio
Sales
$1,000
100%
Variable costs
9. $300
30%
Contribution margin
$700
70%
Fixed costs
$100,000
Net income
$50,000 net income
- $50,000 net income
$30,000 net income
- $30,000 net income
0.25 points
Question 15
The break-even point can be calculated for the following (select
all that apply):
A service
10. Overhead
A product
A company
0.25 points
Question 16
The manager is interested in hitting a specific profit target.
Suppose the widget company was targeting a $200,000 profit
this year. How many widgets would they need to sell?(Hint:
Treat Profit Target like an extra fixed expense!)
Widgets sell for $1,000 each. The cost to produce each is $200,
the commission for each sold is $100, and the company incurs
$100,000 of fixed costs regardless of the level of activity.
143
429
375
100
CREATE TABLE VEHICLES
(VIN VARCHAR2(10),
11. OS_ID VARCHAR2(10),
TRADE_ID VARCHAR2(10),
TYPE VARCHAR2(12),
MODEL VARCHAR2(15),
MAKE VARCHAR2(15),
WHERE_FROM VARCHAR2(15),
WHOLESALE_COST VARCHAR2(15),
CONSTRAINT VEHICLES_PK PRIMARY KEY (VIN),)
Drop Table SALESPERSONS;
CREATE TABLE SALEPERSONS
(SALESPERSON_ID VARCHAR2(10),
TITLE VARCHAR2(12),
FIRST_NAME VARCHAR2(15),
LAST_NAME VARCHAR2(15),
MIDDLE_NAME VARCHAR2(15),
HIRE_DATE DATE,
DEALER_ID VARCHAR2(10),
CONSTRAINT SALEPERSONS_PK PRIMARY KEY
18. (CUST_ID VARCHAR2(10),
FIRST_NAME VARCHAR2(15),
LAST_NAME VARCHAR2(15),
MIDDLE_NAME VARCHAR2(15),
STREET_ADDRESS VARCHAR2(30),
CITY VARCHAR2(15),
STATE VARCHAR2(20),
ZIP VARCHAR2(5),
CONSTRAINT CUSTOMERS_PK PRIMARY KEY
(CUST_ID)
)
Commit
1
Project 3
In this assignment you will be performing some additional
queries against your Online Vehicle Sales
(OVS), Inc. online transaction processing (OLTP) database and
also creating some simple anonymous
PL/SQL blocks.
19. You will also begin the creation of a data warehouse database
for Online Vehicle Sales (OVS), Inc. The
full data warehouse is comprised of 4 dimension tables and a
fact table based on the Star Schema
diagram posted in LEO’s Week #6 area. Your OLTP database
tables and star schema tables will reside in
the same Oracle schema.
This assignment is based on the fully populated tables from
Homework #2 so it assumes you’ve
completed all work for that assignment.
You can perform this assignment based on a database on Nova
or any other Oracle system you wish, but
you must use the Oracle RDBMS.
You should use one or more SQL script files to complete this
assignment. Your script files should contain
all your SQL and PL/SQL code. Do NOT submit your SQL
script files. Doing so may result in confusion
and will result in lost points.
Everything for this assignment must be in a single file. If you
are using SQL*Plus you must put all your
SQL, PL/SQL, and results together in a single SPOOL file. If
you are using SQL Developer or other GUI,
put all your screen snapshots in a single file for both your SQL
statements and PL/SQL as they executed
and the results. Failure to include all your SQL, PL/SQL, and
all your results along with them will result in
lost points.
Do NOT submit additional files as this only complicates the
grading, and will result in lost points.
Here are the specific assignment steps. In order to earn full
20. credit you must keep your steps in order,
number your steps, and put everything in a single file.
1) Execute SELECT COUNT(*) FROM <table_name>;
statements for all 6 of your OVS, Inc. OLTP
tables. You should have at least the following counts:
CUSTOMERS table – 100 rows, VEHICLES table –
50 rows, SALESPERSONS table – 10 rows,
FINANCING_PLANS - 5 rows, SALES table – 200 rows, and
SALES_FINANCINGS table - 200 rows.
2) Via a single SELECT query display the zip code, make,
and count with the largest total car purchases
for a zip code and make combination (there may be a tie with
two or more). Show the SQL statement
you used and the results returned by Oracle from executing your
SQL statement right after the
statement.
3) Develop a PL/SQL anonymous block that displays the total
sales for a zip code for a specific zip
code. You may use any of your zip codes you wish. Show the
PL/SQL statements in your block, the
actual execution of your block, and the results returned.
2
4) Develop a PL/SQL anonymous block that displays the zip
code with the largest total car
purchases. Since there can be a tie with two or more zip codes,
ensure that the lowest numeric zip code
is displayed. The zip code displayed should correlate to the
results of Step #2. Show the PL/SQL
21. statements in your block, the actual execution of your block,
and the results returned.
5) This step begins the creation of your data warehouse.
Ensure that your FINANCING_PLANS table
has already been created and populated via a “SELECT * FROM
financing_plans;” SQL query. This table
is used by both your OLTP database and serves as a dimension
table in the star schema of your data
warehouse database. Your Plan_ID primary key is the
Plan_Code column. Don't worry about changing
this to Plan_Code or changing any other column names you
already have. Show the SQL you used and
executed and the results.
6) Create the DEALERSHIPS star schema dimension table
via SQL. Add at least 2 rows of data via
INSERT statement(s). After populating your DEALERSHIPS
table execute a "SELECT * FROM dealerships;”
SQL statement to display the entire contents. Show all your
SQL code for this step and the Oracle results
from executing it.
7) Create the VEHICLES star schema dimension table via
SQL. Change your existing OLTP VEHICLES
table to OLTP_VEHICLES via the SQL RENAME command and
change your SALES table’s foreign key to
reference this new table name. For the Vehicle_Code primary
key column use an Oracle sequence to
populate the values. For the Description column use all
concatenated combinations of Make and Model
of vehicles you have. Use a PL/SQL block to populate the
Description column by SELECTing the
combinations from your OLTP_VEHICLES table and then
INSERTing the combinations into your new
VEHICLES table, which would best be performed via a cursor
22. in a loop. After populating your VEHICLES
table execute a "SELECT * FROM vehicles ORDER BY
vehicle_code" SQL statement to display the entire
contents. Show all your SQL and PL/SQL code for this step and
the Oracle results from executing it.
Your submission MUST be in a single text, Word, or PDF file
with all steps numbered and in order.
Project 3 grading rubric
Attribute Meets Does Not Meet
CREATE TABLE SQL
statements
20 points
Uses an SQL script file.
Creates the DEALERSHIPS star
schema dimension table.
Creates the VEHICLES star
schema dimension table.
Changes your existing OLTP
VEHICLES table to
OLTP_VEHICLES via the SQL
RENAME command and change
your SALES table’s foreign key to
reference this new table name.
23. 0 points
Does not use an SQL script file.
Does not create the
DEALERSHIPS star schema
dimension table.
Does not create the VEHICLES
star schema dimension table.
Does not change your existing
OLTP VEHICLES table to
OLTP_VEHICLES via the SQL
RENAME command or change
your SALES table’s foreign key
3
Uses an Oracle sequence to
populate the Vehicle_Code
values.
Uses all concatenated
combinations of Make and
Model of vehicles for the
Description column.
Uses an Oracle RDBMS.
24. All SQL statements are syntactically
correct and execute without error.
to reference this new table
name.
Does not use an Oracle
sequence to populate the
Vehicle_Code values.
Does not use all concatenated
combinations of Make and
Model of vehicles for the
Description column.
Does not use an Oracle RDBMS.
All SQL statements are not
syntactically correct or execute
without error.
INSERT SQL statements 25 points
Adds at least 2 rows of data via
INSERT statement(s) to the
DEALERSHIPS Star schema table.
All SQL statements are syntactically
correct and execute without error.
25. 0 points
Does not add at least 2 rows
of data via INSERT
statement(s) to the
DEALERSHIPS Star schema
table.
All SQL statements are not
syntactically correct or execute
without error.
SELECT SQL statements 5 points
Executes SELECT COUNT(*)
FROM <table_name>; for all OLT
tables resulting in expected
counts.
Via a single SELECT query display
the zip code, make, and count
with the largest total car
purchases for a zip code and
make combination.
Ensures that your
FINANCING_PLANS table has
26. already been created and
populated via a “SELECT * FROM
0 points
Does not execute SELECT
COUNT(*) FROM
<table_name>; for all OLT
tables resulting in expected
counts.
Does not, via a single SELECT
query, display the zip code,
make, and count with the
largest total car purchases for
a zip code and make
combination.
Does not ensure that your
FINANCING_PLANS table has
already been created and
27. 4
financing_plans.
After populating your
DEALERSHIPS table execute a
"SELECT * FROM dealerships;”
After populating your VEHICLES
table execute a "SELECT * FROM
vehicles ORDER BY
vehicle_code".
All SQL statements are syntactically
correct and execute without error.
populated via a “SELECT *
FROM financing_plans.
Does not, After populating
your DEALERSHIPS table
execute a "SELECT * FROM
dealerships;”
Does not, after populating
28. your VEHICLES table execute a
"SELECT * FROM vehicles
ORDER BY vehicle_code".
All SQL statements are
syntactically correct and execute
without error.
All SQL statements are not
syntactically correct or execute
without error.
PL/SQL anonymous blocks 40 points
Develops a PL/SQL anonymous
block that displays the total
sales for a zip code for a specific
zip code.
Develops a PL/SQL anonymous
block that displays the zip code
with the largest total car
purchases.
29. Ensures that the lowest numeric
zip code is displayed.
The zip code displayed should
correlate to the results of Step
#2 above.
Uses a PL/SQL block to populate
the Description column by
SELECTing the combinations
from your OLTP_VEHICLES table
and then INSERTing the
combinations into your new
VEHICLES table, which would
best be performed via a cursor
in a loop.
0 points
Does not develop a PL/SQL
anonymous block that displays
the total sales for a zip code
30. for a specific zip code.
Does not develop a PL/SQL
anonymous block that displays
the zip code with the largest
total car purchases.
Does not ensure that the
lowest numeric zip code is
displayed.
The zip code displayed does
not correlate to the results of
Step #2 above.
Does not use a PL/SQL block
to populate the Description
column by SELECTing the
combinations from your
OLTP_VEHICLES table and
then INSERTing the
combinations into your new
31. VEHICLES table, which would
5
best be performed via a cursor
in a loop.
SQL script file and SPOOL file 10 points
Submits either an SQL*Plus SPOOL
file or screen snapshots of the
output if using SQL Developer or
another GUI.
Demonstrates DROP TABLE, CREATE
TABLE, and ALTER TABLE SQL
statements as they executed and
the Oracle responses.
Demonstrates INSERT SQL
statements as they executed and
the Oracle responses.
Displays the contents of all tables
from SELECT * FROM tablename;
statements.
Displays all single SELECT
statements queries.
32. Displays all PL/SQL code and
execution.
Does NOT submit a SQL script file.
Includes a SET ECHO ON SQL*Plus
statement in your SQL script file to
ensure that all the SQL that is
executed is displayed in your
SPOOL file.
0 points
Does not submit either an
SQL*Plus SPOOL file or screen
snapshots of the output if using
SQL Developer or another GUI.
Does not demonstrate DROP
TABLE, CREATE TABLE, and ALTER
TABLE SQL statements as they
executed and the Oracle
responses.
Does not demonstrate INSERT
SQL statements as they executed
and the Oracle responses.
Does not display the contents of
all tables from SELECT * FROM
tablename; statements.
33. Does not display all single SELECT
statements queries.
Does not display all PL/SQL code
and execution.
Submits a SQL script file.
Does not Include a SET ECHO ON
SQL*Plus statement in your SQL
script file to ensure that all the
SQL that is executed is displayed
in your SPOOL file.