Which database should be selected for sonarqube?

2,431 views
Skip to first unread message

batt...@gmail.com

unread,
Jul 24, 2015, 7:39:35 AM7/24/15
to SonarQube
I have started installing sonarqube 5.0 on for code analysis and reporting.
With installation, I have found embedded h2 database as default db is installed.
Then, I have installed Oracle 12c and integrate sonar with it.

But, I was thinking to try other databases also. So, as per your experiences , which is recommended to use i.e., Oracle , MySQL, Microsoft SQL Server, PostgreSQL, Keeping in mind Integration, performance & scalability.

Out of these which database is better and why it is recommended to be used with sonarqube.

1) Oracle
2) MySQL
3) Microsoft SQL Server
4) PostgreSQL

qual...@gmail.com

unread,
Jul 26, 2015, 7:19:41 AM7/26/15
to SonarQube, batt...@gmail.com
Hello,

I would say it depends of your objectives and the environment.
If you are implementing SonarQube in a professional - enterprise - environment, look if there is some recommended corporate DB by this company.

Personally, I have been using Oracle, because this is what I find most into customers env., and even on my own laptop, but Oracle is sure not the easiest DB to use. The experience curve can be very slow. Performance and scalabitliy are good, if you are able to play with parameters which means learning/experimenting and administration. This can be very time consuming. Good thing is that there is a good community when it comes to trace a problem and find a solution, but even for this, you will need a good level of knowledge: you cannot just put a msg saying 'Hi, I have this error' if you want to be answered. You have to add 'I have been trying this and this and it does not work'. Not really for newbies.
Furthermore, you are supposed to buy a license with Oracle, although you can download and install it freely but it is never clear if you are allowed or not.
Some posts on my blog that can help you make your own idea: http://qualilogy.com/?s=oracle

I have been using MS SQL Server but I don't like it very much, not very natural in my opinion. Also, this is a MS product with the MS usual pains. For instance,  when you create a DB, it uses by default your Win login. Then you are looking everywhere for some Admin login, but too late. A little bit like Win8 if you see what I mean.

I use MySQL: simple to install and administrate. Performance looks correct but I have not been pushing it so far like Oracle. Very secure, no bugs (at least with SQ). Install and forget it.

I have not been really using PostreSQL but the only time I did it, I did'nt like it. It creates a lot of empty files, and when I used a soft to clean/optimize the hard disk, it suppressed some of them and then .. DB corruption. 

If you want to install a DB for your own self, for learning, I would recommend MySQL.
If on your own single project/team, MySQL is OK too, but if you will have to open your env to other projects/teams, you will have to thing eventually to a DB migration in the future, and this is never easy or even possible. When it comes to SonarQube, the only way will be to reproduce your analysis on the new DB, which means either keeping a lot of versions of your code, or loosing the history of the analysis.
Again, it depends of your objectives. If you just want some Quality Gates on the last code releases, and not keeping stats on your projects, this is not so much of a problem.

Hope it helps. Please consider that this is just my opinion, some other people might not agree.
Best regards.
Reply all
Reply to author
Forward
Message has been deleted
0 new messages