简体   繁体   English

维度创建 - 多种用途

[英]Dimension Creation - Multiple Uses

We received some generic training related to TM1 and dimension creation and we were informed we'd need separate dimensions for the same values. 我们收到了一些与TM1和尺寸创建相关的通用培训​​,我们被告知我们需要相同值的单独尺寸。

Let me describe, we transport goods and we'd have an origin and destination province and in typical database design I'd expect we'd have one "province" reference table, but we were informed we'd need an "origin" dimension and a "destination" dimension. 让我来描述一下,我们运输货物,我们有一个起源和目的地省份,在典型的数据库设计中,我希望我们有一个“省”参考表,但我们被告知我们需要一个“原点”维度和“目的地”维度。 This seems to be cumbersome and seems like we'd encounter the same issue with customers, services, etc. 这似乎很麻烦,似乎我们遇到了与客户,服务等相同的问题。

Can someone clarify how this could work for us? 有人可以澄清一下这对我们有用吗?

Again, I'd expect to see a "lookup" table in the database which contains all possible provinces (assumption is values in both columns would be the same), then you'd have an ID value in any column that used the "province" and join to the "lookup" table based on ID. 同样,我希望在数据库中看到一个包含所有可能省份的“查找”表(假设两列中的值都是相同的),那么在任何使用“省”的列中都有一个ID值“并根据ID加入”查找“表。

in typical database design I'd expect we'd have one "province" reference table, but we were informed we'd need an "origin" dimension and a "destination" dimension 在典型的数据库设计中,我希望我们有一个“省”参考表,但我们被告知我们需要一个“原点”维度和一个“目标”维度

Following the regular DB design it makes sense to keep two data entities separate: one defines source, other defines target. 遵循常规数据库设计,将两个数据实体分开是有意义的:一个定义源,另一个定义目标。 I think on this we'd both agree. 我想在此我们都同意。 If you could give more details it would be better. 如果你能提供更多细节,那就更好了。

Imagine a drop down list: two lists populated by one single "source", but represent two different values in DB. 想象一下下拉列表:两个列表由一个“源”填充,但在DB中表示两个不同的值。

assumption is values in both columns would be the same 假设两列中的值都是相同的

if the destination=origin, you don't need two dimensions then? 如果目的地=原点,那么你不需要两个维度? :) This point needs clarification. :)这一点需要澄清。

Besides your solution (combination of all source and destination in a table with an unique ID, which could be a way of solving this), it seems it's resolvable by cube or dimension structure changes. 除了你的解决方案(具有唯一ID的表中的所有源和目标的组合,这可能是解决此问题的方法),它似乎可以通过立方体或维度结构更改来解决。

If at some dimension you'd use eg ProvinceOrigin and ProvinceDestination as string type elements, and populate them from one single dimension (dynamic attribute) then whenever you save the cube you'll have these two fields populated from one single dimension. 如果在某个维度,您将使用例如ProvinceOriginProvinceDestination作为字符串类型元素,并从一个维度(动态属性)填充它们,那么每当您保存多维数据集时,您将从一个维度填充这两个字段。

Obviously the best solution for you depends on your system architecture. 显然,最适合您的解决方案取决于您的系统架构。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM