NoSQL Database for ECommerce

14,231

Solution 1

Since e-commerce can encompass everything from shopping carts through to membership and recurring subscriptions, it is hard to guess exactly what requirements and complexity you are envisioning.

When constructing an e-commerce site, one of the early considerations should be investigating whether there is already an established e-commerce product or toolkit that could meet your requirements. There are many subtleties to processes like ordering, invoicing, payments, products, and customer relationships even when your use case appears to be straightforward. It may also be possible to separate your application into the catalog management aspects (possibly more custom) versus the billing (potentially third party, perhaps even via a hosted billing/payment API).

Another consideration should be who you are developing the e-commerce site for: is this to scratch your own itch, or for a client? Time, budget, and features for a custom build can be difficult to estimate and schedule .. and a niche choice of technology may make it difficult to find/hire additional development expertise.

A third consideration is what your language(s) of choice are for developing your application. Some languages will have more complete/mature/documented drivers and/or framework abstractions for the different databases.

That said, writing an e-commerce system appears to be a rite of passage for many developers ;-).

Edit: a lot has changed since this answer was originally posted in 2012 and you should definitely refer to current product information. For example, MongoDB has had support for Decimal128 values since MongoDB 3.4 (2016) and multi-document transactions since MongoDB 3.6 (2017).

Solution 2

Check the comparison of different available NoSql databases here. Suit your requirement as per that.

Share:
14,231

Related videos on Youtube

skift
Author by

skift

I am a Backend Software Engineer specializing in building RESTful web services. I have a very high value on creating readable, maintainable code to help ensure others are able to make changes as required. Teamwork, communication, and respect are also important to having a strong working environment. I deploy micro-services using Docker, making scaling your applications much easier and allowing for much faster testing and deployment. I know technologies such as php, python, javascript, bootstrap, aws, html5, css, linux, osx, windows, jira and more. I have worked in high demand and fast paced teams, from agile/scrum, to traditional software release development. Working with small to medium sized teams. I believe working with a great team, can foster both competition, and better development for the company in general. Team building exercises can be very effective when used properly. And working with a great team can significantly improve overall performance alone.

Updated on June 04, 2022

Comments

  • skift
    skift about 2 years

    I will be constructing an ecommerce site, and would like to use a no-sql database, which will fit well with the plans for the app. But when it comes to which database would fit the job, im not sure. After comparing various DB's, the ones that seem best might be either mongo, couch, or even orientdb. I have seen arguments for all of them to be used or not used compared to something like MySQL. But between themselves (nosql databases), which one would fit well with an ecommerce solution?

    Note, for the use case, i wont be having thousands of transactions a second. Or similarly high write rates. they will be moderate sure, but at a level that any established database could handle.

    CouchDB: Has master to master replication, which I could really use. If not, I will still have to implement the same functionality in code anyways. I need to be able to have a users database, sync with the mothership. (users will have their own, potentially localhost database, that could sync with the main domains server). Couch is also fast, once your queries have been stored in the db.As i will probably have a higher need for read performance. Though not by a lot.

    MongoDB: queries are very easy and user friendly. Also, with the fact that end users may need to query for certain things at a given time that I may not be able to account for ahead of time, this seems like it may be a better fit. I dont have to pre-store my queries in the db. Does support atomic transactions, though only when writing to a single document at a time.

    OrientDB: A graph database. much different that most people are used to, but with the needs, it could fit very well too. Orient has the benefits of being schemaless, as well as having support for ACID transactions. There is a lot of customer, and product relationships that a graph database could be great with. Orient also support master to master replication, similar to couchdb.

    Dont get me wrong, I can see how to build this traditionally with something like MySQL, but the ease and simplicity of a nosql solution, is very attractive. Although, in my case, needing a schemaless solution, would be much easier in nosql rather than mysql. a given product may have more or less items, than another. and avoiding recreating a table whenever a new field is added, is preferrable.

    So between these 3 (or even others you think may be better), what features in each could potentially work for, or against me in regards to an ecommerce based site, when dealing with customer transactions?

    Edit: The reason I am not using an existing solution, is because with the integrated features I need, there are no solutions available out there. We are also aiming to use this as a full product for our company. There will be a handful of other integrations than just sales. It is also going to be working with a store's POS system.

    • Maxim Krizhanovsky
      Maxim Krizhanovsky
      There is an open-source e-commerce platform that uses MongoDB. Check it out: getfwd.com
  • skift
    skift almost 12 years
    There will be memberships, but it will be simple and not the main focus of the product. The main service this will be used as, is an in store POS, and a product catalog. Yes there are solutions out there, but many of the mare bulky and cumbersome. They also dont have options for the other features we need. Not to mention, we are trying to create this based on a startup, as a product/service to sell, along with using it as our own system in our store. Also, yea, each component of the application will be separated out into multiple plugins. Allowing for portability.
  • skift
    skift almost 12 years
    This will be its own product and service that we plan to have available for anyone to consume.It will also be used for a real storefront, and related business until then, that a friend own.The product is an idea from both of us to create as a startup.So far, the system will be written in python,as a desktop client will also eventually need to be done (in store POS).The master:master replication is simply a feature I would like to have for stores to sync their data online, if ever their local system fails.They should also be able to use the system from online, when not in store in other places.
  • capr
    capr over 2 years
    "Master-Master replication (MVCC)" -- wut?
  • Stennie
    Stennie over 2 years
    @capr Good catch! I believe past me was trying to associate MVCC as a requirement for multi-master replication since MongoDB's original MMAP storage engine was definitely not MVCC. However, my mention was very out of context in the original answer :blush:. A lot has changed in the past 9+ years across all of the mentioned products so I removed some outdated references. WiredTiger, MongoDB's default storage engine since 3.2 (2015), uses MVCC but multi-master replication would be a feature implemented at the replication layer (above storage).