MySQL or PostgreSQL for Hibernate + JPA2 project [closed] - mysql

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I want to confirm which is better, I have seen that polls say that PostgreSQL is way ahead of MySQL in terms of speed with JPA/Hibernate.
Want some feedback based on speed, reliability, compatibility etc. before I make the final decision on which to use.

Either one can be faster than the other.
It depends on the workload and your DB design. MySQL has some performance features that PostgreSQL does not, but it seems that PostgreSQL scales better with have concurrent read and writes scenarios. But again: this depends heavily on how you use the system. I'm sure you can easily setup a test that proves that either one is faster than the other.
The query optimizer in PostgreSQL is more advanced than in MySQL and copes with complicated statements much better (especially when it comes to sub-selects)
As for reliability I think that PostgreSQL is more reliable (especially when compared to MySQL using MyISAM - InnoDB is a lot better here). The prime goal of the PostgreSQL developers is to first make sure the data is safe. But I do not have any hard facts to support this statement! It's just the feeling I get by reading several DBMS related forums. Problems with corruption seem to be more frequent with MySQL than with Postgres
In terms of (modern) SQL features MySQL is far behind of PostgreSQL (think check constraints, recursive queries, windowing functions, transactional DDL, ...). One thing that PostgreSQL is lacking is an equivalent of MySQL's INSERT ... ON DUPLICATE ... feature (aka "merge" or "upsert").
MySQL's (table) partitioning is easier to setup and manage if that is important.
Compatibility with what? With the ANSI SQL standard?
Then PostgreSQL is (much) better than MySQL.

Related

mongoDB vs mySQL -- why one is better than another in some aspects [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
I am really new to database and am interested in some high level basic knowledge. I have read this wonderful SO post. I under one is better than another in some cases, but not sure why.
Why is MySQL faster than MongoDB at join operations?
Why does MongoDB scale better in distributed system?
Why is MongoDB faster if I am "just selecting a bunch of tables and putting all the objects together, AKA what most people do in a web app" ?
Thanks a lot!
This question lacks any real research, I mean you say you read that question but either that question has some real problems with the source of its information or...well; anyway:
Why is MySQL faster than MongoDB at join operations?
Because it doesn't have any? MongoDB HAS NO SERVER SIDE JOINS. I am sorry to put that in capitals but I say it soooooo often, I just feel like placing it as the defacto answer for most questions.
Any joins you do are client side. This means they will actually be slower than MySQL, or other SQL techs. The important idea behind doing joins client side is that doing them server-side becomes very hard to scale in huge distributed environments, if not impossible. That is why many big SQL users actually attempt to prevent huge joins and are effectively trying to do in SQL what MongoDB does.
The case for this is scenario dependant of course.
Why does MongoDB scale better in distributed system?
http://docs.mongodb.org/manual/replication/ is very important here and so too is http://docs.mongodb.org/manual/core/sharded-clusters/ and I would recommend reading both carefully and how they scale to data partitions and what not.
Why is MongoDB faster if I am "just selecting a bunch of tables and putting all the objects together, AKA what most people do in a web app" ?
I don't know what you mean by that.
I realise this isn't much of an answer but your question is one of those defacto questions and so I answered with a defacto answer.
Since you are new to databases in general I would personally recommend you go use one...

Which database should I use with node.js? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
Which database should I use with node.js? I'm condering MySQL and MONGO DB.
The correct answer is: it depends.
Like many other programming languages node has various adapters for databases. Ture, some are better than others, but they are all changing and evolving so fast that any statement here would be outdated soon. Even if you select one database, you will find at least two or three adapters with different qualities.
In the end it does not really matter what is a good fit for Node, but what is a good fit for your project. Trying to squeeze a relational problem into a NoSQL storage will do you no good.
The node community provides you with lots of possibilities. Take a look at the Node Toolbox to find some solutions for CouchDB, MongoDB, Redis, Database abstraction layers, MySQL, … As always you need a bit of common sense to choose the right module. Look at commit history, how many maintainers, activity, last commit timestamp, issue queue, etc. You will surely find a solution for a database that you are comfortable with.
I personally find it rather overwhelming when I have to learn more than one technology at once. So if you are new to node, I would rather stick to a database you know for your first project.
Every one has different requirements for completion so it really depends on what you are trying to do. Like Joseph said MongoDB and Node.js works really well together but for certain use case, MySQL could probably be a better choice. Also, you might want to considered the database you are the most comfortable with. Personnaly, I would recommand MongoDB but I think it's a matter of preference.

Migrating from MSSQL to postgresql OR mysql [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I am working on .NET environment.
Because of sql server express limitations (4gb max) I want to switch a free solution.
I am checking around and found out postgresql OR mysql would be great solution.
As I only worked on on MsSql, I want to learn which database would be easier for me to migrate all my existing data.
Also which database syntax (postgresql OR mysql) is closer sql MsSql syntax and structure.
So I can learn it faster.
Thanks for your help.
Hmmm... you will find language differences in either of those. I had that same choice a while ago and ended going to MySql due to its immense comunity.
Of course, if your only reason is the 4gb limitation I would not recommend switching (but that's just me). You should upgrade to SQL 2008 / 2012 which they both have 10gb limitation. Also, if you must know, there are other limitations such as using only 1 processor and I believe there's a RAM restriction as well. Anyway it shouldn't make a noticeable difference with small databases (<10g) and not-so-complicated queries.
If you want help in migrating from MSSQL to MySQL you should google for something like "MSSQL to MySQL Migration Toolkit" (I did that). It's fairly easy, you'll make the transition in no-time and most likely without any problems.
Best of luck
MySQL Workbench has a migration wizard. Is has some prerequisites for MS SQL, which are explained very clearly in the wizard help docs.
http://www.mysql.com/products/workbench/

Is it worth to use Oracle for a web application instead of PostgreSQL or MySQL? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 12 years ago.
I'm starting a web application and I'm hesitating if it is worth to use Oracle in order to have a better performance / scalability. Thanks
Oracle requires significantly more infrastructure and specialized staff to be maintained than MySql for example. It offers, arguably, more in return. But since you are talking about scalability / performance, bear in mind that Wikipedia, Flicker, Facebook (and many of the most visited sites in the world today) run under MySQL...
So, put your focus on designing well your database instead of trying to find out which platform to use. Every single one of them has many strengths today, and are ready for production and demanding environments.
I, myself, would never ever even consider using Oracle from the start in a new Web Application. I would only jump to that more expensive RDBMS if really needed.
It can also pay off to use a ORM tool that will give you database independence, so changing the RDBMS will not be a big issue at all.
Oracle can be very fast, but you have to spend millions of dollars for licences, hardware and dba-consulting hours. PostgreSQL is fast, has no licence costs and offers (almost) the same rich functionality as Oracle. PostgreSQL speed depends on your hardware and configuration as well, but you don't have to invest all your money right now to get started.
MySQL is populair, but has limited functionality and isn't as strict as you would expect from a DBMS.
Write you application to be database generic. That way you can move to whatever database works the best for a given installation. That's relatively easy to do in most web environments these days.

Why companies spend a lot of money with Oracle? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 12 years ago.
Why not just postgresql or mysql ?
Is oracle very indispensable in some case ? In which case ?
The above arguments are fluff.
Oracle provides stuff that the others don't, and does so where it matters.
Oracle provides true read consistency without impacting its performance
Oracle provides backup and recovery technologies that don't affect its performance
Oracle provides a rich and mature featureset that the other platforms don't (i.e. FLASHBACK, RAC, Partitioning (in MySQL partitioning is still not implemented correctly), a rich programming environment, etc)
The most important:
Oracle provides instrumentation built into the kernal that let's you troubleshoot and diagnose performance issue very deeply. No other platforms offer this.
There are lots more, but this is why it costs money.
Let me clarify that I am no fan of Oracle in the first place and Oracle can definitely be a bit of a pain to start with (thats why they pay Oracle DBA's the earth) but there are a lot of pro's to Oracle.
Oracle has a rock solid reputation based on years and years of actual deployment in large (and i mean large) scale databases
Oracle used to be first and foremost a database company (not any more but it used to be) and most enterprises prefer knowing that they are going with a specialist rather than someone who "also" makes a database
Most enterprises prefer having the comfort of knowing that in case of issues they have tie-ups with the vendor who can be held accountable - which is not the case with open source stuff.
Oracle is a good database (sure, if u havent used it it takes some getting used to but that doesnt mean its not good. I have used SQL Server / Oracle / MySQL and though Oracle was a bit of a pain to start with, i do think its good).
(paraphrasing) no one ever got fired for buying Oracle.