star,snowflake,starflake schemas

5
qwertyuiopasdfghjklzxcvbn mqwertyuiopasdfghjklzxcvb nmqwertyuiopasdfghjklzxcv bnmqwertyuiopasdfghjklzxc vbnmqwertyuiopasdfghjklzx cvbnmqwertyuiopasdfghjklz xcvbnmqwertyuiopasdfghjkl zxcvbnmqwertyuiopasdfghjk lzxcvbnmqwertyuiopasdfghj klzxcvbnmqwertyuiopasdfgh jklzxcvbnmqwertyuiopasdfg hjklzxcvbnmqwertyuiopasdf ghjklzxcvbnmqwertyuiopasd fghjklzxcvbnmqwertyuiopas 0 Star Schema,Snowflake Schema,Starflake Schema Name:SB Mirza; 1st smester; MS Bioinformatics Submitted to: Prof. Dr. Maqbool Shaikh Comsats institute of information technology

Upload: s-b-mirza

Post on 21-Feb-2015

894 views

Category:

Documents


6 download

DESCRIPTION

information is taken from many websites and docs available at scribd for this document.

TRANSCRIPT

Page 1: star,snowflake,starflake schemas

qwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmrtyuiopasdfghjklzxcvbn

0

Star Schema,Snowflake Schema,Starflake Schema

Name:SB Mirza; 1st smester; MS Bioinformatics

Submitted to: Prof. Dr. Maqbool Shaikh

Comsats institute of information technology

Page 2: star,snowflake,starflake schemas

Star Schema:

It is a dimensional modelling technique in which a detail fact table is linked to dimension tables.The data in data warehouses and data marts is accessed by end-users. The information contained in the data warehouse/data mart must be easy for the end-user to use and access. Denormalized designs are easier for end-users to use than highly normalized designs, however these designs are more difficult to design and maintain. The Star Schema diagram graphically models the end-user's view (i.e., the denormalized view) of how the information is accessed. Components of a Star Schema Diagram The diagram has three main components:

Fact Table and its contents: metric attributes and the foreign keys necessary tojoin to the dimension tables,

Dimension Tables and their contents: reference attributes, hierarchical attributes,and metric attributes. The dimension tables are highly denormalized,

the lines that link the Dimension Tables to the Fact Table. Star Schema Model

This diagram is a model of a star schema diagram.

1

Page 3: star,snowflake,starflake schemas

Snowflake schema:

Snowflake schema In this a Dimension can have multiple Levels within multiple Hierarchies. From each hierarchy of levels any one Level can be attached to Fact Table. Mostly Lowest Level is attached to Fact Table. Its almost like starschema but in this our dimension tables are in 3rd NF, so more dimensions tables. And these dimension tables are linked by primary, foreign key relation.

Components of a Snowflake Schema Diagram

The diagram has four main components:

Fact Table and its contents: metric attributes and the foreign keys necessary to join to the dimension tables,

Dimension Tables and their contents: reference attributes and metric attributes. The

dimension tables are normalized,

the lines that link the Dimension Tables to the Fact Table,

the lines that link the Dimension Tables to more Dimension Tables.

Snowflake Schema Template

This diagram is a template of a snowflake schema diagram.

2

Page 4: star,snowflake,starflake schemas

Star flake schema:Star flake schema is a hybrid structure ( star schema + snow flake schema). It has basic structure of star schema but based on requirements certain dimensions are snowflaked i.d. normalized.it have Everything that a star contains but dimension tables are normalized.

Conclusion:

In Star schema there are Reduced Joins, Faster Query Operation.but Bigger table sizes,Too many rows in Fact Table. In Snowflake schema there are Distributed data, Easier to obtain fact-less data e.g. Orders shipped across one Quarter.but More number of joins, Slower Query operation.

understood that the star schema consists denormalized dimension tables,and snowflake schema is the further splitting the star schema dimensional table into one or multiple normalized tables to reduce the redundancy in star schema. The snowflake schema is a normalized starschema. In a snowflake schema, the dimension tables are normalized.

Star schema is better, but in real environment it is very tough to keep your application in star schema.Maximum time we need to go with snow-flake schema.No Only one fact table is correct in definition of snow-flake, if some condition results in generation of more than one fact table in data model then try to merge the fact tables. Only level of Dimension tables can be more than one in snow-flake schema.Ideally for one domain only one fact table should exist, ex if you are making Sales application then sales details can be your fact table and Customer, Branch, Region etc.. can be your dimension tables.

3