I'm very new to noSQL and the first task is with redis. I have to create a key-value database witih a composite key but as I searched there is no such thing in Redis (or it is called differently). My sql DB would have 4 attributes: Name, Surname, weight, height. Where Name and Surname is a composite key.
I have tried to write simple key-value code in python:
client = redis.Redis(host='localhost', port=6379, db=0)
client.set('Name', 'Tom')
client.set('Surname', 'Spencer')
client.set('Weight(kg)', '65')
client.set('Height(cm)', '178')
print (client.get('Name'))
And I have no idea how to write to make Name ar Surname as a composite key to make it primary.
Also, would be cool if someone could give an example how to get Person_1, Person_2 and ect with all those details (name, surname, weight, height)
I have seen some examples with hash-maps and ect but im not allowed to use it in my program.