You are on page 1of 8

Bahria University, Islamabad Campus

Department of Computer Sciences


Class/Section: BSCS

Subject: Data Warehousing

(FALL 2022 Semester)

Assignment # 2
Name: M Fawad ul Islam Enroll no: 01-235182-107

Note: In Case of Copy/Paste Zero Marks will be awarded

Question # 1

Design a detailed Relational ER model of any Telecom Company working in Pakistan and then
perform the following denormalization methods one by one, give necessary detail with each
method.

ER model:
Tables:

We have following tables:

Employees
Emp_id Emp_name Gender Designation

Department
Dept_id Dept_name

Customer
Cust_id Cust_name CNIC Phone num

Product
product_id product_name product_category Price

Order
Order_id Order_name

Package
Packg_id Pckg_name Pckg_category Duration Price

Bill
Bill_id Amount Due date Last date

Denormalization using Adding Redundant Columns:


We will do denormalization by adding redundant columns:

We simply add dept_id and dept_name in employee’s table

Employees
Emp_id Emp_name Dept_id Dept_name Gender Designation

We can add customer name column in bill table. We need customer name while checking bill.

Bill
Bill_id Customer name Amount Due date Last date

We simply add product name into order table because we need product name while checking
order.

Order
Order_id Order_name Product name

Denormalization using Adding Derived Columns:

We need to check orders. How many orders are received? We will use aggregate function. We
donot need to make a separate table of aggregation function with order id. By using
denormalization, we simply add a column of aggregate function in order table.

Order
Order_id Order_name Count (Order_id)

Denormalization using Combining tables

If a company/user want to see an order details, then we simply add both tables.
Order
Order_id Order_name Product name Product category Price

Denormalization by creating extracted tables:

We simply create a table of order details if a user want to see details of their order can easily see.

Order details
Order_id Cust_name Product name Product category Price

Denormalization using Partition Relations by using

Horizontal Partition

We have different package category in package tables. We are simply horizontal partition the package
table. PTCL have different package categories.

Package category
Internet package
Smart TV package
Call package
Evo charji package

Vertical Partition

We simply vertical partition the package table.

Package
Packg_id Pckg_name Pckg_category
Package
Packg_id Duration Price

Question # 2

Suppose you have a database that contains transaction information of any software house that is
known best for web-based products. You are required to identify proper dimensions to build a
cube and then perform OLAP operations on that cube.

OLAP cube:

OLAP operations:

Roll up:

If we want to see total product sales by country, then we simply apply rollup operation.
Drill down:

If we want to see total monthly product sales, then we simply apply drill down operation.

Slice:

If we want to see total product sales in Q1 then we will use slice.


Dice:

If we want to see total sales in two different cities in different quarters then we use dice.
Software house have clients in different locations

Pivot:

You might also like