Reputation: 21
I have a view in my sqlserver database,but now,I want to build a data cube instead of the view,aim to more select efficiency. the view design picture. two tables connect and select many column in this view.NOW,the trouble is in data cube, you have to have at least one measure table, But I just hope regards the two fact table as dimension table,so that I can get the similar output as the view.
Is there any help or other way? thanks!
Upvotes: 2
Views: 714
Reputation: 312
It's not recommended, and I suggest you to keep an eye on star schema modelisation. https://en.wikipedia.org/wiki/Star_schema
But If you want to add your tables in a cube you will need to duplicate it. two tables will be used to create your measures (Aggregation, Sum, Count, Comparison, ...) two other tables will be used to create your dimensions (Attributes, filters, ...)
From Table1 (Dimension) and Table1 (Fact) your key will be facttable1.ID and From Table1 (Dimension) and Table1 (Fact) your key will be your Foreign key
Does it help you?
Regards, Arnaud
Upvotes: 1
Reputation: 139
You need to create at least 1 dimension: for your case you can create New Named Query
based on your view using ID as Key-Attribute for Dimension.
Upvotes: 0