Why don't you just create an ID yourself? <<<---- Have you even taken the bother of reading 2 lines besides the subject ? Please do and you will easily find out by yourself.

If using a database were that easy ... what's the point of adding such a thing like a hash table ?

Here the thing is about accessing the same data though an ID, it is as simple as returning an ID when adding a key to the table and being able to access that ID later. 10 lines of code. That's it.