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

ASSINGMENT:- 2

SUBMITTED TO :- MANDEEP MA’AM


SUBMITTED BY :- NISHANT RUHIL
UID :-17BCA1513
GROUP:-4
CLASS:- BCA-4D

Q: Trace out the comparison between star schema and snowflake schema

Ans- STAR SCHEMA

The star schema is the simplest type of Data Warehouse schema. It is known as star schema as its
structure resembles a star. In the Star schema, the center of the star can have one fact tables and
numbers of associated dimension tables. It is also known as Star Join Schema and is optimized for
querying large data sets.For example, as you can see in the above-given image that fact table is at the
center which contains keys to every dimension table like Deal_ID, Model ID, Date_ID, Product_ID,
Branch_ID & other attributes like Units sold and revenue.

Characteristics of Star Schema:

1. Every dimension in a star schema is represented with the only one-dimension table. 2. The
dimension table should contain the set of attributes. 3. The dimension table is joined to the fact
table using a foreign key 4. The dimension table are not joined to each other 5. Fact table
would contain key and measure 6. The Star schema is easy to understand and provides optimal
disk usage. 7. The dimension tables are not normalized. For instance, in the above figure,
Country_ID
does not have Country lookup table as an OLTP design would have. 8.
The schema is widely supported by BI Tools

SNOWFLAKE SCHEMA

A Snowflake Schema is an extension of a Star Schema, and it adds additional dimensions. It is


called snowflake because its diagram resembles a Snowflake.The dimension tables are normalized
which splits data into additional tables. In the following example, Country is further normalized
into an individual table.
Characteristics of Snowflake Schema:

1. The main benefit of the snowflake schema it uses smaller disk space. 2. Easier to
implement a dimension is added to the Schema 3. Due to multiple tables query performance is
reduced 4. The primary challenge that you will face while using the snowflake Schema is that
you
need to perform more maintenance efforts because of the more lookup tables.

Q: Illustrate the role of query manager in data warehouse architecture.

Ans- The query manager is responsible for directing the queries to suitable tables. By directing the
queries to appropriate tables, it speeds up the query request and response process. In addition, the
query manager is responsible for scheduling the execution of the queries posted by the user.

Query Manager Architecture

A query manager includes the following components −

1. Query redirection via C tool or RDBMS 2.


Stored procedures 3. Query management tool 4.
Query scheduling via C tool or RDBMS 5.
Query scheduling via third-party software 6.
Query Manager Functions of Query Manager

1. It presents the data to the user in a form they understand. 2. It schedules the execution of the
queries posted by the end-user. 3. It stores query profiles to allow the warehouse manager to
determine which indexes and
aggregations are appropriate.

Q: Elaborate Snowflake schema with example.

Ans- A Snowflake
Schema is an
extension of a Star
Schema, and it adds
additional
dimensions. It is
called snowflake
because its diagram
resembles a
Snowflake.
The dimension tables are normalized which splits data into additional tables. In the following
example, Country is further normalized into an individual table.

Characteristics of Snowflake Schema:

1. The main benefit of the snowflake schema it uses smaller disk space.

2. Easier to implement a dimension is added to the Schema

3. Due to multiple tables query performance is reduced

4. The primary challenge that you will face while using the snowflake Schema is that you
need to perform more maintenance efforts because of the more lookup tables.

Q: Difference b/w OLTP and OLAP.

Ans- OLAP

Online Analytical Processing, a category of software tools which provide analysis of data for
business decisions. OLAP systems allow users to analyze database information from multiple
database systems at one time.The primary objective is data analysis and not data processing.

Any Datawarehouse system is an OLAP system. Uses of OLAP are as follows

A company might compare their mobile phone sales in September with sales in October, then
compare those results with the with another location which may be stored in a sperate
database.Amazon analyzes purchases by its customers to come up with a personalized homepage
with products which likely interest to their customer.

BENEFITS –
1. OLAP creates a single platform for all type of business analytical needs which includes
planning, budgeting, forecasting, and analysis. 2. The main benefit of OLAP is the
consistency of information and calculations. 3. Easily apply security restrictions on users
and objects to comply with regulations and
protect sensitive data.

DRAWBACKS-
Implementation and maintenance are dependent on IT professional because the traditional
OLAP tools require a complicated modeling procedure.

OLAP tools need cooperation between people of various departments to be effective which
might always be not possible.

OLTP

Online transaction processing shortly known as OLTP supports transaction-oriented


applications in a 3-tier architecture. OLTP administers day to day transaction of an
organization.The primary objective is data processing and not data analysis

An example of OLTP system is ATM center. Assume that a couple has a joint account with a
bank. One day both simultaneously reach different ATM centers at precisely the same time and
want to withdraw total amount present in their bank account.

However, the person that completes authentication process first will be able to get money. In
this case, OLTP system makes sure that withdrawn amount will be never more than the amount
present in the bank. The key to note here is that OLTP systems are optimized for transactional
superiority instead data analysis.

Other examples of OLTP system are:

1. Online banking 2. Online


airline ticket booking 3. Sending
a text message 4. Order entry 5.
Add a book to shopping cart

BENEFITS-

1. It
administers daily transactions of an organization. 2. OLTP widens the customer base of an
organization by simplifying individual processes.

DRAWBACKS-
1. If
OLTP system faces hardware failures, then online transactions get severely affected. 2.
OLTP systems allow multiple users to access and change the same data at the same time
which many times created unprecedented situation.

Q: Illustrate Shell fragment cube computation method in detail with diagram.


Ans- SHELL SHELL FRAGMENTAT
FRAGMENTATION CUBE COMPUTATION METHOD
Generalize the 1-D inverted nverted indices indices to to multi
multi-dimensional ones in the data cube sense
• Compute all cuboids cuboids for for data data cubes cubes AB
ABC and DE while retaining the inverted indices
For example, shell ll fragment fragment cube cube ABC ABC co
contains 7 cuboids:
• A, B, C
• AB, AC, BC
• ABC
• This completes es the the offline offline computatio
computation stage
• shell Fragment nt Cubes: Cubes: Size Size and and Desig
Design
• Given a database base of of T T tuples, tuples, D D dimen
dimensions, and F shell fragment agment size, size, the the fragmen
fragment cubes’ space requirement requirement is: is:
• For F < 5, the e growth growth is is sub
sub-linear
• Shell fragments nts do do not not have have to to be be disj
disjoint
• Fragment groupings upings can can b
be arbitrary to allow for maximum ximum online online performanc
performance
• Known common on combinations combinations (e.g.,<
(e.g.,<city, state>) should d be be grouped grouped together. together.
• Shell fragment nt sizes sizes can can be be adjusted adjusted fo
for optimal balance ce between between offline offline and and o
online computation
ID_Measure easure Table Table
If measures other than n countare countare present, present, store
store in ID_measuretable separate arate from from the the shell shell
Online Query Computation:
Query- query has the general general form form
Each ai has 3 possible values
1.Instantiated value 2.Aggregate 2.Aggregate * * func
function 3.Inquire ? function
Online Query Computation: utation: Method Method
Given the fragment cubes, ubes, process process a a query query as
as follows
1.Divide the query into into fragment, fragment, same same as as th
the shell
TATION METHOD
data cube sense
ning the inverted indices
uire ? function
2.Fetch the corresponding TID list for each fragment from the fragment cube

3.Intersect the TID lists from each fragment to construct instantiated base table

4.Compute the data cube using the base table with any cubing algorithm

You might also like