Short note on Fact Constellations Schema.

 Fact Constellations Schema

  • This kind of schema can be viewed as a collection of stars, and hence is called a galaxy schema or a fact constellation.
  •  A fact constellation schema allows dimension tables to be shared between fact tables. 
  • For example, the following schema specifies two fact tables, sales, and shipping. 
- The sales table definition is identical to that of the star schema. 
- The shipping table has five dimensions or keys: item key, time key, shipper key, from location, and to location, and two measures: dollars cost and units shipped.








Defining a Fact Constellation in DMQL
define cube sales [time, item, branch, location]:

dollars_sold = sum(sales_in_dollars), avg_sales = avg(sales_in_dollars), units_sold = count(*)

define dimension time as (time_key, day, day_of_week, month, quarter, year)
define dimension item as (item_key, item_name, brand, type, supplier_type)
define dimension branch as (branch_key, branch_name, branch_type)
define dimension location as (location_key, street, city, province_or_state, country)
define cube shipping [time, item, shipper, from_location, to_location]:
dollar_cost = sum(cost_in_dollars), unit_shipped = count(*)
define dimension time as time in cube sales
define dimension item as item in cube sales
define dimension shipper as (shipper_key, shipper_name, location as location in cube sales, shipper_type)
define dimension from_location as location in cube sales
define dimension to_location as location in cube sales

OR,







Comments

Popular posts from this blog

Discuss classification or taxonomy of virtualization at different levels.

Explain cloud computing reference model .

Suppose that a data warehouse consists of the three dimensions time, doctor, and patient, and the two measures count and charge, where a charge is the fee that a doctor charges a patient for a visit. a) Draw a schema diagram for the above data warehouse using one of the schemas. [star, snowflake, fact constellation] b) Starting with the base cuboid [day, doctor, patient], what specific OLAP operations should be performed in order to list the total fee collected by each doctor in 2004? c) To obtain the same list, write an SQL query assuming the data are stored in a relational database with the schema fee (day, month, year, doctor, hospital, patient, count, charge)