Connecting dimension tables in a multi-fact star schema database warehouse

data-warehousedatabase-designdimensional-modelingstar-schema

I am new to data warehouse modelling so please bear with me.

In database warehouse modelling, the star schema is typically a fact table with multiple dimensions connected directly to it. However, what if there are two or more fact tables in the schema and some of the dimensions are related? Please see below as an example:

enter image description here

Is it allow to draw a line to relate the dimension tables in star schema database warehouse modelling? For example, assume dim_a is hotel_rooms and dim_d is customers, can I draw the line between the two table in the star schema since a hotel room has many customers staying?

In all the examples I searched online, the star schema is always connected to dimension tables and these tables are not drawn with a line to connect it.

Best Answer

Having multiple fact tables in a model is pretty common and is sometimes referred as a Fact Constellation. The shared dimensions are referred as Conformed Dimensions.

As @bbaird said in the comment there shouldn't be a direct one-to-many relationship between dim_a (hotel_rooms) and dim_d (customers) as this relationship should be modeled through a fact table (booking, reservation, stay, ...).

Relationships between dimensions are mainly used to drill-down from one level to another (for instance over a geographical area or as you modeled it for the time dimension). A model with dimensions linked like that is referred as a Snowflake. It is often also possible to flatten these hierarchical levels into a single dimension which might add complexity to maintain but provide better performance on some RDBMS.