<p>No and in a sense yes.</p>

<p>No - this question is strongly reminiscent of those about SQL and the conclusion that it isn't (Turing complete). Despite its many capabilities, Redis does not provide looping or recursion for via native API, so that pretty much nails it.</p>

<p>However, you can <strong>easily</strong> run Lua scripts in Redis and Lua is in fact Turing complete, so in a sense so is Redis (similarly to how SQL becomes so once you allow the use of PL/SQL or the likes).</p>

CC BY-SA 3.0
2015-07-06T21:06:29.707Z
2015-07-06T21:06:29.707Z
Itamar Haber
<p>Is <a href="http://redis.io/" rel="nofollow">Redis</a> with all its <a href="http://redis.io/topics/data-types" rel="nofollow">data types</a> (<strong>Strings</strong>, <strong>Lists</strong>, <strong>Hashes</strong>, <strong>Sets</strong>, <strong>Sorted Sets</strong>, etc.) Turing Complete?</p>

CC BY-SA 3.0
2015-07-06T15:29:51.930Z
I don't know.  What efforts have *you* made?  As our [help] says, "u should only post questions you're actually seriously thinking about.  Try to make your question interesting for others by providing some background knowledge. Remember, questions should be based on knowledge sharing, not on shirking."  Please provide all relevant context in the question, so that people who aren't intimately familiar with Redis have a chance of answering it.  Can you provide a list of all operations Redis supports on those data types?  What are your thoughts / efforts to answer your own question?
D.W.
CC BY-SA 4.0
2024-02-06T20:38:20.683Z
SQL is Turing complete since the 1999 version of the standard that admits transitive closure...
SQLpro
<turing-machines>
Is Redis Turing Complete?
Bharat Khatri
# Is Redis Turing Complete?

(Asked by: username_0 on 2015-07-06)

Is [Redis](http://redis.io/) with all its [data types](http://redis.io/topics/data-types) (**Strings**, **Lists**, **Hashes**, **Sets**, **Sorted Sets**, etc.) Turing Complete?

**Tags:** turing-machines
> **Comments:**
> **username_1**: I don't know.  What efforts have *you* made?  As our [help] says, "u should only post questions you're actually seriously thinking about.  Try to make your question interesting for others by providing some background knowledge. Remember, questions should be based on knowledge sharing, not on shirking."  Please provide all relevant context in the question, so that people who aren't intimately familiar with Redis have a chance of answering it.  Can you provide a list of all operations Redis supports on those data types?  What are your thoughts / efforts to answer your own question?  
> **username_2**: SQL is Turing complete since the 1999 version of the standard that admits transitive closure...  

---

## 1 answers

### Answer by username_3 on 2015-07-06. Score: 3

No and in a sense yes.

No - this question is strongly reminiscent of those about SQL and the conclusion that it isn't (Turing complete). Despite its many capabilities, Redis does not provide looping or recursion for via native API, so that pretty much nails it.

However, you can **easily** run Lua scripts in Redis and Lua is in fact Turing complete, so in a sense so is Redis (similarly to how SQL becomes so once you allow the use of PL/SQL or the likes).


---

