I’m working in sql plus. Can someone help me.? I’m having problem creating the database
/in Feeds /by adminI’m working in sql plus. Can someone help me.? I’m having problem creating the database.
FolderProject 2InstructionsCMIS-420 Project #2In this assignment you will be creating a data warehouse database for Online VehicleSales (OVS), Inc. The data warehouse is comprised of 4 dimension tables and a fact tablebased on the Project #2 Star Schema diagram posted in LEO’s Week #6 area. Your OLTPdatabase tables and star schema tables will reside in the same Oracle schema.You can perform this assignment based on a database on Nova or any other Oraclesystem you wish, but you must use the Oracle RDBMS.You should use one or more SQL script ±les to complete this assignment. Your script ±lesshould contain all your SQL and PL/SQL code. Do NOT submit your SQL script ±les.Doing so may result in confusion and will result in lost points.Everything for this assignment must be in a single ±le. If you are using SQL*Plus youmust put all your SQL, PL/SQL, and results together in a single SPOOL ±le. If you areusing SQL Developer or other GUI, put all your screen snapshots in a single ±le for bothyour SQL statements and PL/SQL as they executed and the results. Failure to include allyour SQL, PL/SQL, and all your Oracle execution results along with them will result in lostpoints.Do NOT submit additional ±les as this only complicates the grading, and will result in lostpoints.The speci±c assignment steps are listed below. In order to earn full credit you must keepyour steps in the order shown, number your steps, and put everything in a single ±le.Your FINANCING_PLANS table should already be created and populated. Your Plan_IDprimary key is the Plan_Code column. Don’t worry about changing this to Plan_Code orchanging any other column names you already have.1) Create the DEALERSHIPS star schema dimension table via SQL. Add at least 2 rowsof data via INSERT statement(s). After populating your DEALERSHIPS table execute a“SELECT * FROM dealerships;” SQL statement to display the entire contents. Show allyour SQL code for this step and the Oracle results from executing it.2) Create the VEHICLES star schema dimension table via SQL. Change your existingOLTP VEHICLES table to OLTP_VEHICLES via the SQL RENAME command and change yourSALES table’s foreign key to reference this new table name. For the Vehicle_Codeprimary key column use an Oracle sequence to populate the values. For the Descriptioncolumn use all concatenated combinations of Make and Model of vehicles you have. Usea PL/SQL block to populate the Description column by SELECTing the combinations fromyour OLTP_VEHICLES table and then INSERTing the combinations into your new VEHICLEStable, which would best be performed via a cursor in a loop. After populating yourVEHICLES 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 thisstep and the Oracle results from executing it.3) Create the TIMES star schema dimension table via SQL. This is “TIME” table in thestar schema Fgure. The Sale_Day primary key column values should be all dates fromyour Frst sale date through and including your last sale date from your SALES table. TheDay_Type values should be ‘Weekday’, ‘Weekend’, or ‘Holiday’ (this trumps Weekday andWeekend). Set all occurrences of the following days for your date range to be holidays:New Year’s Day, Martin Luther King Jr’s Birthday, President’s Day, Memorial Day, 4thofJuly, Labor Day, Columbus Day, Veterans Day, Thanksgiving, and Christmas. Use aPL/SQL block to populate the TIMES table. After populating your TIMES table execute theSQL statement “SELECT day_type, COUNT(*),MIN(sale_day),MAX(sale_day) ±ROM timeGROUP BY day_type ORDER BY day_type” to show the summarized contents of yourtable. Show all your SQL and PL/SQL code for this step and the results.4) Create the SALES_±ACTS star schema fact table via SQL. Ensure that you havedeclared foreign keys of Sale_Day, Vehicle_Code, Plan_Code, and Dealer_ID to referenceyour TIMES, VEHICLES, ±INANCING_PLANS, and DEALERSHIPS tables, respectfully. Ensurethat you have a primary key for the SALES_±ACTS table that is a composite of theSale_Day, Vehicle_Code, Plan_Code, and Dealer_ID columns. Do a DESC (i.e. DESCRIBE)of your SALES_±ACTS table after it’s created.Your submission MUST be in a single Word or PDF fle with all steps numberedand in order.
