Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • 1
    Be careful, as the custom template setup is heading into EAV (Entity-Attribute-Value) territory, which is usually considered an anti-pattern. You're at least going about it the right way, by having a separate table for the field types. Please consider your data needs again - you may find that your data may be more constrained than you think. You can keep the EAV model, if necessary, but make it the last option; this is one of the situations where it may make sense. Unfortunately, I've never looked into MongoDB, so I can't give any recommendations there. Commented Aug 20, 2012 at 17:31
  • How often would you expect entries to be edited? Commented Aug 20, 2012 at 19:22
  • If all the user is going to do is enter information in slots, why not use a real formatted document instead of using a database? Just a thought. Also, the fact that a diary columns vary does not call for a complex model. A user_diary has 1 or more diary_columns is not complex. Commented Aug 21, 2012 at 6:14
  • @JeffO I think editing of individual entries would be rare and perhaps even discouraged. Annotations on entries might be a future feature. Commented Aug 21, 2012 at 8:02