Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask DBMS Expert


Home >> DBMS

Project

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

DBMS, Programming

  • Category:- DBMS
  • Reference No.:- M92791906

Have any Question?


Related Questions in DBMS

Question talk about the importance of pulling data from

Question : Talk about the importance of pulling data from worksheets into a single sheet also the ways excel could be a solution to a complex challenge. The response must be typed, single spaced, must be in times new rom ...

Data mining assignment -in this assignment you are asked to

Data Mining Assignment - In this assignment you are asked to explore the use of neural networks for classification and numeric prediction. You are also asked to carry out a data mining investigation on a real-world data ...

Case study problem 1 the case study company has experienced

Case Study: Problem 1 The case study company has experienced rapid growth in both the size of its client base and also in the services provided to clients. Unfortunately, the growth in data management policies, procedure ...

Q1 given the following file for assignment workercom

Q1. Given the following file for assignment worker.com, identify data anomalies that must be removed before data can be loaded in data warehouse. Worker_assignment ← -----------------on course web site File is available ...

Relational database exerciseyou have been assigned to a new

Relational Database Exercise: You have been assigned to a new development team. A client is requesting a relational database system to manage their present store with the anticipation of adding more stores in the future. ...

Assignment question - write and run sql statements to

Assignment Question - Write and run SQL statements to complete the following tasks Part A - DML 1. Locate the record in the vendor table that does not have a value for the attribute V_STATE 2. Find the customers whose ba ...

Answer the following question explain the difference

Answer the following Question : Explain the difference between a database management system (DBMS) and a database. Are Microsoft Access, SQL Server, and Oracle examples of databases or database management systems (DBMS)?

In sql developercreate a table userpermissions provide

IN SQL DEVELOPER Create a table UserPermissions (provide create and insert statements code) Document UserName Policy SYSTEM Menu JDOW W2 USAM Permissions SYSTEM W2 JDOW Form 1040 USAM Policy JDOW W2 SYSTEM Write a PL/SQL ...

Solve the following questions using oracle you are not

Solve the following questions using Oracle. You are not allowed to use the syntax of any DBMS other than Oracle. Make sure to upload an electronic copy of your solution to your CSC335 TRACE folder. Name the file hw4.sql. ...

Question team project submission - submit to the unit 4

Question: Team Project Submission - Submit to the Unit 4 Group Project Area This version of the capstone project assignment is FOR GRADING this week. Submit to the group area the document containing completed Sections On ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As