A field guide belongs on two shelves
One $60 book sale belongs to Nature and Local Interest.
The interview prompt
One $60 book sale belongs to Nature and Local Interest. Another $40 sale belongs only to Nature. The marketing lead asks for category reach and the finance lead asks for sales contribution by category. Prepare both outputs.
Decide whether a row participates or receives credit
For full membership credit, Nature has $100 of sales associated with its titles, and Local Interest has $60. Adding the category rows gives $160 because the first sale participates twice. That view answers which sales touched each category. Label it clearly if an analyst can download the result.
For your finance example, suppose the business approves 25% of the first sale for Nature and 75% for Local Interest. The second sale remains entirely in Nature. Attributed sales are $55 and $45. Both reports come from the same facts. The bridge supplies membership, and a separately accountable rule supplies weights. Neither the number of categories nor their alphabetical order establishes a sensible business weighting.
Decide how history works if a title moves shelves midmonth. An event-time membership can support historical merchandising accountability. A current-membership view lets today’s category manager examine the history of the books they now own. Test for duplicate active assignments, weights outside the allowed range, sums other than one, and products with no category. Complete weights on the products you happened to join do not establish full coverage.
The model behind the answer
Title, publisher, and format can sit on a flattened product dimension. Splitting publisher into a separate related table creates a snowflake and can make sense when many products share governed publisher details. A taxonomy in which some branches have an extra level is a different issue. You may need a parent-child hierarchy to navigate paths of varying depth.
Now place one field guide under both Nature and Local Interest. A bridge table records the product-to-category memberships. The question “which titles appear on the nature shelf?” is straightforward. “How much did each category contribute to total sales?” needs a rule. Giving each category full credit is legitimate for discovery, but its totals overlap.
If the business approves equal attribution, six copies contribute three to each category. Test that the weights for the product sum to one at the applicable date. A category membership table by itself cannot tell you how the bookshop wants credit assigned. Kimball on multivalued dimensions
Make the reviewer choose the business meaning
Ask the agent for two report definitions over the same shelf memberships. Give the reviewer the $60 multishelf sale, the $40 Nature-only sale and the approved 25/75 split for the first. Request the output labels as part of the change.
Reviewer decision. The reach view associates $100 with Nature and $60 with Local Interest. The allocated view yields $55 and $45. Change the order of the bridge rows and rerun both. If the allocation moves, the implementation has inferred a policy from row order. The merchandising owner must supply the policy.
Further reading. The Data Warehouse Toolkit, 3rd ed., on representing a multivalued relationship with a bridge.
One more question
Two authors co-write a book. Is the shelf attribution rule reusable for royalties?
Check your reasoning
Only if the royalty agreement independently establishes those shares and the same basis of calculation. Category credit is an analytical convention. A royalty attribution must follow the applicable entitlement, period, and product. Preserve each relationship’s meaning.
Previous · Five dates and one calendar · Next · Which changes deserve a new row · Complete series map