title: Implementing warehousing system using rethinkdb: are there any strictly ACID requirements I need?
body: <h1>Situation</h1>
  
  <p>I am trying to implement a warehouse system using a traditional database.</p>
  
  <p>The tables are :</p>
  
  <ol>
  <li>products (each row representing 1 sku)</li>
  <li>warehouse_locations ( each row represents a particular shelf in a particular warehouse)</li>
  <li>pallets (each row represents a particular pallet)</li>
  <li>user_defined_categories (each row represents a particular user defined category: e.g. reserved, available, total_physical, etc)</li>
  <li>products_in_pallets_by_categories (each row will have foreign keys of the pallets, products, and user_defined_categories table. will specify quantity of products in a particular pallet of a particular category.)</li>
  <li>products_in_warehouse_locations_by_categories (each row will have foreign keys of the warehouse_locations, products table, and user_defined_categories. will specify quantity of products in a particular pallet of a particular category.)</li>
  </ol>
  
  <h1>What end users want to see/do</h1>
  
  <p>End users will update the system about what products are placed/removed on what pallet.</p>
  
  <p>End users will also want to know any time (preferably in real-time) how many reserved or available products are in the warehouse.</p>
  
  <h1>So what's my initial plan?</h1>
  
  <p>Wanted to use a traditional RDBMS like PostgresQL and a message queue like RabbitMQ to provide real-time updates. By real-time updates, I mean the end users using either a single page application or mobile phone can observe changes in inventory in real-time.</p>
  
  <h1>So what's changed?</h1>
  
  <p><a href="https://rethinkdb.com/faq/" rel="nofollow">I came across rethinkdb FAQ</a> and it said </p>
  
  <blockquote>
    <p>RethinkDB is not a good choice if you need full ACID support or strong
    schema enforcement—in this case you are better off using a relational
    database such as MySQL or PostgreSQL.</p>
  </blockquote>
  
  <h1>Why you even considering rethinkdb?</h1>
  
  <p>Because if I can use it and it allows real-time updates, it will help tremendously as we expect the client's sales team placing reservations around the world on our system.</p>
  
  <h1>What's the most frequent updates/inserts?</h1>
  
  <p>The movement of the products from one place to another. I expect plenty of updates/inserts/deletes to the relation tables. Occasionally, I apologise I do not know how to explain this in the rethinkdb paradigm. I am a traditional RDBMS person.</p>
  
  <h1>Is the system built yet?</h1>
  
  <p>Not yet. Which is why I want to seek an answer regarding rethinkdb before actually proceeding.</p>
  
  <h1>Do you expect to use any transactions?</h1>
  
  <p>Well, I am not sure. </p>
  
  <p>I can think of a real world case where a warehouse worker moves products (partially or completely) from one pallet to another pallet.</p>
  
  <p>Another real world case will be where a warehouse worker moves the products from a pallet to a warehouse_location (or vice-versa). </p>
  
  <p>Do I definitely need to use transactions? Again, I am not sure.</p>
  
  <p>Cause I expect the workers to update the system AFTER they have physically finished the moving.</p>
  
  <p>I will provide a screen for them to choose </p>
  
  <ul>
  <li>move from <code>&lt;some dropdown&gt;</code> to <code>&lt;another dropdown&gt;</code></li>
  </ul>
  
  <h1>So what's the question?</h1>
  
  <p>Do I need to have full ACID support or strong schema enforcement for my warehouse system based on my user requirements at the moment? And is it implementable using rethinkdb?</p>
  
  <p>I also expect to implement a<a href="http://activitystrea.ms" rel="nofollow">ctivity streams</a> once the system is implemented which will show events such as Worker A moved 100 units of product A from warehouse shelf 1A to pallet 25.</p>