I am following an article here and I think I want to go to hash route but I am confused as to what if I have multiple taxi_car
<?php
$redis->hset("taxi_car", "brand", "Toyota");
$redis->hset("taxi_car", "model", "Yaris");
$redis->hset("taxi_car", "license number", "RO-01-PHP");
$redis->hset("taxi_car", "year of fabrication", 2010);
$redis->hset("taxi_car", "nr_starts", 0);
/*
$redis->hmset("taxi_car", array(
"brand" => "Toyota",
"model" => "Yaris",
"license number" => "RO-01-PHP",
"year of fabrication" => 2010,
"nr_stats" => 0)
);
*/
echo "License number: " .
$redis->hget("taxi_car", "license number") . "<br>";
// remove license number
$redis->hdel("taxi_car", "license number");
// increment number of starts
$redis->hincrby("taxi_car", "nr_starts", 1);
$taxi_car = $redis->hgetall("taxi_car");
echo "All info about taxi car";
echo "<pre>";
var_dump($taxi_car);
echo "</pre>";
how would I create a database that has all the data about taxi_cars in redis. Now I know there is no database but keys in redis, but I am using the relational lingo here to express myself. If I have 1000 taxi_cars I do not want to have 1000 initial keys. It has to be subset of something. I am not sure how to even explain this.
EDIT
so lets say that under brand I have Toyota, Honda, Suzuki and then under those I have different styles like Tacoma, Accord etc
how would I go on inserting that data and leter on retrieving it. thanks