The problem
I am trying to make a star schema of the following situation, concerning transactions on a stock market. I have summarized the scenario here:
- Each transaction traded on the market has
- 1 or more buyers, which can either be a person or a venue
- 1 or more sellers, which can either be a person or a venue
The attempt
I have tried looking up best practices on modelling many to many relationships and inheritance in a star schema, and combined these. This gives me the following star schema
Type Name Description
Fact Transaction Fact containing all transaction details
Dim EntityGroup Groupings of entities (just there to make a complete model - no attributes)
Dim Entity Superclass of all entities (just there to make a complete model - no attributes)
Bridge EntityGroup_Entity Bridge for the many-to-many relationship between entities and groups
Dim Person Subclass of entities, holding all attributes of persons (shares the primary key with Dim Entity)
Dim Venue Subclass of entities, holding all attributes of venues
The question
Am i right that this would be best practice for a star schema, or can you point out any places the design is faulty?