Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

You are tasked with developing a small data warehouse for the HAFH2 company. The company is interested in keeping track of building inspections for data

You are tasked with developing a small data warehouse for the HAFH2 company. The company is interested in keeping track of building inspections for data analytics purposes.

Instructions: Write SQL code in the space provided below each question.

image text in transcribed 1) Create the following data warehouse tables in your database using SQL code (e.g. create table dw_buildingdim ...) NOTE: Use auto increment option for the dimensions key. For example, for dw_buildingDim, the SQL code starts like: buildingkey INT NOT NULL AUTO_INCREMENT

2) Create a view named buildinginfo containing columns: buildingid, bnooffloors, mfname, and mlname by inner joining building and manager tables.

3) Insert rows in the buildinginfo table into dw_buildingDim.

4) Create a view named inspectioninfo containing columns: insname, datelast, datenext, insresult and buildingkey by inner joining inspector, inspecting and dw_building tables.

5) Insert rows in the inspectioninfo table into dw_inspectionFact.

6) If you come this far without any errors, then your data warehouse is ready to test. Write a query showing all information from dw_inspectionFact and dw_buildingDim by inner joining them.

7) Insert the screenshot of the resulting output of Question-6 below.

dw_buildingDim: dw_inspectionFact

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

4. Devise an interview strategy from the interviewers point of view

Answered: 1 week ago