From notifications-return-30410-apmail-ofbiz-notifications-archive=ofbiz.apache.org@ofbiz.apache.org Thu Feb 6 13:59:03 2020 Return-Path: X-Original-To: apmail-ofbiz-notifications-archive@minotaur.apache.org Delivered-To: apmail-ofbiz-notifications-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by minotaur.apache.org (Postfix) with SMTP id DFB3F1947B for ; Thu, 6 Feb 2020 13:59:02 +0000 (UTC) Received: (qmail 60708 invoked by uid 500); 6 Feb 2020 13:59:02 -0000 Delivered-To: apmail-ofbiz-notifications-archive@ofbiz.apache.org Received: (qmail 60683 invoked by uid 500); 6 Feb 2020 13:59:02 -0000 Mailing-List: contact notifications-help@ofbiz.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ofbiz.apache.org Delivered-To: mailing list notifications@ofbiz.apache.org Received: (qmail 60674 invoked by uid 99); 6 Feb 2020 13:59:02 -0000 Received: from mailrelay1-us-west.apache.org (HELO mailrelay1-us-west.apache.org) (209.188.14.139) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Feb 2020 13:59:02 +0000 Received: from jira-he-de.apache.org (static.172.67.40.188.clients.your-server.de [188.40.67.172]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 5ED49E2CA2 for ; Thu, 6 Feb 2020 13:59:00 +0000 (UTC) Received: from jira-he-de.apache.org (localhost.localdomain [127.0.0.1]) by jira-he-de.apache.org (ASF Mail Server at jira-he-de.apache.org) with ESMTP id 3DD347803DE for ; Thu, 6 Feb 2020 13:59:00 +0000 (UTC) Date: Thu, 6 Feb 2020 13:59:00 +0000 (UTC) From: "Jacopo Cappellato (Jira)" To: notifications@ofbiz.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (OFBIZ-10953) have CurrencyDimension have a dimensionId that is based on the natural key MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/OFBIZ-10953?page=3Dcom.atlassia= n.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D170= 31607#comment-17031607 ]=20 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 "Surroga= te Keys" at page 58 of the DWH Toolkit book. We can always consider to adopt exceptions to these rules if there are stro= ng reasons for doing this, but I don't see them here and also, in my opinio= n, it is better to postpone exceptions when they are really required and in= stead implement the same, consistent, simple and clear patterns for all the= dimensions since we are still building the foundations of this OLAP data m= odel in the BI component and future contributors will use this code as temp= lates to build new dimensions and facts. > have CurrencyDimension have a dimensionId that is based on the natural ke= y > -------------------------------------------------------------------------= - > > 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 determ= ine the dimensionId for the CurrencyDimension. This is unnecessary as the u= omId=C2=A0from the UOM table can be used for currency. > It also makes it easier to set=C2=A0the foreign-key in fact tables by gen= erating=C2=A0it=C2=A0based on the date provided, than by retrieving the dim= ensionId based on a retrieval through the getDimensionIdFromNaturalKey serv= ice. -- This message was sent by Atlassian Jira (v8.3.4#803005)