Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Danielle was pleased with your results for the New Jeans fashion store DW and wants you to have a go for the New Jeans HR

Danielle was pleased with your results for the New Jeans fashion store DW and wants you to
have a go for the New Jeans HR database! This exercise is based on the Star Schema created
in Week 02 for the New Jeans HR database.
(a) You might want to improve and update your star schema from Week 02.
Otherwise, you can leave it if you think that is the best schema you produced.
(b) The ERD/tables for the HR Database are in the Oracle SQL Developer AWS
server already Jobs, Job History, Employees etc NOT ZJLB
(c) Write SQL statements to create the necessary dimension tables and a fact table
(for all the names for table and views, make sure they start with dwhr_) based
on the schema in (a). Step 3-7 of Star Schema creation
(d) Write SQL statements to populate data from the HR Database Example
provided in New Jeans Star Schema and Laksa Delight sample
Note: you can combine (b) and (c) together to create tables and populate the tables
at the same time. You just have to make sure you add data to the dimension tables
first before the fact table, otherwise you will violate the constraints on the fact
table.
(e) There are a number of ways to create dimension tables and a fact table. For this
exercise, it is recommended to create a current_emp_flag column in the
dwhr_employees_dimension table. If an employee has retired or resigned, then
current_emp_flag column becomes N(No), otherwise the column should be Y
(Yes).
o When denormalising tables, join them together in SQL. The New Jeans
star schema provides an example of this.
o For current_emp_flag, in the SQL code, add another line in the select
statement for employees
(f) How do you populate the data for the fact table? The challenge here is how can
you put job_history and employees tables together to form a fact table.
o HINT: Consider creating 1 table that has current positions and 1 table with
past information (use job history) and then join the tables together as a
union.
(g) Your tutor should be able to run your SQL statements without having to change
any syntax.

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