Ok men.

I have begun creating a little sparetime project that may become large at some point. Before I truly get began, I would like to make sure that I am beginning using the right setup. And So I come your way.

I am creating a service, that will work mostly like a todolist/project planner. Within this system you will see some customers and some tasks. Each task could be designated to multiple customers, and every user might have multiple tasks (many to a lot of relation).

So far I had been likely to use MySQL, but a friend, who's area of the project, sugested MongoDB rather. He informs me it would increase performance and become more scaleable. However I am convinced that to be able to either get all tasks designated to some specific user, or all customers designated to some specifik task, one will have to use joins, which MongoDB does not have (or have inside a cumbersome way so far as I've understood).

Now my question for you is "Which DB system can you suggest. MySQL or MongoDB or perhaps a third option? And why?"

Appreciate your time and effort as well as your assistance.


We use MySQL at IGN to keep person associations (many-to-many much like your use situation), and also have about 5M records within the relationship table. We've 4 MySQL servers inside a cluster and also the reads are distributed across 3 MySQL slaves. BTW you could denormalize to optimize reads and penalizing creates amongst other things in line with the read/write heavyness of the system.

We make use of the DAO pattern with Spring, so its simple enough for all of us to swap DB companies through configuration (by writing a Mongo/MySQL DAO Implementation as relevant). We've moved activities (as with Social Networking) to Mongo several months ago however the person associations live happily in MySQL.

The comment for your publish by Jonas states everything,

If necessary, you could scale later.


I'm greatly from the mindset that If you don't have scaling problems, don't worry too much (if at all) about scaling problems. Why don't you use what's simplest, wisest and cleanest to deliver the characteristics clients purchase (during my situation a minimum of!) This method saves considerable time and and it is correct for 9 projects from 10.

Learning a technology since it scales is excellent. Being associated with an unlearned technology and unknown technology since it scales within an approaching project, isn't as great. You will find a number of other factors than scalability, when utilizing third party stuff.

MySQL would appear to become a sensible choice MySQL being elderly and getting lots of client libraries, ORM's along with other timesaving technologies. MySQL are designed for millions (billions if you possess the ram) of rows. I haven't yet encounter a task it couldn't handle, and I've come across some pretty impressive datasets!

Obviously, when you'll need performance, sure maybe you'll find yourself ripping out orm and sql producing code to exchange with your personal hands tweaked queries. however , on that day is much down the road and odds are, on that day won't ever even come.

Mongodb, although it's real awesome I'm sorry to express might provide you with issues getting nothing related to scaling.

My 2 cents, happy coding!


Either may likely work with your reasons, however your database appears relatively rigid in the structure, a thing that SQL deals well with. As a result, I would suggest MySQL. A many-to-many relationship is comparatively simple to apply and access, too.

You might have a small small performance hit, but in my opinion, this really is generally not very noticeable with more compact scale programs (i.e. databases with under millions of records). I actually do accept @Jonas Elfström's comment, however: you ought to have an abstraction layer involving the application and also the database, to ensure that should scaling become an problem, you are able to address it without a lot of problems.

Stick to a relational database, it may handle many to a lot of associations and it is fully featured for backup and recovery, high availability and importantly you will notice that every developer you'll need knows it. You will find lots of recorded techniques for scaling a relational database.

Pick a wide open source databases either MySQL or Postgres depending on which your team is most acquainted with and just how it combines in to the relaxation of the infrastructure stack.

Make certain you design your computer data model properly most significantly the associations between your organizations.

Best of luck!