Metadata
- Author: Paddy Alton
- Full Title:: Data Modelling for Startups
- Category:: đď¸Articles
- Document Tags:: data modeling,
- URL:: https://medium.com/apolitical-engineering/data-modelling-for-startups-part-i-f566af2a88ca
- Finished date:: 2023-05-16
Highlights
chasm trapâ. It looks like this: If we want to compare two fact tables, we have to work out how to âcross the chasmâ (i.e. understand the relationship between the two based on their shared dimensions and join them appropriately). The reason itâs a âtrapâ is because when you have multiple âjoin pathsâ between fact tables, itâs very easy to end up double counting facts. Some business intelligence software can manage this issue. Things can get a bit more dangerous when we create a âgalaxyâ schema â a set of star schemas connected via conformed (shared) dimensions:
An example âgalaxy schemaâ. Note that queries including the âSubscription Creationâ fact could reference the âSubscriptionsâ dimension, which is NOT shared with the other fact tables. This can sometimes cause problems if queries regarding multiple different facts reference dimensions that are not shared. (View Highlight)
One way to avoid this is to find a way (e.g. in a business intelligence tool) to expose coherent groups of data models that avoid such pitfalls. These model groups would contain either ⢠a single star ⢠a single chasm (View Highlight)
Because we used
RIGHT JOIN
to construct our OBT model, some rows have dimension attributes, butNULL
sales measures. We can use the query above to reveal which products have zero sales value associated with them (View Highlight)