One of our training courses has a section covering MySQL's Memcached API, and how it works. In the discussion, there's a line that goes like this:
"A key is similar to a primary key in a table, and a value is similar to a second column in the same table"
For someone well versed in database tables but not so much in key-value stores, that sentence might take a bit of grasping. So, let's break it down.
An Example Key/Value Store
Imagine the table kvstore has a column key and a column value. Also imagine that we've set up the Memcached plugin in MySQL and configured it to use that table and those columns as its store. I won't get into that bit for now, but trust me, it's not that hard.
You might be familiar with statements like this:
REPLACE INTO kvstore (key, value) VALUES ('X', 'Y');
SELECT value FROM kvstore WHERE key='X';
Now imagine you want to be …[Read more]