Concept Flow - SET and GET commands
Start
SET key value
Store value in key
GET key
Retrieve value
Output value
End
The flow shows storing a value with SET, then retrieving it with GET, and finally outputting the stored value.
SET name "Alice"
GET name| Step | Command | Action | Key | Value Stored | Output |
|---|---|---|---|---|---|
| 1 | SET name "Alice" | Store value | name | "Alice" | OK |
| 2 | GET name | Retrieve value | name | "Alice" | "Alice" |
| 3 | GET age | Retrieve value | age | null | (nil) |
| Variable | Start | After Step 1 | After Step 2 | After Step 3 |
|---|---|---|---|---|
| name | null | "Alice" | "Alice" | "Alice" |
| age | null | null | null | null |
SET key value - stores a value under a key GET key - retrieves the value stored If key does not exist, GET returns (nil) SET returns OK on success GET returns the stored value as a string