Professional Documents
Culture Documents
Assignment # 2
Name: M Fawad ul Islam Enroll no: 01-235182-107
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:
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
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
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)
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
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
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
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 sales in two different cities in different quarters then we use dice.
Software house have clients in different locations
Pivot: