Create the vehicles star schema dimension table via sql

Assignment Help PL-SQL Programming
Reference no: EM131955790

Project Assignment

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.

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 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.

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 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 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.

Reference no: EM131955790

Questions Cloud

How much money would you need to invest : You have your choice of two investment accounts. Investment A is a 12-year annuity that features end-of-month $1,300 payments and has an interest rate of 7.1.
Snap shot of firms financial position at point in time : although the balance sheet can be thought of as a snap shot of a firms financial position at a point in time,
Examine the most recent form : Choose a publicly-traded company with international operations and examine its most recent Form 10k and other resources available to you.
Identical speeds from the top of the same building : Question: Three rocks of equal mass are thrown with identical speeds from the top of the same building (identical height).
Create the vehicles star schema dimension table via sql : Create the DEALERSHIPS star schema dimension table via SQL. Create the VEHICLES star schema dimension table via SQL.
How much work does a person : How much work does a person do if they push an object with 12.0 N for 8.0 m in Joules and kcal?
Liquidate some equipment that is being replaced : Allen Air Lines must liquidate some equipment that is being replaced. What is the equipment's after-tax net salvage value?
Thermodynamics point of view : Electric cars need charging. Discuss, from a thermodynamics point of view, the efficiency of electric cars where electricity is not generated from renewable.
How would you describe jennys leadership : If you were asked to follow in Jenny's footsteps, do you think you could or would want to manage City Mortgage with a similar style?

Reviews

Write a Review

PL-SQL Programming Questions & Answers

  Write the needed sql to list all product names

Write the needed SQL to list all product names (and only product names) from the Products table that fall into the category of "condiments." The list of products should be in ascending order.

  Write a script that uses two variables

Write a script that uses two variables to store (1) the count of all of the products in the Products table and (2) the average list price for those products. If the product count is greater than or equal to

  Design and implement an inventory database

This phase is to be implemented by each student individually, without the help of others. You will design and implement an inventory database - Design and implement an inventory database

  Develop a pl/sql user-defined function

Develop a PL/SQL user-defined function ZIP_CODE_SALES_WINNER that returns 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 returned.

  Write command that would enable bruno to grant select access

Write the SQL commands that would enable bruno-s to grant SELECT access to these tables to hulk hogan and undertaker.

  Determine the commissions paid to specific employees of sale

Design a query that will allow the finance department to determine the commissions paid to specific employees of the sales department for the month of December.

  Pos database must support the subsystems

The POS database must support the subsystems: Invoicing, Inventory Management, Customer Management, and Employee Management.

  If the value for the listprice column is a negative number

If the value for the ListPrice column is a negative number, the stored procedure should raise an error that indicates that this column doesn't accept negative numbers. Similarly, the procedure should raise an error if the value for the DiscountPer..

  Add a new parts record and delete an existing parts record

Add a new parts record, delete an existing parts record, and update an existing parts record.

  Create the times star schema dimension table via sql

Create the TIMES star schema dimension table via SQL. This is "TIME" table in the star schema figure. The Sale_Day primary key column values should be all dates from your first sale date through and including your last sale date from your SALES ..

  Create a new basket containing two items

Create a procedure named BASKET_CONFIRM_SP that accepts the input values specified in the preceding description. Keep in mind that you're modifying an existing row of the BB_BASKET table in this procedure.

  Create tables with appropriate primary keys and foreign keys

Return the names of all employees whose company is in Baltimore - Return the names of employees of Verizon who are managers.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd