r/SQL • u/kgOntologist • Sep 11 '26
Discussion SQL or NoSQL Databases for AI Applications?
/r/AI_Agents/comments/1wdd1ha/sql_or_nosql_databases_for_ai_applications/Hello,
What types of databases do you use for your AI applications to store things like generated responses, messages, conversation history, user data, etc.?
Do you generally use SQL databases (such as PostgreSQL) or NoSQL databases (such as MongoDB)? What are the main reasons behind your choice?
And which database(s) would you recommend for a production AI application, and why?
Thanks in advance for your feedback and experience!
0
Upvotes
2
u/theungod Sep 11 '26
You use vector db
4
u/Thadrea Data Science Manager Sep 11 '26
Why not ask the chatbot which database it prefers?
3
u/BaseballHopeful6366 Sep 11 '26
noSQL is just SQL dialect which is less standard than SQL. there are different purposes for different DB solutions. that all to it.
1
u/Legitimate_Willow905 Sep 14 '26
stick to a standard sql db for 90% of ai apps. it's tempting to grab mongo for chat logs, but you still need relational tables for users, auth, and billing anyway.
the biggest trap early on is stack sprawl (like pg for auth, mongo for logs, pinecone for vectors). you really don't need three databases. mariadb 11.8+ actually added native vector search right into the core engine alongside json. lets you keep users, chat history, and rag embeddings in one box.
3
u/Ven0mspawn Sep 11 '26
Ask your AI, since you're happy with slop.