Primary Key and Range Key

Let’s learn about the primary key and range key in detail.

Need for primary key

Have you ever worked with a hash map? A hash map is a key-value store. Now, we do not need to know a lot about the internal workings of hash maps. But the contract it offers is simple:

  • get(Key): returns the value for a given Key.
  • put(Key, Value): saves the value corresponding to the Key.

To work with a hash map or any key-value store, you need a set of keys. Keys are basically used to identify an individual item in the ...