title: How to convert an existing relational database to a key-value store?
body: <p>I am trying to map a existing relational database to a key value store. Couple of example tables are represented below.</p>
  
  <p><a href="https://i.stack.imgur.com/F2xL1.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/F2xL1.png" alt="Example tables in the RDBMS Databse"></a></p>
  
  <p>For an instance the above "Employee Details" table can be represented as follows in Redis (or any similiar key-value store)</p>
  
  <pre><code>set emp_details.first_name.01 "John"
  set emp_details.last_name.01 "Newman"
  set emp_details.address.01 "New York"
  
  set emp_details.first_name.02 "Michael"
  set emp_details.last_name.02 "Clarke"
  set emp_details.address.02 "Melbourne"
  
  set emp_details.first_name.03 "Steve"
  set emp_details.last_name.03 "Smith"
  set emp_details.address.03 "Los Angeles"
  </code></pre>
  
  <p>The "Payments" table also can be represented as above. But this method does not build the one-to-many relationship between the "Employee Details" table and the "Payments" table. Therefore, is there any better way of implementing a key-value store from an existing RDBMS. You can refer to these two tables and suggest a better key schema to store values. Thanks in advance.</p>