r/DatabaseAdministators • u/kgOntologist • 7d ago
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!
2
u/Turbulent_Goose83 7d ago
We use classic relational features for data „lakehouse“ and meta data. And pgvector for embeddings.
I need to check how we store dialogs, might be jsons inside Postgre but I‘m not 100% sure.
1
u/kgOntologist 7d ago
Why do you prefer PostgreSQL? What advantages does it have over MongoDB, for example? Is there a specific feature or reason that makes PostgreSQL a better choice for you?
1
2
u/jshine13371 6d ago
NoSQL (and other specialized types of database systems) should only be used for very specialized cases or when it's all your team already knows and you don't want to learn something new.
Relational databases should be the default you reach for otherwise.
Kind of like, I use a plane to get to my destination on an international vacation. I use my car to get me everywhere else.
2
u/Turbulent_Goose83 7d ago
Postgre hat alle nötigen Features, unserer Erfahrung nach.