Sie sind auf Seite 1von 14

ADVANCED DATABASE SYSTEM

Group Assignment 2
Disusun Oleh:
ANDRIE MARVA PUTRA (1701531235)
ARIEF RAMADHAN HELDIAN (1701531336)
BENIGHIN LAMPAH
BUDI UTOMO AL SUNARDI (1701527471)
DINA ROBIANA SITOMPUL (1701532774)
PUJO DWI ARYANTO (1701532824)

An new online store has been recognizing for online retail system which
handle their customer order from all over cities around the world. They
need your expertise in order to setup their OLAP application to help their
high level management to make fast reports.
Based on their four monthly product sales reports as shown down
below, please describe and explain your expertise regarding with :

Nb: for example these reports only print out 4 products (Laptop, Server,
Printer and Scanner) which part of 2 type of product (Computer and Office)
where Laptop and Server are Computer type of product, while Printer and
scanner are Office type of product. Moreover, these reports are only shown
their customer origin from 4 cities such as Jakarta, Bandung, Manchester and
London, where Jakarta and Bandung are from Indonesia, while Manchester and
London are from United Kingdom.

DATABASE DESIGN FOR


DATAWAREHOUSE WITH STAR CONCEPT ?

DATABASE DESIGN FOR DATAWAREHOUSE


WITH SNOWFLAKING CONCEPT ?

OLTP/TPS DATABASE DESIGN ?

SQL STATEMENT TO CREATE REPORT NUMBER


1 FROM OLTP/TPS DATABASE?

- Database = oltp_report1/oltp_report1.sql
- Report = oltp_report1 /oltp_report1.jrxml
oltp_report1/oltp_report1.pdf
- Query =
SELECT MONTH(s.TransactionDate) AS Month, YEAR(s.TransactionDate) AS Year, p.ProductName,
pt.ProductTypeName, cg.City, cg.Country, sd.Quantity,
sd.TotalLine
FROM Sales s
LEFT JOIN Customer c ON c.CustomerID = s.CustomerID
LEFT JOIN CustomerOrigin cg ON cg.CustomerOriginID = c.CustomerOriginID
LEFT JOIN SalesDetail sd ON sd.SalesID = s.SalesID
LEFT JOIN Product p ON p.ProductID = sd.ProductID
LEFT JOIN ProductType pt ON pt.ProductTypeID = p.ProductTypeID
ORDER BY c.CustomerID

SQL STATEMENT TO CREATE REPORT NUMBER 2 FROM


DATAWAREHOUSE SNOWFLAKE SCHEMA DATABASE ?
- Database = snowflake_report2/snowflake_report2.sql
- Report = snowflake_report2/snowflake_report2.jrxml
snowflake_report2/snowflake_report2.pdf
- Query =
SELECT MONTH(fs.TransactionDate) AS Month, YEAR(fs.TransactionDate) AS Year, pt.ProductTypeName,
co.CountryName, SUM(fs.Amount) AS Amount, SUM(fs.TotalPrice) AS TotalPrice
FROM FactSales fs
LEFT JOIN CustomerOrigin cg ON cg.CustomerOriginID = fs.CustomerOriginID
LEFT JOIN Country co ON co.CountryID = cg.CountryID
LEFT JOIN Product p ON p.ProductID = fs.ProductID
LEFT JOIN ProductType pt ON pt.ProductTypeID = p.ProductTypeID
GROUP BY MONTH(fs.TransactionDate), YEAR(fs.TransactionDate), pt.ProductTypeName, co.CountryName
ORDER BY co.CountryName,pt.ProductTypeName

SQL STATEMENT TO CREATE REPORT NUMBER


2 FROM DATAWAREHOUSE STAR SCHEMA
DATABASE ?
- Database = star_report2/star_report2.sql
- Report = star_report2/star_report2.jrxml
star_report2/star_report2.pdf
- Query =
SELECT MONTH(fs.TransactionDate) AS Month, YEAR(fs.TransactionDate) AS Year,
p.ProductType,
cg.Country, SUM(fs.Amount) AS Amount, SUM(fs.TotalPrice) AS TotalPrice
FROM FactSales fs
LEFT JOIN CustomerOrigin cg ON cg.CustomerOriginID = fs.CustomerOriginID
LEFT JOIN Product p ON p.ProductID = fs.ProductID
GROUP BY MONTH(fs.TransactionDate), YEAR(fs.TransactionDate), p.ProductType, cg.Country
ORDER BY cg.Country,p.ProductType

TERIMA KASIH

Das könnte Ihnen auch gefallen