You are on page 1of 4

Star Schema : Star Schema is a relational database schema for representing multimensional data.

It is the simplest form of data warehouse schema that contains one or more dimensions and fact tables. It is called a star schema because the entity-relationship diagram between dimensions and fact tables resembles a star where one fact table is connected to multiple dimensions. The center of the star schema consists of a large fact table and it points towards the dimension tables. The advantage of star schema are slicing down performance increase and easy understanding of data. Snowflake Schema : A snowflake schema is a term that describes a star schema structure normalized through the use of outrigger tables. i.e dimension table hierachies are broken into simpler tables. In a star schema every dimension will have a primary key.

y In a star schema a dimension table will not have any parent table. y Whereas in a snow flake schema a dimension table will have one or more parent tables. y Hierarchies for the dimensions are stored in the dimensional table itself in star schema. y Whereashierachies are broken into separate tables in snow flake schema. These hierachies helps to drill down the data from topmost hierarchies to the lowermost hierarchies.

========================================================== A snowflake schema is a logical arrangement of tables in a multidimensional database such that the entity relationship diagram resembles a snowflake in shape. The snowflake schema is represented by centralized fact tables which are connected to multiple dimensions. The snowflake schema is similar to the star schema. However, in the snowflake schema, dimensions are normalized into multiple related tables, whereas the star schema's dimensions are normalized with each dimension represented by a single table. A complex snowflake shape emerges when the dimensions of a snowflake schema are elaborate, having multiple levels of relationships, and the child tables have multiple parent tables ("forks in the road"). The "snowflaking" effect only affects the dimension tables and NOT the fact tables.

such as price and units sold. include the attributes that describe the facts. The star schema is considered an important special case of the snowflake schema. It includes a large amount of aggregated data. which are usually smaller than fact tables. and are thus rendered in second normal form. which are usually smaller than fact tables. Fact tables are usually in third normal form because all data depends on either one dimension or all of them. not on combinations of a few dimensions. and is more effective for handling simpler queries.Star Scehma The star schema (also called star-join schema. Often this is a separate table for each dimension. Often this is a separate table for each dimension. include the attributes that describe the facts. The facts that the data warehouse helps analyze are classified along different dimensions: y y The fact table holds the main data. while fact tables have a set of foreign keys which make up a compoundprimary key consisting of a combination of relevant dimension keys. such as price and units sold. It is common for dimension tables to consolidate redundant data in the most granular column. data cube. There may be multiple fact tables in a star schema. The star schema consists of one or more fact tables referencing any number of dimension tables. It includes a large amount of aggregated data. There may be multiple fact tables in a star schema. Dimension tables. Dimension tables can be joined to the fact table(s) as needed. or multi-dimensional schema) is the simplest style of data warehouseschema. Dimension tables can be joined to the fact table(s) as needed. Dimension tables. The facts that the data warehouse helps analyze are classified along different dimensions: y y The fact table holds the main data. . Dimension tables have a simple primary key.

time_id. for example. The main advantages of star schemas are that they: y Provide a direct and intuitive mapping between the business entities being analyzed by end users and the schema design. which may anticipate or even require that the data-warehouse schema contain dimension tables y y Star schemas are used for both simple data marts and very large data warehouses. and cost. and promo_id. in the sh sample schema. each of which contains information about the entries for a particular attribute in the fact table. but the dimension tables are not joined to each other. with points radiating from a central table. the fact table. Figure 17-2 Star Schema . The dimension tables are customers. The cost-based optimizer recognizes star queries and generates efficient execution plans for them. For example. sales. Figure 17-2 presents a graphical representation of a star schema. It is called a star schema because the entity-relationship diagram of this schema resembles a star. Provide highly optimized performance for typical star queries. contain the measures quantity_sold. and promotions. and the keys cust_id. A star join is a primary key to foreign key join of the dimension tables to a fact table. Are widely supported by a large number of business intelligence tools. products. A star schema is characterized by one or more very large fact tables that contain the primary information in the data warehouse. prod_id. contains information about each product number that appears in the fact table. amount. Each dimension table is joined to the fact table using a primary key to foreign key join. channel_id. A star query is a join between a fact table and a number of dimension tables. The center of the star consists of a large fact table and the points of the star are the dimension tables. channels. and a number of much smaller dimension tables (or lookup tables). The product dimension table.Star Schemas The star schema is perhaps the simplest data warehouse schema. times. A typical fact table contains keys and measures.

The result is more complex queries and reduced query performance. a product dimension table in a star schema might be normalized into a products table. Figure 17-3 Snowflake Schema . Figure 17-3 presents a graphical representation of a snowflake schema.gif Snowflake Schemas The snowflake schema is a more complex data warehouse model than a star schema. a product_category table. and a product_manufacturer table in a snowflake schema.Text description of the illustration dwhsg007. and is a type of star schema. It is called a snowflake schema because the diagram of the schema resembles a snowflake. it increases the number of dimension tables and requires more foreign key joins. While this saves space. That is. the dimension data has been grouped into multiple tables instead of one large table. Snowflake schemas normalize dimensions to eliminate redundancy. For example.