Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Northwind Data Model

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:

DM1.jpg

and second is: (i used inner join to join tables in one)


dm2.jpg

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,

3 Replies
olivierrobin
Specialist III
Specialist III

hello

as you see, you have synthetic key in your 2ns model .

you can read this post about it

Synthetic Keys

and then decide yourself which is the best (for yout need)

Anonymous
Not applicable
Author

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:

DM3.png

do i have the same data and same results like in the next model. So if the model with 8 tables good in global?

DM1.jpg

Thanks,

eliran
Creator III
Creator III

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.