title: Database Logging Table Structure
body: <p>I'm creating some database tables for storing log entries. Under normal circumstances I would always normalize and never stuff values together, but I'm not 100% convinced that's a good idea here.</p>
  
  <p>I could normalize and have:</p>
  
  <ul>
  <li>LogEntry</li>
  <li>LogEntryCategory</li>
  <li>LogCategory</li>
  <li>LogEntryProperty</li>
  </ul>
  
  <p>LogEntry has a many to many relationship with LogCategory and a LogEntry has a 1 to many with LogEntryProperty (which are name/value pairs).</p>
  
  <p>Alternative is a denormalized version which has just LogEntry with categories stored as a comma delimited list of string categories and properties stored as a comma limited list of Name: Value formatted properties. As ugly as this sounds, from a reporting, performance, and searchability perspective, I'm not sure if this isn't better.</p>
  
  <p>Which is a better idea?</p>
  
  <p>Thanks.</p>