title: DynamoDB one-to-many relation denormalization or adjacency?
body: <p>I am designing a table for a data structure that represents a business operation that can be performed either ad hoc or as part of a batch. Operations that are performed together as a batch must be linked and queryable, and there is meta data on the batch that will be persisted.</p>
  <p>The table must support 2 queries: retrieve history, both ad hoc and batch instances.</p>
  <p>Amazon suggests 2 approaches, <strong>adjacency</strong> and <strong>denormalization</strong>.</p>
  <p>I am not sure which approach is best. Speed will be a priority, cost secondary.
  This will be a multi-tenant database with multiple organizations with million+ operations. (Orgs will be a part of partition key to segregated these across nodes)</p>
  <p>Here are the ideas I've come up with:</p>
  <ul>
  <li>Denormalized, non adjacency - single root wrapper object with 1 (ad hoc) or more (batch) operation data.</li>
  <li>Denormalized, adjacency - top level keys consist of operation instances (ad hoc) as well as parent objects containing collection of operation instances (batch)</li>
  <li>Normalized, non adjacency, duplicate data - top level consists of operations instances, with or without a batch key, abd batch information duplicated among all members of batch</li>
  </ul>
  <p>Is there a standard best practice? Any advice on setting up/generating keys?</p>