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.
Related
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...
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.
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 have a strange feeling when it comes about code first migration technology. First of all this is a concept which got its origins in technologies as Ruby on Rails. Not that I do have something against it, please do not get me wrong. What I am not sure about is that if the usage of Code First Migration is a good approach when it comes to high scalable enterprise applications which can include reporting, etc. Basically I am referring at situations where the database design, optimization plays a critical part in the general performance (denormalization, indexing, sharding, etc). My feeling is that Code First Migration brings a major overhead. Am I right, am I wrong? I would really like to hear your opinions.
You're wrong.
EF Migrations has nothing to do with the way your database is designed. It is only a one-time process that merely generates scripts against two versions of the database schema and figures out how to migrate from one to other automatically.
Migrations does not run when the app runs, it doesn't have any overhead or affect performance of the app. It only works with the existing schemas as EF itself generates them. In fact, this process is so generic, it isn't even specific to EF, Migrations can be used to migrate between any two schemas, whether they use EF or not.
As such, it has nothing to do with how the database performs.
The schema is controlled by EF itself, and is dependent upon how you map the database. Yes, it's true that if you just let EF do all the work you might end up with a less than optimal schema, but you can fully control how it generates this by using Fluent Mappings.
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.
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 11 years ago.
In 5 days I'm going to ETL interview. It's my first interview on this subject. What question would I be asked? Most likely they will be about MS SQL Server Integration Service.
If possible, provide the answers. =)
If possible, provide the answers. =)
Keep it high-level if you have to, but don't ask a question that couldn't answer yourself.
I agree with Brad that syntax is not important, it's the thought process.
Another idea is to ask them about how they would pack up and move an office. It gives you insight into the same kinds of decisions needed in ETL (prep, actual moving of stuff, and validation), and you might be more comfortable talking about that than the details of SSIS
Think practically. Hand them a printout of a sample file that might need to be imported (possibly simplified to save time). Have them talk about database design, considerations, concerns, possible ways to improve the data. Then bring out a second printout of somehow related and see if they can figure how to validate the one from the other.
Make sure you talk about how much time is available to perform the ETL processes based on business rules and environment.
Require as much pseudo-code as you like, but I personally subscribe to the idea that syntax can be taught cheaply, but learning how to think is a very expensive thing to teach someone; and sometimes it's not even successful.
Also, ask them what standards they would implement if they were to design the optimum layout of the source data. Make sure you consider data distribution beyond your company (if applicable).