Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 6

Department of Computer Engineering

Academic Year 2021 – 2022

Practical No: 1

Title: Case Study on building Data Warehouse/Data Mart

Date of Performance: 26/07/2021

Date of Submission: 02/08/2021

Name of the Student: Candida Ruth Noronha

Class: TE COMPS B

Roll No: 8960

Evaluation

Indicator BS – Below Standard MS - Meet ES - Exceeds Marks


standard Standard awarded
Organization (2) Poor readability Good Good Readability
and not structured readability and and structured(2)
(0) somewhat
structured (1)
Level of Major points are All major topics Most major and
content (4) omitted or are covered, the some minor criteria
addressed minimally information is are included.
(1) accurate(3) Information
Is Accurate (4)
Support of None in Few of the All Answers are
Diagrams evidence; answers are supported by
and superficial supported by examples and
Examples at most (0) diagrams and diagrams
(2) examples wherever needed.
(1) (2)
Knowledge (2) Superficial Basic concepts Clear with all basic
knowledge / are clear(1) concepts and able
Failed to explain to relate it to real
basic concepts world
(0) (2)
Total marks
awarded (10)

Signature of the Teacher


► Experiment No. 1 : Case Study on building Data Warehouse/Data Mart
In this experiment, we
1. Define the problem statement for building the data warehouse.
2. Draw the Star-schema for the above case study.
3. Draw the Snowflake schema for the above
case study. Here, we define the case study for
“Hotel Occupancy”. It consists of four
dimension tables and one fact table.

Dimension Tables :

Hotel Room Customer Time


HotelID RoomID CustomerID Date
HotelName RoomType CustomerName Day_of_week
Rooms Max_Occupant Address Day_of_mont
h
StarRating No_of_beds Type_of_stay Week
Region Room_side Check_in Month
City AC Check_out Year
State Renovation_year Amount_paid Holiday
Country
In the above tables, Primary Keys are underlined.
Attributes AC and Holiday are Flag Variables with values ‘Y’ or ‘N’.

Fact Table :

HotelOccupancy
HotelID (FK)
RoomID (FK)
CustomerID (FK)
Date (FK)
No_of_occupied_roo
ms
No_of_vacant_rooms
Revenue
FK indicates Foreign Key Referencing the respective dimension tables.
Data warehouse Schema
 Schema is a logical description of the entire database.
 It includes the name and description of records of all record types including all associated
data-items and aggregates.
 A database uses relational model, while a data warehouse uses Star, Snowflake, and Fact
Constellation schema.

Star schema:
 It is called as STAR SCHEMA, when the center of the star can have one fact table and a
number of associated dimension tables. 
 It is known as star schema as its structure resembles a star.
 The Star Schema data model is the simplest type of Data Warehouse schema. 
 It is also known as Star Join Schema and is optimized for querying large data sets.

Snowflake schema:
 Snowflake Schema in data warehouse is a logical arrangement of tables in a
multidimensional database such that the ER diagram resembles a snowflake shape.
 A Snowflake Schema is an extension of a Star Schema, and it adds additional
dimensions. 
 The dimension tables are normalized which splits data into additional tables.

Difference between star schema and snowflake schema:

STAR SCHEMA SNOWFLAKE SCHEMA


Hierarchies for the dimensions are stored in Hierarchies are divided into separate tables
the dimensional table
It contains a fact table surrounded by One fact table surrounded by dimension table
dimension tables which in turn surrounded by dimension table
In a star schema, only single join creates the A snowflake schema requires many joins to
relationship between the fact table and any fetch the data
dimension tables.

Problem Statement:
The online food ordering system sets up a food menu online and customers can easily place the
order as per they like. Also, the online customers can easily track their orders. The management
maintains customer’s database, and improve food delivery service.
This system also provides a feedback system in which user can rate the food items. Also, the
proposed system can recommend hotels, food, based on the ratings given by the user, the hotel
staff will be informed for the improvements along with the quality. The payment can be made
online or cash or pay-on-delivery system. For more secured ordering separate accounts are
maintained for each user by providing them an ID and a password

Dimension Tables:

Product Restaurant DeliveryPerson Customer

ProductId RestaurantId DeliveryPersonId CustomerId

ProductName RestaurantName DeliveryPersonName CustomerName

Category Region Location Region

VegOrNonveg State DeliveryPersonContact State

Country Country

PinCode PinCode

StarRating CustomerContact

In the above tables, Primary Keys are underlined.


Attribute VegOrNonveg is a flag variable with values V and N

Fact table:

OrderDetails

ProductId (FK)

RestaurantId (FK)

DeliveryPersonId (FK)

CustomerId (FK)

TotalAmount

PaymentType

FK indicates Foreign Key Referencing the respective dimension tables.


Star Schema:

Snowflake Schema:

You might also like