You are on page 1of 4

DataWare house Schemas star-SnowFlakes-Fact Constellation Schemas

Stars, Snowflakes, and Fact Constellations: Schemas for Multidimensional Databases
The entity-relationship data model is commonly used in the design of relational databases, where a database schema consists of a set of entities and the relationships between them. Such a data model is appropriate for on-line transaction processing. A data warehouse, however, requires a concise, subject-oriented schema that facilitates on-line data analysis. The most popular data model for a data warehouse is a multidimensional model. Such a model can exist in the form of a star schema, a snowflake schema, or a fact constellation schema.

Star schema: The most common modeling paradigm is the star schema, in which
the data warehouse contains (1) a large central table (fact table) containing the bulk of the data, with no redundancy (2) a set of smaller attendant tables (dimension tables), one for each dimension. Example Sales are considered along four dimensions, namely, time, item, branch, and location. The schema contains a central fact table for sales that contains keys to each of the four dimensions, along with two measures: dollars sold and units sold. To minimize the size of the fact table, dimension identifiers (such as time key and item key) are system-generated identifiers. Notice that in the star schema, each dimension is represented by only one table, and

4). this saving of space is negligible in comparison to the typical magnitude of the fact table. thereby further splitting the data into additional tables. The sales table definition is identical to that of the star schema (Figure 3. although the snowflake schema reduces redundancy. This schema specifies two fact tables. For example. since more joins will be needed to execute a query. The shipping table has five dimensions. Fact constellation: Sophisticated applications may require multiple fact tables to share dimension tables. • The major difference between the snowflake and star schema models is that the dimension tables of the snowflake model may be kept in normalized form to reduce redundancies. sales and shipping. Fact constellation. where some dimension tables are normalized. Example Here. • The system performance may be adversely impacted. and hence is called a galaxy schema or a fact constellation. • Such a table is easy to maintain and saves storage space. However. the sales fact table is identical to that of the star schema The main difference between the two schemas is in the definition of dimension tables. street. Snowflake schema: The snowflake schema is a variant of the star schema model. city. the location dimension table contains the attribute set flocation key. Hence. or keys: item key. countryg.each table contains a set of attributes. it is not as popular as the star schema in data warehouse design. The single dimension table for item in the star schema is normalized in the snowflake schema. The resulting schema graph forms a shape similar to a snowflake. This kind of schema can be viewed as a collection of stars. resulting in new item and supplier tables. . province or state. • Snowflake structure can reduce the effectiveness of browsing.

and location are shared between both the sales and shipping fact tables. Advantages: • • • • Simplest DW schema (EDIT) Easy to understand Easy to Navigate between the tables due to less number of joins. is a department subset of the data warehouse that focuses on selected subjects. the dimensions tables for time. and two measures: dollars cost and units shipped. item. the star or snowflake schema are commonly used. from location. and to location. interrelated subjects. Star Schema: Definition: The star schema is the simplest data warehouse schema. Most suitable for Query processing (EDIT) Disadvantages: • • Occupies more space Highly Denormalized (EDIT) Snowflake schema: . and thus its scope is departmentwide. For example. A single Fact table (center of the star) surrounded by multiple dimensional tables(the points of the star). although the star schema is more popular and efficient. It is called a star schema because the diagram resembles a star. shipper key. with points radiating from a center. since both are geared toward modeling single subjects.time key. For data marts. A fact constellation schema allows dimension tables to be shared between fact tables. on the other hand. The fact constellation schema is commonly used. since it can model multiple. A data mart.

there may be one or more than one number of Fact tables and also Dimension Tables. These Dimensional tables are normalized. Difference between FACT and Dimensions FACT Millions to billions of rows Multiple foreign keys Numeric Does not change Dimensions Tens to millions of rows One primary key Textual decription Frequently modifies . it is complex to navigate Constellation Schema: Definition: A Constellation Schema in which one dimension table is accessed by one more than one Fact table. In this type of schema. It sometimes also called as Galaxy Schema.Definition: A Snowflake schema is a Data warehouse Schema which consists of a single Fact table and multiple dimensional tables. Disadvantages: • Due to large number of joins. Advantages: • • These tables are easier to maintain Saves the storage space.