Would this data requirement suit a Document -Oriented database?

Posted by codecowboy on Programmers See other posts from Programmers or by codecowboy
Published on 2012-08-20T15:54:39Z Indexed on 2012/09/08 15:49 UTC
Read the original article Hit count: 199

I have a requirement to allow users to fill in journal/diary entries per day. I want to provide a handful of known journal templates with x columns to fill in. An example might be a thought diary; a user has to record a thought in one column, describe the situation, rate how they felt etc.

The other requirement is that a user should be able to create their own diary templates. They might have a need for a 10 column diary entry per day and might need to rate some aspect out of 50 instead of 10.

In an RDBMS, I can see this getting quite complicated. I could have individual tables for my known templates as the fields will be fixed. But for custom diary templates I imagine I would would need a table storing custom_field_types (the diary columns), a table storing entries referencing their field types (custom_entries) and then a third custom_diary table which would store rows matching custom_entries to diaries.

Leaving performance / scaling aside, would it be any simpler or make more sense to use a document oriented database like MongoDB to store this data?

This is for a web application which might later need an API for mobile devices.

© Programmers or respective owner

Related posts about database-design

Related posts about document-databases