QlikView circular reference

二次信任 提交于 2019-12-13 02:05:00

问题


I have just started working on QlikView and facing difficulty in data-modelling. can anybody help me in resolving circular reference in the following model. Data-Model With Circular Reference

Any help would be appreciated.


回答1:


One solution could be to load the Cities table twice (Cities and Cities2) and name the unique key CityId2 in Cities2 and in Branches.

An other way could be to join the Cities into their refering tables while selecting the data from your database.




回答2:


Left Join Countries into Cities --> Duplicate the resulting table --> Appropriately rename fields(i.e. [Branch City]) and Left Join one of the tables into Customers and the other into Branches.

Left Join Branches into departments, into Employees, into employees and left join designations into employees.

Also - make sure you need all of those fields.

While against many relational DB philosophies, your best bet here is probably to de-normalize. Qlikview's engine is very good at compressing data (only stores unique data once w. pointer table). The whole reason to normalize data is to remove redundancy, but becasue QV does much of that for you, overall performance is better with less tables. Otherwise, its the developer who has to decide the balance between ease of maintenance and denorm.

Data modeling best practices in Qlikview define the star schema as ideal. This is generally a solid guide, which will help you avoid problems like circular references. A balance of normalization and proper modeling is required for optimal performance.



来源:https://stackoverflow.com/questions/19396393/qlikview-circular-reference

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!