dimensional-modeling

Find related columns among hundreds of tables for future relational identification

旧城冷巷雨未停 提交于 2019-12-11 01:51:48
问题 I am using SQL Server 2016 to pull information out of our ERP system that is stored in a DB2 database. This has thousands of tables with no keys inside of them. When pulling tables from the system, I want to be able to identify matching column names in tables so I can start creating relationships and keys when building dimensions. Is there a way to create a query that will search my database for column names and list every table that uses that column name? I have been using OPENQUERY and

Fact table with information that is regularly updatable in source system

孤者浪人 提交于 2019-12-10 20:03:27
问题 I'm building a dimensional data warehouse and learning how to model my various business processes from my source system in my warehouse. I'm currently modelling a "Bid" (bid for work) from our source system in our data warehouse as a fact table which contains information such as: Bid amount Projected revenue Sales employee Bid status (active, pending, rejected, etc) etc. The problem is that the bid (or most any other process I'm trying to model) can go through various states and have its

How to handle Bridge table in Star Schema

点点圈 提交于 2019-12-08 00:31:25
问题 I am trying to build a star schema from an E/R diagram (OLTP system) that seems to contain a bridge table. Order is an obvious fact-table and product a dimension-table. I can't see how I can keep the bridge table if the model needs to be a star schema. How would you tackle this relationship if I need to keep information about Channel in the model? 回答1: It depends on how you plan to use the model. If you only need to answer product and channel questions about existing orders, then you can

Is it better to have a surrogate key or nk+effective_time in dimension tables in apache hive

笑着哭i 提交于 2019-12-08 00:27:44
问题 Lets say, there is a SCD2 dimension table - location. The natural key is country, state and city combined. Since it is SCD2 table, eff date is also part of the key. Is it better to have the surrogate key as usavirginarichmond20110101 or create an actual numerical key using row_number() in hive? Why one approach is better over another? 回答1: (Note on terminology: combination of natural keys is called "composite key", not surrogate key, and it's still a "natural key". Surrogate key (aka

T-SQL - Track occurrences over time

做~自己de王妃 提交于 2019-12-07 17:09:16
问题 I have some data which has ValidFrom and ValidTo dates associated with it. In simple terms: MembershipId | ValidFromDate | ValidToDate ========================================== 0001 | 1997-01-01 | 2006-05-09 0002 | 1997-01-01 | 2017-05-12 0003 | 2005-06-02 | 2009-02-07 There is a non-clustered index on this table which includes the two dates as key values. I also have a Date dimension table which covers every date from 1900 to 2999 . I'm trying to figure out how I can select a range of dates

How to handle Bridge table in Star Schema

佐手、 提交于 2019-12-06 12:34:55
I am trying to build a star schema from an E/R diagram (OLTP system) that seems to contain a bridge table. Order is an obvious fact-table and product a dimension-table. I can't see how I can keep the bridge table if the model needs to be a star schema. How would you tackle this relationship if I need to keep information about Channel in the model? It depends on how you plan to use the model. If you only need to answer product and channel questions about existing orders, then you can avoid the bridge table altogether, because M2M relations between channels and products can be resolved though

What are the types of dimension tables in star schema design? [closed]

谁都会走 提交于 2019-12-06 09:37:12
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . When reading about star schema design I have seen that many people uses various names for different types of dimension tables. Please

Is it better to have a surrogate key or nk+effective_time in dimension tables in apache hive

亡梦爱人 提交于 2019-12-06 09:14:36
Lets say, there is a SCD2 dimension table - location. The natural key is country, state and city combined. Since it is SCD2 table, eff date is also part of the key. Is it better to have the surrogate key as usavirginarichmond20110101 or create an actual numerical key using row_number() in hive? Why one approach is better over another? (Note on terminology: combination of natural keys is called "composite key", not surrogate key, and it's still a "natural key". Surrogate key (aka Synthetic key) is a sequential integer that has no business meaning). Short answer: since your dimension is SCD2,

T-SQL - Track occurrences over time

。_饼干妹妹 提交于 2019-12-06 04:06:47
I have some data which has ValidFrom and ValidTo dates associated with it. In simple terms: MembershipId | ValidFromDate | ValidToDate ========================================== 0001 | 1997-01-01 | 2006-05-09 0002 | 1997-01-01 | 2017-05-12 0003 | 2005-06-02 | 2009-02-07 There is a non-clustered index on this table which includes the two dates as key values. I also have a Date dimension table which covers every date from 1900 to 2999 . I'm trying to figure out how I can select a range of dates from the Date dimension table (let's say 2016-01-01 to 2016-12-31 ) and then identify, for each date,

What are the types of dimension tables in star schema design? [closed]

為{幸葍}努か 提交于 2019-12-04 15:15:15
When reading about star schema design I have seen that many people uses various names for different types of dimension tables. Please list the names and a small description of each type. If any list also an alias name. I have come across these types of dimension tables so far: Regular dimension Standard star dimension. Time Dimension A special case of the standard star dimension. Parent-child dimension Used to model hierarchical structures, fx BOM (bill of materials). Snowflake dimension Can also be used to model hierarchical structures. Degenerate dimensions When the dimension attribute is