views:

132

answers:

2

I have read a lot of the MongoDB.

I like all the features it provides, but I wonder if it's possible to have it as the only database for my application, including storing sensitive information.

I know that it compromises the durability part in ACID but I will as a solution have 1 master and 2 slaves in different locations.

If I do that, is it possible to use it as the the primary database, storing everything?

UPDATE:

Lets put it this way.

I really need a document storage rather than traditional dbms for be able to create my flexible application. But is MongoDB reliable enough to store customer sensitive information if I have multiple database replications and master-slave? Cause as far as I know one major downside is that it compromises the D in ACID. So I solve it with multiple databases.

Now there is not major problems such as lost of data issues?

And someone told me that with MongoDB a customer could be billed twice. Could someone enlighten this?

+2  A: 

Is it possible? Sure. Why not? It's possible to store everything as XML in text files if you wanted to.

Is it the best idea? It depends on what you're trying to do, the rest of your system architecture, the scale your site is intended to achieve, and so on.

Mark Snidovich
Read my update.
never_had_a_name
+3  A: 

Yes, MongoDB can work as an application's only data store. Use replication and make sure you know about safe writes and w.

And someone told me that with MongoDB a customer could be billed twice. Could someone enlighten this?

I'm guessing whoever told you that was talking about eventual consistency. Some NoSQL databases are eventually consistent, meaning that you could have conflicting writes. MongoDB is not, though, it is strongly consistent (just like a relational database).

kristina
I have a hard time understanding safe writes. What is the difference between fsync() and getLastError()?
never_had_a_name
safe writes return whether the write succeeded (the db was up, you didn't try to insert a non-unique value into a unique field, etc.). fsync actually makes sure that change is written to disk, not just present in memory. See http://nosql.mypopescu.com/post/1052759609/mongodb-safe-and-fsync-explained.
kristina