4 ms·
What I find both fascinating and scary about databases is how to choose between the wide variety of databases without understanding exactly how they work? And i
by pm90 12y ago
What I find both fascinating and scary about databases is how to choose between the wide variety of databases without understanding exactly how they work? And it doesn't help that there are new databases springing up all the time.
Is there a way for application developers to understand these databases quickly without spending weeks working with them?
- justinsb 12y agoThe simple answer is to use PostgreSQL, unless you have a good reason not to. There are definitely cases where PostgreSQL is not the optimal choice, but if you don't know why you're not a good match for Postgres, you're probably not in that group.
- daigoba66 12y agoPostgres, and MSSQL if you can afford it, are the Swiss Army Knives of database systems. And I mean that in a good way.
- takeda 12y agoFor a second I thought you said MySQL and was a bit puzzled. I know indirectly that MSSQL is quite good database, but since you are putting Open Source and proprietary database next to each other it makes me wonder why you picked MSSQL and for example skipped its competitor such as Oracle. This is an honest question, I know very little about MSSQL or Oracle so I'm curious why you picked this one. I know that at least 10 years ago MSSQL and Oracle were close competitors, did Oracle lose their race?
- daigoba66 12y agoI mentioned MSSQL specifically because of personal experience with it over the past 8 years. I see PostgreSQL as the best open source alternative. I have little to no experience with Oracle, so I can't speak for it, but I suspect it's just as functional and preformant.
- matwood 12y agoMSSQL can be a great value for the money if you need all of the additional tools (SSIS, MSAS), and you are already in a Windows environment. For a straight rdbms, pg is a great solution. Oracle is something you only use when you have reached some problem that only Oracle can solve. Even then, I would still try to work around Oracle. It is expensive and requires a large amount of tuning to make work well. Oh, and pretend MySQL doesn't exist.
- thorin 12y agoI've used Oracle since 1998 and SQLServer since early 2000s. Oracle has great defaults now and the free version is very good. Licenses for MSSQL and Oracle can be competitive - obviously if you are a MS shop SQLServer will become cheap(er) in comparison. I prefer Oracle because I know it better and I sometimes work with *nix. PL/SQL packages are far better than the comparable stored procedures in MSSQL. APEX is pretty unique too. If I was starting on an open source or startup project with a modern web framework I definitely be looking at using Postgres - it looks great.
- matwood 12y agoFair enough. It has been awhile since I used Oracle and we used to joke that the defaults were set such that you had to hire Oracle as a consultant to set up the db and tune it :) Clearly competition has helped there. If I was starting on an open source or startup project with a modern web framework I definitely be looking at using Postgres - it looks great. I'm in complete agreement, if I was starting a new project today pg would be the default to decide why not to use.
- thorin 12y agoActually if I was starting something from scratch AND I needed to get something done quick AND I had an Oracle licence/host I'd use Oracle APEX. http://www.oracle.com/technetwork/developer-tools/apex/overview/index-155186.html http://www.oracle.com/technetwork/developer-tools/apex/overv... Which as an oracle user and pl/sql programmer is a great way to build an app quickly. I guess if I was building something (quickly) from OS I'd use Django or Java Spring or Grails.
- threeseed 12y agoEveryone avoids MSSQL, Oracle, DB2, Teradata etc these days not for any technical reasons. It purely comes down to cost. Both in the short term and the long term. Even in enterprises its becoming hard to justify the vendor, consulting and hardware costs.
- bbcbasic 12y agoUse a "NoSQL" database when you have very large amounts of data (so you need 1000s of separate disks) or large volumes of queries (so you need a 1000s of separate servers). Otherwise MySQL, SQL Server, Oracle etc. is probably fine. NoSQL has an learning and 'new technology' overhead that isn't worth paying unless the pain of using traditional databases is too high. Don't forget SQLLite too - nice for the very small applications.
- hugofirth 12y agoIts not necessarily just about the quantity of data. What you want to do with the data (the queries you want to run) should play an important role in deciding your database. For example: a query workload with lots of deep traversals would make a graph database attractive even for a relatively small dataset.
- nickik 12y agoThere are many other reasons to use "NoSQL" not just big data. Sure MySQL would probebly be fine, but somebody might just think that RandomDB might just be nicer to use, easier to set up, closer to your data model or any number of other things. > NoSQL has an learning and 'new technology' overhead that isn't worth paying unless the pain of using traditional databases is too high. You say that as if everybody is born with knowlage of SQL. I would of course teach SQL to every new programmer still but im just point out that is not the best argument.
- bbcbasic 12y agoSupport for tooling, ease of hiring both programmers who are familiar with querying and DBAs is much better on relational. The pain caused by relational being a 'bad fit' needs to be pretty high to consider NoSQL in my opinion. Except for hobby projects (I did some CouchDB stuff in my spare time for the thrill, but MySQL would have been adequate.) True, noone is born with SQL knowledge (learning to breath is the first priority). However stick your ad up for an experienced Cassandra DBA and then an experienced Oracle DBA and see how you do.
- threeseed 12y agoDon't listen to anyone who blindly suggests one direction. Would you listen to someone who said "use C++ for everything" ? No. Because it's dumb advice. Use the right tool for the right job. If you're an application developer you need to invest the time to try some of these databases. In every startup and enterprise I've worked at in the last 10 years it has been application developers who chose the database. You can cover your bases by trying out a few: PostgreSQL, Cassandra, MongoDB, Couchbase. Sites like MongoHQ, Cloudant, Amazon RDS can spin up a database for a few dollars and give you an opportunity to try building a simple application.
- gfodor 12y agoIts pretty funny how right above this comment in the thread suggests the exact opposite. I think "use the right tool for the job" is a notoriously misleading phrase. What does "right" mean, and what is "the job?" If you are at the point where certain databases simply won't work, then of course there's a way to measure this, but most of us are not in this situation. There is operational and mental overhead for each data store you choose. If you end up running half a dozen data stores because for some esoteric reason they didn't feel quite "right" for each individual problem, you're going to have a much different system if you compromised on having a "suboptimal" general purpose data store that could be re-used for several of them. There are all sorts of negative downstream effects of introducing a new data store, which can bleed all the way up to the higher level organizational structure. When you consider the fact that deciding something is the "best" tool is often an exercise in prediction, it's pretty clear that it's easy to get wrong so a strong argument can be made you should lean towards one general purpose data store for most projects until incidental complexity from 'impedence mismatch' or performance needs dictate a change. If I had to choose, I'd say you should have a RDBMS and a persistent durable log. (Like Kafka.) There is something fundamental about representing your data as tables and events (one is just a projection of the other.) From there, a document store, k-v store, graph, fancy distributed sharded system, etc, are essentially optimizations or 'sugar' over the same data and so YMMV as to when to introduce them.
- threeseed 12y agoI just don't think you understand the expression. "Right tool for the right job" means from the perspective of the person choosing the tool. There is no "right" answer. And saying "use PostgreSQL for everything" is no different to saying "use C++ for everything". It's dumb and sloppy. Choosing a database is an important decision. Just like choosing an application stack. People should be encouraged to spike different approaches before going down a path that we both agree will be difficult to unwind from. And I agree that tables/events are somewhat fundamental. But they aren't exclusive to RDBMS systems. I have built CQRS systems using Cassandra many times before.