Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Star schema: creating a dimension

I have a Mysql relational db and i want to make some reports(mainly histograms)  in qlikview. I was adviced to build  a star schema before doing reports.

Question 1: is it mandatory to build a star schema or can i just build my reports basing on the DB tables directly (my DB is not an operational DB it is a dedicated DB for reporting)?

If yes, i was adviced to store all my mysql tables as QVD files and make tranformations to build the star schema.

Question 2: How can i build my dimensions and fact tables ? I really don't see the advantage of building dimensions in qlikview because when i am doing an histogram i just have to select the right attribute(from the DB table) that i want to consider as the dimension, so why building a dimension ?

For example, i have a table with many columns a one specific called "associated risk", then i want to do an histogram calculating the total revenue(columns are existing in the same table) per "associated risk". When doing my histogram , i just put an expression to calcule the revenu (sum of 3 columns) and considered "associated risk" as a dimension.

SO i really don't see the importance of creating a dedicated dimension for this attribute, please help me to see it more clearly

thank you

3 Replies
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

If your dimensions (attributes) exist in your fact table(s), that is fine. There is no need to transform to star with seperate dimension tables, except in very specific cases.

The recommendation to create a star for qlikview is usually based on collapsing an existing snowflake schema to a star, primarily for performance reasons. However, that performance improvement is neglibile until you get to larger volumes of data.

Due to QVs associative model, there are some cases when you need to remodel your data as star to deal with QV associative issues such as synthetic keys and circular references.

Bottom line. If you can get the charts and performance from your existing tables, use them as is.

-Rob

http://robwunderlich.com

Anonymous
Not applicable
Author

In addition to Rob's perfect explanations about the data model, a few words about QVDs.


QVD's are especially helpful in the next situations:
a) There amount of data is large, and you want to load only the new data that was added since the previous load (incremental load).
b) You create multiple QV applications from the same database.  In this case, if you first create QVDs and use them as the data sources for all applications, you get "one version of truth" - no discrepancies between applications due to the data changes between different reload time.
c) Developer has limited access to the database, and uses QVDs as a temporary data source.
If none of this situation is relevant in your case, you do not need to use QVDs.  And, there is no any relations between star schema (or whatever data model you choose) and using/not usng QVDs.

Regards,

Michael

Not applicable
Author

thank you for your advices.

then i will directly do my report from the mysql table because i have all the fields inside.

Its is just that some other dimensions  are calculated

regards