Hi,
I am not certain when to use 3way ties. I have implemented a 3way tie in my model, and would like to confirm this is correct.
In email campaign data: a customer receives a message, sent by an email campaign. Customers can only be addressed once only by a single campaign.
I have created campaign, message and customer anchors. Each have several attributes. (The message anchor was created to accommodate attributes such as senddatetime and bounce-reason).
Initially i had modeled the a 2way tie between customer and message, and a 2way tie between message and campaign. (So no direct tie between campaign and message). When loading new data I want my ETL to check if a message already exists before creating a new message anchor ID. I found I had to combine the 2 tie tables, to see if a relation between the campaign and the customer already existed. This method seemed cumbersome and performed poorly as tables grew large.
A 3way tie seemed a better representation of reality: The relation between a campaign and a customer exists if and only if a message was sent. The relation between message and customer exists if and only if there is a campaign that sent this message. The relation between campaign and message exists only for each customer addressed.
This 3way solution certainly appears more elegant, and performs much better.
Is my reasoning correct? Do you agree that this situation calls for a 3way tie?
The message ID is primary key. I am considering a secondary index on the customer ID in the 3way tie table.
Do you have any observations?