Star schema versus snowflake schema

I have a question regarding dimensional data modeling. My question here is, when star schema model would be useful and when snowflake schema model would be useful.
In star schema, we have only fact and it is connected with dimensions. But in snowflake schema, we are normalizing dimension into one more level. Let us say, we have dimension product. Product can be normalized into another table called supplier. Let us take another example, customer dimension. Customer dimension can be normalized into country…
Advantage of star schema is, easy to write the query since we have only less tables. You do not need to join multiple tables when we write the query. It would improve the performance some time.
Advantage of snowflake schema is, it is little complex to write the query, since we have to join multiple tables. Performance might improve some time when we join smaller tables…
My question is, at what circumstances, we can use star and snowflake schema? I am not able to define the word sometime_
Any help is highly appreciated…

Hi,
There is a trade off on the availability and the Complex analytics.
A star schema is good if you have the functional requirements really simple. Like the dimension is not SCD Type2 (slowly changing dimension) and you don't need to do "AS IS" vs "AS WAS" reporting.
In modern Analytics in any domain dimensions are SCD Type 2 as business keep on evolving. In a star schema structure this will cause explosion of data if there are frequent changes at the higher levels of the dimensional hierarchy. That anyway will hit the performance.
As far as my experience goes, at the data model level it is better to have snow flaked dimensions. and while managing the metadata (in a BI reporting tool) you can consolidate the snowflaked dimensions in star schema structures. That will make ah hoc analytics much simple for the business users.
A lot of performance measure can be taken to improve the end user experience.
In short the trend in BI analytics demands to have a snowflaked structure rather than a simple star schema structure.
Hope this helps.

Similar Messages

  • Creation of star schema from snowflake schem in BMM layer

    hi,
    This is my situation.I have "Fact-table" which has Dim 1 .now Dim 1 is joined to Dim2,Dim3
    Fact
    |
    Dim 1
    |
    | |
    Dim 2 Dim 3
    Now in Bmm Layer how can i make this snowfalke schema to star schema.I heard about making changes in the Logical Table source.And what will be the look of the presentation layer.
    Any help is appricaited Guys.

    In physical layer, you have a join between Dim 1 and Dim 2, Dim1 and DIm3, Fact and Dim1. In BMM for Dim1, in the sources, add Dim2 and Dim3. You may add both these dimensions in one single LTS if the data is not duplicate in the tables. In case the data is duplicated add them as seperate LTS in the sources for Dim1. Refer this post for reference -- Logical Table source source query
    In BMM you need a join between Dim1 and Fact. Basically your Dim1 is sourced from three different tables which are your dimensions. This would transform your snowflake into star. In your presentation layer you will have all the columns from your dimensions (except for the duplicates, lets say you have column A in both dim1 and dim2, you should map this column in column mapping tab so as to enable BI server to pick the most economical source) and facts.
    Hope this clears your question.

  • Star schema or Snowflake schema

    Hi Gurus,
    I have following dimensions and fact table. let me know can I go ahead with star schema and snowflake schema while building the cube.
    1. Country's table
    2. workgroup table --> each country have N number of work groups
    3. user table---> each workgroup have  N number of users.
    4. time table.
    5. fact table.

    This is a similar thread that discusses on the design approach of star vs normalized tables
    https://social.technet.microsoft.com/Forums/sqlserver/en-US/7bf4ca30-a1bc-415d-97e6-ce0ac3137b53/normalized-3nf-vs-denormalizedstar-schema-data-warehouse-?forum=sqldatawarehousing
    In my experience majority of cases I've some across is also star schema for data marts where tables will be more denormalized rather than applying priciples of normalization. And I believe so far as its through SSAS cubes that you exposes the OLAP model
    it would be much easier to implement relationships using a denormalised approach.
    What you may do is to have a normalised datawarehouse if you want and then built the datamarts over it using denormalised tables (star schema) for the cube.
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • Snowflake/Star Schema in OBIEE

    Hi Gurus,
    I would be very glad if you can help me to resolve this problem.
    Before posting, I searched the forum there are similar queries(Circular Join) but I do not get the solution.
    I have fact and dimension tables builded with star schema which I do not have any problem. But there is a fact table which has dimension to dimension relation between them.
    When I tried to connect them which I explained in below I am getting error(Circular join problem) or If I fix the error, In Obiee analysis I am getting another error which says there is no fact table between tables. Let me explain the situation;
    I have 4 dimensions table and a fact table;
    connection between them;
    Sales Dim(1) ---> Fact.A(N)
    Date Dim(1) ---> Fact.A(N)
    Customer Dim(1) ---->Fact.A(N)
    Sales Channels Dim(1) --->Sales Dim(N)
    Date Dim(1)---> Sales Dim(N)
    Date Dim(1) ---->SalesChannel(N)
    I can see that there are bunch of circular join in here :(. I did not understand to use Alias to resolve this problem.
    For instance; Dim A--->Fact AC
    Dim B --->Fact AC
    Dim A---> Dim B
    If I create a Alias for Dim A, I can resolve the problem but which of them should I drag to Presentation Layer(at the end both of them same but Dim A used by other fact tables too). If I drag to Dim A nothing will be change or I am totally lost:(
    If you do not understand the question I will try to be more clear.
    I would be very happy if you can help me.
    Thanks in advance.
    M.S

    Hi M.S,
    If I got your issue correctly, then the issue is the join between the 'Date Dim' -> 'Sales Dim' and 'Date Dim' -> 'Channels Dim'. I was just trying to understand the model here, and thinking why do you need a join between these dimensions.
    Anyway, a report with Sales and Date dimension can always be resolved through the Fact table. However, if you still want all combinations across this dimension, you can still use a implicit column methodology for this issue. you might want to refer to venkat's blog on this approach here.http://www.rittmanmead.com/2009/08/oracle-bi-ee-10-1-3-4-1-reporting-on-non-transactional-dimension-values-equivalence-of-outer-joins/
    Hope this helps.
    Thank you,
    Dhar

  • Star schema in OBIEE 11G

    Hi Experts,
    Please tell me the places in OBIEE 11G where i can design the start schema.is it only in Physical Layer or In BBM too?
    Thanks-Bhaskar

    Final point, for performance reasons you should also try to model data into star schema in the physical layer.
    If the data is modelled as a true star then there are database features which optimise query performance. These features are set by a DBA when the Warehouse is configured (e.g. enable_star_transformations). The results with this parameter on/off can be staggering (query time reduced from minutes to seconds), showing the power of star schema.
    When snowflakes occur, these performance features will not work as designed, and performance will be degraded. There are certain criteria that have to be met by the data e.g. bitmap indices on all of the foreign key columns in the fact.
    Please mark if helpful / correct,
    Andy
    www.project.eu.com

  • Star schema cannot be mapped to multiple tables

    Hello!
    I am mapping dimension in AWM.
    When I am drawing lines from the source columns to the target objects "Member". I get the message "star schema cannot be mapped to multiple tables". Sometimes I can workaround the problem by drawing the lines in a different order. But this dose not always work
    I have a dimension that have several levels and hierarchy and I always get the message "star schema cannot be mapped to multiple tables" no matter in witch order I draw the lines to "Member".
    Why do I get this message and how do I do to solve the problem?
    Best regards,
    Tina N Mörnstam

    Hi Tina:
    Is your dimension snowflaked? Are you mapping from more than one source table to the target dimension? Is the hierarchy formed over different tables?
    Hazbleydi C. Verástegui

  • Star Schema tables Creation

    If I am creating a BI analytical application from sample Sales Hisotory schema's transactional data, what is the first Step I need to do? Should I create a star schema from the transactional tables? If this is correct, What I tool I need to use to create such tables with data? I believe once this is done I can create dimensions , measures and cubes using OWM11g. Some on please help me. I am very very new to OLAP , But has lots of interest in it
    Thanks
    George

    Hi George,
    If you are working with 11g - did you install all the latest patches? I strongly recommend applying all available patches when working with 11g. All the information you need is here - http://www.oracle.com/technology/products/bi/olap/collateral/olap_certification.html
    As for your question about the criteria for desgining dimension tables, the best advice I can offer is to work with star or snowflake dimensions. You can also see sample schema designs for both at these links
    Also, in case you haven't already seen it, there is a good blog posting on working with different kinds of dimensions/hierarchies here - http://oracleolap.blogspot.com/2008/01/olap-workshop-4-managing-different.html
    Finally, you might find this [white paper|http://www.oracle.com/technology/products/warehouse/pdf/Benefits%20of%20a%20multi-dimensional%20model.pdf] useful as you say you are new to OLAP
    Let me know how you get on
    Thanks,
    Stuart Bunby
    OLAP Blog: http://oracleOLAP.blogspot.com
    OLAP Wiki: http://wiki.oracle.com/page/Oracle+OLAP+Option
    OLAP on OTN: http://www.oracle.com/technology/products/bi/olap/index.html
    DW on OTN : http://www.oracle.com/technology/products/bi/db/11g/index.html

  • Dimension Hieracrhy in Star Schema

    Hi devs,
    I'm in the process of creating OLAP dimensions using AWM 10.2.0.30A on 10gR2 database, and have successfully created some flat (no levels) dimensions. Now I have to create another dimension, which based on existing model, has parent and child in same dimension table at database end.
    When I first attempt to do this using the default "Star Schema" setting for type of dimension table in the mapping section, I get the below error:
    oracle.AWXML.AWException: Action BUILDDATABASE failed on object TA_DMT_OWNER.GLA_MP
    at oracle.AWAction.BuildDatabase.Execute(BuildDatabase.java:737)
    at oracle.olap.awm.wizard.awbuild.BuildWizardHelper$1.construct(BuildWizardHelper.java:184)
    at oracle.olap.awm.ui.SwingWorker$2.run(SwingWorker.java:109)
    at java.lang.Thread.run(Thread.java:534)
    Caused by: oracle.AWXML.AWException: ***Error Occured in BUILD_DRIVER: In __XML_SEQUENTIAL_LOADER: In __XML_LOAD_HIERS: In __XML_SET_GID_FREL: One or more loops have been detected in relationship GLA_MP!PROD_PARENTREL over GLA_MP!PROD. The 1 items involved are TD.
    at oracle.AWAction.BuildDatabase.Execute(BuildDatabase.java:604)
    ... 3 more
    I've tried changing the type to "Snowflake" but get the same error. Do you have suggestions as to how to best handle these scenarios?
    **Little more background to the data. We DO have surrogate keys in table as well, which is used in fact table. If I do not use the "use natural keys from data source" and use "generate surrogate keys in AW" option, dimension is built successfully. So my follow-up question is, when I build cube will AW know to link the dimension correctly from fact based on surrogates generated by AWM even though those surrogate keys do not physically exist in fact?
    Edited by: user8659932 on Oct 30, 2009 7:58 AM

    When I first attempt to do this using the default "Star Schema" setting for type of dimension table in the mapping section, I get the below error:
    oracle.AWXML.AWException: Action BUILDDATABASE failed on object TA_DMT_OWNER.GLA_MP
    at oracle.AWAction.BuildDatabase.Execute(BuildDatabase.java:737)
    at oracle.olap.awm.wizard.awbuild.BuildWizardHelper$1.construct(BuildWizardHelper.java:184)
    at oracle.olap.awm.ui.SwingWorker$2.run(SwingWorker.java:109)
    at java.lang.Thread.run(Thread.java:534)
    Caused by: oracle.AWXML.AWException: ***Error Occured in BUILD_DRIVER: In __XML_SEQUENTIAL_LOADER: In __XML_LOAD_HIERS: In __XML_SET_GID_FREL: One or more loops have been detected in relationship GLA_MP!PROD_PARENTREL over GLA_MP!PROD. The 1 items involved are TD.
    at oracle.AWAction.BuildDatabase.Execute(BuildDatabase.java:604)This error comes when you have a member rolloing to a different via two different path. If you use surrogate key then as you said the error is gone.
    **Little more background to the data. We DO have surrogate keys in table as well, which is used in fact table. If I do not use the "use natural keys from data >source" and use "generate surrogate keys in AW" option, dimension is built successfully. It appended the some text to the value.
    So my follow-up question is, when I build cube will AW know to link >the dimension correctly from fact based on surrogates generated by AWM even though >those surrogate keys do not physically exist in fact?Yes it do. You needn't to fabricate that kind of fact data.
    You can check this link -> http://www.oracle.com/technology/products/bi/olap/index.html
    Thanks,
    Brijesh
    Edited by: Brijesh Gaur on Oct 30, 2009 9:08 PM

  • How to make this into star schema

    Hi experts
    I have 4 tables that I would like to turn into a star schema.
    table1(fact) has a N:1 to table2(dim)
    table2(dim) also has a 1:1 to table3(dim) and 1:1 to table4(dim)
    Is it possible to model this into a star schema where table1 (fact) has a N:1 relationship to all tables (dimensions)?
    I have modeled this in the administration tool and any queries between table1 and table 2 work but they dont if I involved table3 and 4.
    Am unsure how to define 1 to 1 relationships in the physical layer.
    cheers
    Tim

    Tim, could you give us any details on what the dimensions 2, 3, and 4 actually are? Sorry, I think better when I can replace "dim 2" with "person" or whatever.
    In any case, pretty unusual to have 1 to 1 relations like that. Sounds more to me like you have a single fact table, with 1 dimension that is "snowflaked"...but with the snowflakes not representing aggregate levels?
    I'd try just modeling it as a single dimension joining to the fact table (i.e. combine all three physical dimension tables into one logical dimension table). Then maybe break it up in the presentation layer if you really want to split it for the end users?
    Hope this helps,
    Scott

  • Using two facts of two different star schemas and conformed dimensions

    Hi,
    I've been working as developer and database designer for years and I'm new to Business Objects. Some people says you can not use two facts of two different star schemas in the same query because of conformed dimensions and loop problems in BO.
    For example I have a CUSTOMER_SALE_fACT table containing customer_id and date_id as FK, and some other business metrics about sales. And there is another fact table CUSTOMER_CAMPAIGN_FACT which also contains customer_id and date_id as FK, and some  other business metrics about customer campaigns. SO I have two stars like below:
    DIM_TIME -- SALE_FACT -- DIM_CUSTOMER
    DIM_TIME -- CAMPAIGN_FACT -- DIM_CUSTOMER
    Business metrics are loaded into fact tables and facts can be used together along conformed dimensions . This is one of the fundamentals of the dimensional modeling. Is it really impossible to use SALE_FACT and CAMPAIGN_FACT together? If the answer is No, what is the solution?
    Saying "you cannot do that because of loops" is very interesting.
    Thank you..

    When you join two facts together with a common dimension you have created what is called a "chasm trap" which leads to invalid results because of the way SQL is processed. The query rows are first retrieved and then aggregated. Since sales fact and campaign fact have no direct relationship, the rows coming from either side can end up as a product join.
    Suppose a customer has 3 sales fact rows and 2 campaign fact rows. The result set will have six rows before any aggregation is performed. That would mean that sales measures are doubled and campaign measures are tripled.
    You can report on them together, using multiple SQL passes, but you can't query them together. Does that distinction make sense?

  • Injecting data into a star schema from a flat staging table

    I'm trying to work out a best approach for getting data from a very flat staging table and then loading it into a star schema - I take a row from a table with for example 50 different attributes about a person and then load these into a host of different tables, including linking tables.
    One of the attibutes in the staging table will be an instruction to either insert the person and their new data, or update a person and some component of their data or maybe even to terminate a persons records.
    I plan to use PL/SQL but I'm not sure on the best approach.
    The staging table data will be loaded every 10 minutes and will contain about 300 updates.
    I'm not sure if I should just select the staging records into a cursor then insert into the various tables?
    Has anyone got any working examples based on a similar experience?
    I can provide a working example if required.

    The database has some elements that make SQL a tad harder to use?
    For example:
    CREATE TABLE staging
    (person_id NUMBER(10) NOT NULL ,
    title VARCHAR2(15) NULL ,
    initials VARCHAR2(5) NULL ,
    forename VARCHAR2(30) NULL ,
    middle_name VARCHAR2(30) NULL ,
    surname VARCHAR2(50) NULL,
    dial_number VARCHAR2(30) NULL,
    Is_Contactable     CHAR(1) NULL);
    INSERT INTO staging
    (person_id, title, initials, forename, middle_name, surname, dial_number)
    VALUES ('12345', 'Mr', 'NULL', 'Joe', NULL, 'Bloggs', '0117512345','Y')
    CREATE TABLE person
    (person_id NUMBER(10) NOT NULL ,
    title VARCHAR2(15) NULL ,
    initials VARCHAR2(5) NULL ,
    forename VARCHAR2(30) NULL ,
    middle_name VARCHAR2(30) NULL ,
    surname VARCHAR2(50) NULL);
    CREATE UNIQUE INDEX XPKPerson ON Person
    (Person_ID ASC);
    ALTER TABLE Person
    ADD CONSTRAINT XPKPerson PRIMARY KEY (Person_ID);
    CREATE TABLE person_comm
    (person_id NUMBER(10) NOT NULL ,
    comm_type_id NUMBER(10) NOT NULL ,
    comm_id NUMBER(10) NOT NULL );
    CREATE UNIQUE INDEX XPKPerson_Comm ON Person_Comm
    (Person_ID ASC,Comm_Type_ID ASC,Comm_ID ASC);
    ALTER TABLE Person_Comm
    ADD CONSTRAINT XPKPerson_Comm PRIMARY KEY (Person_ID,Comm_Type_ID,Comm_ID);
    CREATE TABLE person_comm_preference
    (person_id NUMBER(10) NOT NULL ,
    comm_type_id NUMBER(10) NOT NULL
    Is_Contactable     CHAR(1) NULL);
    CREATE UNIQUE INDEX XPKPerson_Comm_Preference ON Person_Comm_Preference
    (Person_ID ASC,Comm_Type_ID ASC);
    ALTER TABLE Person_Comm_Preference
    ADD CONSTRAINT XPKPerson_Comm_Preference PRIMARY KEY (Person_ID,Comm_Type_ID);
    CREATE TABLE comm_type
    comm_type_id NUMBER(10) NOT NULL ,
    NAME VARCHAR2(25) NULL ,
    description VARCHAR2(100) NULL ,
    comm_table_name VARCHAR2(50) NULL);
    CREATE UNIQUE INDEX XPKComm_Type ON Comm_Type
    (Comm_Type_ID ASC);
    ALTER TABLE Comm_Type
    ADD CONSTRAINT XPKComm_Type PRIMARY KEY (Comm_Type_ID);
    insert into comm_type (comm_type_id, NAME, description, comm_table_name) values ('23456','HOME PHONE','Home Phone Number','PHONE');
    CREATE TABLE phone
    (phone_id NUMBER(10) NOT NULL ,
    dial_number VARCHAR2(30) NULL);
    Take the record from Staging then update:
    'person'
    'Person_Comm_Preference' Based on a comm_type of 'HOME_PHONE'
    'person_comm' Derived from 'Person' and 'Person_Comm_Preference'
    Then update 'Phone' with the number based on a link derived from 'Phone' which is made up of Person_Comm Primary_Key where 'Comm_ID' (part of that composite key)
    relates to the Phone table Primary_Key which is Phone_ID.
    Does you head hurt as much as mine?

  • Error with creating star schema using HsvStarSchemaACM

    Hi,
    I am trying to create a star schema using the API HsvStarSchemaACM. But when calling the create function of API, i get the below exception. Exception from HRESULT: 0x80040251 (A general error occurred while trying to obtain a database Reader/Writer lock). Is this something to do with the parameters passed and its connections(connection works fine and createstarschema is running thru workspace).
    Any solutions to this is more welcome.
    Thanks,
    Logu

    Can you provide details on HsvStarSchemaACM API? How is it related to ODI?

  • Resolving loops in a star schema with 5 fact tables and 6 dimension tables

    Hello
    I have a star schema, ie 5 FACT tables and 7 dimension tables, All fact tables share the same dimension tables, some FACT tables share 3 dimesnsions, while other share 5 dimensions.  
    I did adopt the best practices, and as recommended in the book, I tried to resolve them using Context, as it is the recommended option to Alias in a star schema setting.  The contexts are resolved, but I still have loops.  I also cleared the Multiple SQL Statement for each context option, but no luck.  I need to get this resoved ASAP

    Hi Patil,
    It is not clear what exactly is the problem. As a starting point you could set the context up so that it only covers the joins from fact to dimension.
    Fact A, joins Dim 1, Dim 2, Dim 3, and Dim 4
    Fact B, joins Dim 1, Dim 2, Dim 3, Dim 4 and Dim 5
    Fact C, joins Dim 1, Dim 2, Dim 3, Dim 4 and Dim 6
    Fact D, joins Dim 1, Dim 2, Dim 3, Dim 4 and Dim 7
    Fact E, joins Dim 1, Dim 2, Dim 4 and Dim 6
    If each of these are contexts are done and just cover the joins from fact to dim then you should be not get loops.
    If you could lay out your joins like above then it may be possible to specify the contexts/aliases that should work.
    Regards
    Alan

  • Why do we need SSIS and star schema of Data Warehouse?

    If SSAS in MOLAP mode stores data, what is the application of SSIS and why do we need a Data Warehouse and the ETL process of SSIS?
    I have a SQL Server OLTP database. I am using SSIS to transfer my SQL Server data from OLTP database to a Data Warehouse database that contains fact and dimension tables.
    After that I want to create cubes using SSAS form Data Warehouse data.
    I know that MOLAP stores data. Do I need any Data warehouse with Fact and Dimension tables?
    Is not it better to avoid creating Data warehouse and create cubes directly from OLTP database?

    Another thing to note is data stored in transactional system may not always be in end user consumable format for ex. we may use bit fields/flags to represent some details in OLTP as storage required ius minimum but presenting them as is would not make any
    sense to user as they would not know what each bit value represents. In such cases we apply some transformations and convert data into useful information for users to understand. This is also in the warehouse so that information in warehouse can directly be
    used for reporting. Also in many cases the report will merge data from multiple source systems so merging it on the fly in report would be tedious and would have hit on report server. In comparison bringing them onto common layer (warehouse) and prebuilding
    aggregates would be benefitial for the report performance.
    I think (not sure) we join tables in SSAS queries and calculate aggregations in it.
    I think SSAS stores these values and joined tables and we do not need to evaluates those values again and this behavior is like a Data Warehouse.
    Is not it?
    So if I do not need historical data, Can I avoid creating Data Warehouse?
    On the backend SSAS uses queries only to extract the data
    B/w I was not explaining on SSAS. I was explaining on what happens inside datawarehouse  which is a relational database by itself. SSAS is used to built cube (OLAP structures) on top of datawarehouse. star schema is easier for defining relationships
    and buidling aggregations inside SSAS as its simple and requires minimal lookups to be performed. Also data would be held at lowest granularity level which can easily be aggregated to required levels inside OLAP cubes. Cube processing is very resource
    intensive and using OLTP system would really have a huge impact on processing performance as its nnot denormalized and also doing tranformation etc on the fly adds up to complexity. Precreating a layer (data warehouse) having data in required format would
    make cube processing easier and simpler as it has to just cross join tables and aggregate data based on relationships defined and level needed inside the cube.
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Star schema without a fact table?

    Hi,
    I'm preparing my warehouse for using with Discoverer and my question is about the star schema.
    - Is a star schema directly associated with data warehouse?
    - Can I talk about a star schema if a) I do not have a fact table (no summarized values) and b) if I do not have a dimension of time?
    The problem is, I'm thinking of usine Discoverer but should I use it if it's not connected to a data warehouse?
    As I told, I'd like to modelized my data "like" a star schema but my "center table" will contain only the foreign key of my dimensions; no time dimensions, no aggregate data in the center table (fact table).
    Is there another word for the model I'd like to do?
    Thank in advance.

    Hi,
    Is a star schema directly associated with data warehouse?Not really, a star schema is just one where there is one large fact table joined to many smaller dimension tables using key fields. You usually see this in data warehouses.
    Can I talk about a star schema if a) I do not have a fact table (no summarized values) and b) if I do not have a dimension of time?A star schema must have a fact table but it doesn't need contain summarised values or a time dimension.
    You can use Discoverer with any Oracle database, it doesn't have to be a data warehouse.
    Rod West

Maybe you are looking for