Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Good day,
I have a problem about data model in QV. I cannot decide about which model is better or correct. I newer used QV before so i dont understand data modeling logic in QV.
I created two models of Northwind as a test model using different sheets from excel so i just imported them in script using table logic order like in database model which i created before.
First data model is:
and second is: (i used inner join to join tables in one)
Please help me about this, i dont understand very well modes in QV when i dont have cardinality or join like in DBMS.
Thank you,
hello
as you see, you have synthetic key in your 2ns model .
you can read this post about it
and then decide yourself which is the best (for yout need)
Thank you. I saw that post about synthetic keys but is still have ambiguity. If i join all my tables in two tables do i have the same data right connected like in the first model. For example if i use the data model above:
do i have the same data and same results like in the next model. So if the model with 8 tables good in global?
Thanks,
Dear Bojan,
When working with QV / QS, the table schema needs to be clear and allows you to manipulate it in the future with ease.
In your first example, you kept the tables as is, it got advantages and disadvantages, but basically it's working and will allow you to get the information you need.
The seconds example, isn't much of a model, you connected all sort of data into one table without much of thought.
If you want to join tables, you can connect Orders+Lines (take into consideration that measures in Order header tables will multiply, so you need to address that).
You can connect Division with Customers, and Category with Products.
So you end up with a nice Fact for Orders, and 3 dimensions - Customers, Products, Suppliers resulting a nice star schema.
By the way, as a rule of thumb, especially if you're new to QV, avoid synn keys (read more on that in the previous link shared by Oliver).
I hope it helps, it's kind of difficult to pass so much information over one post.
BR,
Eliran.