[ 
https://issues.apache.org/jira/browse/OFBIZ-10953?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17031607#comment-17031607
 ] 

Jacopo Cappellato commented on OFBIZ-10953:
-------------------------------------------

The many reasons to use surrogate keys as primary keys in dimension tables 
instead of natural keys are well articulated in the section titled "Surrogate 
Keys" at page 58 of the DWH Toolkit book.

We can always consider to adopt exceptions to these rules if there are strong 
reasons for doing this, but I don't see them here and also, in my opinion, it 
is better to postpone exceptions when they are really required and instead 
implement the same, consistent, simple and clear patterns for all the 
dimensions since we are still building the foundations of this OLAP data model 
in the BI component and future contributors will use this code as templates to 
build new dimensions and facts.

> have CurrencyDimension have a dimensionId that is based on the natural key
> --------------------------------------------------------------------------
>
>                 Key: OFBIZ-10953
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-10953
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: bi
>    Affects Versions: Trunk, Release Branch 17.12, Release Branch 18.12
>            Reporter: Pierre Smits
>            Assignee: Pierre Smits
>            Priority: Major
>              Labels: CurrencyDimension, birt, currency, dimension, dwh
>         Attachments: OFBIZ-10953-BI.patch
>
>
> Currently the record sequencer (delegator.getNextSeqId) is used to determine 
> the dimensionId for the CurrencyDimension. This is unnecessary as the uomId 
> from the UOM table can be used for currency.
> It also makes it easier to set the foreign-key in fact tables by generating 
> it based on the date provided, than by retrieving the dimensionId based on a 
> retrieval through the getDimensionIdFromNaturalKey service.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to