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

  Pos database must support the subsystems

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

  Point totals by race level listing

List the Rider's Name, RaceLevel as Race_Level and the total number of all points based on their placement. Make sure that you don't list any riders who have not raced in any races yet (not placed yet).

  Create a clustered index on the groupid column

Write the CREATE INDEX statements to create a clustered index on the GroupID column and a nonclustered index on the IndividuallD column of the GroupMembership table.

  Write command that will remove barry from the student table

Write a command that will remove Barry from the Student table. Write statement to add an attribute, Class to the Student table? What is the smallest section number used in the FALL-2014 semester?

  Provide four queries to answer questions asked by end users

Explain how you will go about developing this database. Provide at least four queries that answer some of the questions asked by the end users.

  Create a form for the table customer

Create a form for the table CUSTOMER with all fields except Postcode. Choose ‘Tabular' layout - Write an UPDATE Query and increase the prices of products

  Identification of major implementation flaws

ICT320 - Database Programming Identification of major implementation flaws and/or areas for improvement, including and identification of & proposal to remove repeated data.

  Submit the table creation statements for the database model

submit the table creation statements for the database model. submit them all in a single script file.also submit a

  Describe the main capabilities of mysql

Based on your post-installation research, describe the main capabilities of MySQL. Include the screen shot which shows that MySQL is installed on your computer.

  Implementation of batch file to create and populate database

You must write a batch file which creates and populates a database of between 4 and 6 tables. The database must be of your own making and should be of an area of interest to you or related to your work. The database must be stored in a folder whic..

  Create tables using sql ddl

Write the SQL DDL to create the database that contains each of the relations shown in the above ERD. You will need to provide - Your DDL code for each table that you create and a screenshot showing each table that is created.

  Discuss any of the readings from the given eactivity

SEC420- Discuss any of the readings from the eActivity or the article from the Instructor Insight. Discuss any relevant current event

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