Reputation: 876
I pretend to build a intranet portal using nodejs+express+angular, however I would like to know if MongoDB would be a good choice for the database.
Users have to report their work hours to later submit invoices to clients
Clients have to be managed (added, edited, deleted)
I will have to show dashboards with invoice values, top clients and so on. (by performing arithmetic functions)
Would it be easy to relate, for example, the client ID in the hour record with the client itself?
Or should I used a SQL db such as MySQL?
I need facts based on Performance, scalability etc.
What will happen when my NoSQL DB goes bigger? Will it lose performance?
Upvotes: 0
Views: 445
Reputation: 10665
My Experience: I have been using MongoDB & Mysql for the past 2 years 5 months.
Everything I write here is going to be from my personal view and experience.
These days MongoDB (NoSQL in general) is a buzz word everybody talks about mongoDB, couchDB, MEAN stack etc ... that why we started it and here is what happened:
we found a project that was perfect for mongodb:
We had very large user base
There was a lot inter dependencies between our entity objects i.e Entity A cant live without Entity B so we decided to embed the dependent entities.
Still we are using MongoDB for the same project but our database design is very different than our initial database design( which were designed following the mongodb principles):
Loading database entities become very heavy due to the embeded documents so we have to move all embeded documents into separate collections. Hence our database design is now very flat(i.e looks like relational database design).
We found a lot orphaned data in our database; initially we thought we can implement our data integrity on our repo/service layer but it is obvious our implementation was not perfect and sometimes we directly run mongo queries on the database console so we were actually messing up our data while mongodb kept silent laughing at us :)
After we finished most of our app's functionality we focused on writing reports and doing analysis on our data we found out our mongodb queries become very huge and unmanageable; which we believed using relational databases like mysql could have eased this.
Bottom line when I started using MongoDB I was very fascinated about it but not afer I know how to use it:
But now we got a similar project and we choose Mysql instead of Mongodb; we could have replicated the old project and finish it in few weeks but we learned our lesson. If you really care about your app ( ie. your data) go for Mysql(any relational database).
We are only using MongoDB for old projects and Kibana(because it is for logging and we dont care much about our log data)
Who said Mysql does not scale? Facebook is using 1,800 mysql servers!
Upvotes: 2