Requesting Schema Suggestions

27 views
Skip to first unread message

Bobby Johnson

unread,
Feb 27, 2012, 2:15:30 PM2/27/12
to rav...@googlegroups.com
I am working on my first serious project with RavenDB and would like to solicit suggestions. I currently have two concepts in my domain, Presenters and Presentations. Presenters can present many times and a Presentation has one Presenter currently. In a relational model I would have two tables, but am not sure how to select document schema.

I would like to be able to show up coming presentations with some minimal info about the presenter as well as have a presenters page that shows info about all of their presentations.

What I have come up with is located here:


Anyone have suggestions on a better schema?

Thanks,
Bobby

--
"The explanation requiring the fewest assumptions is most likely to be correct."

- Occam’s Razor
http://en.wikipedia.org/wiki/Occam's_Razor

Oren Eini (Ayende Rahien)

unread,
Feb 28, 2012, 3:27:11 AM2/28/12
to rav...@googlegroups.com
You don't need the Presenter.Presentations property. You are very rarely, if ever, going to have to try to load the presentations from the presenter, and when you do, you'll want to make this with paging,sorting,etc.

De-normalizing the Presenter in the presentation is good. You won't need to update the presenter name ever.
For example, I used to go mainly as Ayende Rahien, now I go as Oren Eini. Old presentations don't need to change, though.

Bobby Johnson

unread,
Feb 28, 2012, 9:54:45 AM2/28/12
to rav...@googlegroups.com
Excellent, thanks the advice Oren.

For anyone else struggling withis this topic and trying to break the relational mindset here are a couple good blog posts taht helped me understand yesterday.

Dody Gunawinata

unread,
Feb 28, 2012, 10:21:19 AM2/28/12
to rav...@googlegroups.com
The great thing about RavenDB especially for new development is that
it's pretty easy to fix your schema during development. It is trivial
to refactor a schema and leave the old test data behind.

--
nomadlife.org

Reply all
Reply to author
Forward
0 new messages