I have 4 entities: Event
, Message
, Flow
and Document
.
Event
table stores a limited (seeded) number of records. Message
has many events and each event can be related to many messages. The name event_message
was given for the intermediate table.
As you can see, the convention for intermediate tables are: {tablename}_{tablename}
.
Flow
table stores a limited (seeded) number of records. Message
has many flows and each flow can be related to many messages. The name flow_message
was given for the intermediate table.
A document is created on each relation between Flow
and Message
(each record on flow_message
).
The issue starts here:
Each event on a message has different documents by flow. It means: for each new record on intermediate table flow_message
, each record on intermediate event_message
has a new document related.
To solve this, I created an intermediate table between event_message
and flow_message
named: event_message_flow_message
.
Is this correct (in some conventional way)? Is this modeling correct?
How to proper model and naming the intermediate table derivative by two others intermediate tables?