English 中文(简体)
Project management web app: relational or document oriented DB?
原标题:

There re quite a few posts discussing relations vs document databases, however they are all quite generic.

I d like to understand their differences in a specific example.

Let s imagine we re building another scrum-oriented project management web app.

While we d like to experiment with a new technology, we don t want to sacrifice design and increase overall complexity just to do something new that s hype. We want to make the right decision, even if that means using an old technology.

So, think of PivotalTracker. We ll be storing projects, stories, story comments, maybe rare attachments, and maybe sub-tasks (story split into actual tasks).

There s support for iterations as well, so each task actually belongs to a project and can be in iteration. Inside iteration, tasks need to be arranged in specific order. User can rearrange the stories by dragging them up and down.

For each story we also want to track time spent on it, using separate time entries.

I might want to generate reports, but nothing too fancy (burndown, maybe something related to time)

Which DB would you use, relational or document? Or some other? And why?

How would you design its structure? For example if you would use document DB, would you normalize at all?

问题回答

The basic tradeoff between NoSQL and Relational DBs is in the reporting capabilities. With relational databases, this is done with set operations and relational dbs are really very well optimized for reporting generally. This requires rigid schemas so that the math works right. With NoSQL dbs this is done via MapReduce, and distributed computing, and flexible schemas get in the way. In essence with NoSQL, your reporting is always purpose-built and ad-hoc reporting is virtually non-existent. For this reason I a fan of the idea that you should always start with an RDBMS and then add NoSQL adjuncts as needed.

This is particularly true with project management where business owners may want to come up with new reports from time to time.





相关问题
How to model a many-to-many relationship in App Engine?

I have a question regarding how to model a many-to-many relationship in App Engine: A Blogentry can have many tags, a tag can apply to many blog entries. I see a couple of scenarios: Use a Set of ...

How to emulate tagged union in a database?

What is the best way to emulate Tagged union in databases? I m talking about something like this: create table t1 { vehicle_id INTEGER NOT NULL REFERENCES car(id) OR motor(id) -- not valid ... } ...

Users asking for denormalized database

I am in the early stages of developing a database-driven system and the largest part of the system revolves around an inheritance type of relationship. There is a parent entity with about 10 columns ...

How to best implement a 1:1 relationship in a RDBMS?

Yesterday while working on a project I came up on a peculiar 1:1 relationship which left me wondering - how to best implement this (clearly, we had done it wrong :D) The idea is that there are two ...

Automatic filling entity properties

I have some type an architect(?) question I develop an application, based on Spring and Hibernate (annotated configuration) For each table in my database I added 4 fields: createdBy and modifiedBy(...

热门标签