Friday, May 1, 2015

OLAP Concepts


OLAP Concepts

Hi Guys,

                Happy day folks. This explanation is about OLAP cubes. I will try to put as simple as that so that everyone can understand better.

 

CUBE Concept

Let us assume a salesman selling these items for 3 days

Item
Day
Type
Price
Sales
Apple
April 1
Fruit
10
20
Apple
April 1
Fruit
10
60
Orange
April 1
Fruit
5
5
Apple
April 2
Fruit
5
25
Apple
April 2
Fruit
5
20
Orange
April 3
Fruit
3
30
Apple
April 3
Fruit
10
10

 

If someone asks you the below questions, what would you do ?

1.       How many apples were sold on April 1 and April 2 ? How much was the total sales on April 1 and April 2

Traditional approach is to write couple of group by aggregation queries separately and provide the result

What if we store all pre calculated value in three dimensional fashions?

Just imagine the CUBE which is presented below exists already for all the reporting you require.

·         Summary calculations are all summation of the corresponding rows and Columns – I have highlighted in green Color

·         Such calculations helps the analysts and reporting groups to immediately look for the data

·         Also since the data is already summarized, this is fast retrieval. If we try to do the same thing using SQL query especially with the large database with millions of rows. The performance is going to slow down a lot.

 
 
 
 
 

ROLL UP Concept

If you notice in our initial table, we have a field called Type à Assume Type can be Fruit or Vegetable

In the above Cube, Item is categorized by Apple, Orange etc.  Let us assume you need a grouping based on TYPE ( Fruit or vegetable ) à This becomes Roll up. (i.e)  rolling up products based on its TYPE.

 
 
 

·         Perform Summarized cube view of dimension

·         Roll up or Climbing up the Concept hierarchy

 


DRILL DOWN Concept

                The concept of drilling down or expanding a particular dimension is called as drill down

For Ex:
Note the below cube has the information consolidated for the month of April
 
 
 

SLICE Concept
 As the name indicates, slice the cube. This is basically looking for a one dimensional information of the Cube

 
 
 
 
 
 
DICE Concept

·         This defines a Sub Cube with two or more dimensions
 
 
 
 

Sunday, April 26, 2015

Big Data in real time

Hi Guys,

How are you doing today. Just thought of sharing my knowledge on big data. Hope you will like it. I always like to put everything in simple (layman) terms.

Big Data

·         As the name suggests it is big, huge , high volume of data. It starts from Tera byte, Peta byte, Hexa byte, Zeta byte

·         Velocity of Data. The speed of the data is so fast. Example: 1 million likes in 8 hours. How would you process how many of the likes came from Asia-pacific region. It is difficult right ? This is all addressed in Big data

·         Different forms of data.

o   Structured Data – High Volume of organized data. Example: RDBMS System, Web Server

o   Unstructured Data – Images, Facebook, Twitter, Audio files, Video files etc.

o   Semi structured data – XML, Email

Examples

o   Sensor Data

o   Data from electronic devices like ipad, health tracker , smart phones, gps

o   Amazon sales data

o   Facebook, Twitter contents à Customer sentiment analysis

o   Stock market à Almost daily we receive 1 TB data

o   Weather data

o   Google satellite images

 
Traditional system

·         Storage becomes very difficult

·         Data analysis tools are not able to handle this volume

·         Forecasting

·         Unstructured data handling . This is something we have not done in the past

Real time examples

o   Driver less cars

o   In USA, insurance companies like progressive are giving us a device we can fit into car. This will track

§  how you drive ? what speed ? what route you follow ?

§  what is your normal timing etc. All these helps progressive to provide discounts, understand drivers

o   Ebola virus – Google or IBM used to track

o   Amazon Sales /Ebay sales. As soon as you purchase something online, this is captured and if you notice, you will get lot of recommendations regarding that

o   Google ad words -Suppose if you google search something . Once I was looking to purchase new tires but did not buy. From that day, I keep getting tires ads in almost all the websites I am surfing

o   Health data – Just think of finger print given for iphone or to some other system . Government has all

o   Credit Score

 

Advantages

·         Business improvement  à Sales increases as companies are able to target right candidate, right time and right product

·         Predictive analysis à Example election results