Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

Is it possible to use a non relational database be in an Order management system for an e-commerce company with a large number of orders everyday, like Amazon? Can the benefits of Non Relational databases (scalability, reliability etc) be exploited in this scenario, or, is it impossible to give up ACID properties and hence mandate that only a relational DB be used for this purpose?

share|improve this question
3  
Talk to your auditors, I'll bet that they will not like you using a nontransactional system. –  HLGEM Mar 16 '12 at 19:28
    
I have rephrased my question to remove possible ambiguities. –  aml90 Mar 16 '12 at 19:32
add comment

4 Answers

up vote 4 down vote accepted

It's certainly possible. Whether it is a good idea or not is another matter.

I personally wouldn't use nosql in the use case you described for two major reasons:

  1. Interoperability - chances are your order system will have to interface with multiple back end systems all written around the relational database model. Mapping back from nosql to relational will be extra work and can introduce bugs.

  2. reporting - reporting is a big feature of an ordering platform. You will regularly need to pull reports based on the ordering data to fine-tune the sales process. Reporting is much harder to do well in a nosql database.

share|improve this answer
2  
1. That shouldn't have to matter. If there's an application-level API to provide integration points, you'll never come into contact with the backend DBs. 2. You can have a separate DB for reporting, which can be fed by a periodical proces (or even in real-time if you work with something like eventing/messaging). That way, your report generator has data in a form closer to the way it operates, without soiling the DB of the main application. –  Stefan Billiet Jan 3 at 10:56
add comment

I don't think anyone's ordering has outgrown most RDBMS ability to scale. The data are structured, so there is no benefit to NoSQL there. Unlike a Facebook or Twitter post, millions of people don't need to see every step of your transaction in real time.

I think a NoSQL database may be an advantage in a bidding/auction situation, but trasnfer to SQL when you process the bill. I'd like to think my bank is a little more rigid in processing my checking account than my chats with support.

share|improve this answer
3  
+1. If you have a stream of orders such that e.g. an Oracle cluster can't cope with it, please tell us which of the Fortune 100 companies you are :) –  9000 Mar 16 '12 at 20:56
add comment

It sounds like you're asking whether a NoSQL database can feature ACID. For that, we'll look at the CAP theorem, which states that a distributed system can provide at most two of the following three properties:

  1. Consistency
  2. Availability
  3. Partition Tolerance

If you have a system that is geographically distributed, like Amazon's Dynamo, then the communication latency between partitions already means you have #3 above. Therefore, you must choose between consistency and availability.

For an eCommerce company, an unavailable website leads to lost revenue and irritated customers. So many dot-coms instead aim for "eventual consistency". Therefore, they give-up ACID.

share|improve this answer
    
What I was thinking was eventual consistency is okay in case of non critical data, like say your tweets on Twitter. But, in case of a system like Amazon, where payments are involved, can they afford to have eventual consistency? If not, isn't it mandatory to have a relational ACID database? My question is motivated by the fact that Amazon does a lot of work in the are of NoSQL databases which may be useless in certain areas of their business like order management. –  aml90 Mar 16 '12 at 19:25
1  
@amalantony Eventual consistency doesn't preclude writing to the disk. It just means that one part of the system may have a different value from another part of the system. Atomic local storage is still allowed. I think you're confusing eventual consistency with storing everything in memory; many NoSQL databases feature both properties, but the two are not the same. –  chrisaycock Mar 16 '12 at 19:31
add comment

Can NoSQL databases be used in e-commerce companies for order management?

YES

You can always normalizes it once it gets to your order processing systems.

You need to optimize your e-commerce site for performance (if noSql is your way to do that, so be it). Then you can push/pull all you order data in to your order into Order processing/accounting systems normalizing it at at that time. All your financials and other reporting will be based off your accounting systems, NOT the eCommerce site.

share|improve this answer
4  
Seems like a lot of work when you could just use a relational database to start with. –  Robert Harvey Mar 16 '12 at 20:43
1  
The question was if it can be done.. And it can without sacrificing. –  Morons Mar 16 '12 at 21:47
    
I would also like to point out that some level of data manipulation is going to be needed when moving data from the ecommerce site to the orderprocesssing systems regardless of the db used on either system. –  Morons Mar 16 '12 at 21:49
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.