Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in SQL by (6.1k points)
closed by

I searched it in documents of sqlalchemy but I did not find anything. 

So is it possible to use mongodb with sqlalchemy? 

closed

4 Answers

0 votes
by (13k points)
 
Best answer

No, SQLAlchemy is primarily designed for relational databases and does not provide native support for MongoDB. MongoDB has its own dedicated libraries such as PyMongo and MongoEngine, which offer direct integration with MongoDB and provide a more suitable approach for working with the database.

0 votes
by (11.7k points)
edited by

According to sqlalchemy's description, you can use it.

Database is considered to be a relational algebra engine in SQLalchemy, not just a collection of tables. We can select rows from not only tables but also joins and other select statements; we can make a larger structure by composing these units. SQLAlchemy's expression language builds on this concept from its core.

SQLAlchemy is very prominent for its object-relational mapper, it is an optional component that provides the data mapper pattern, where we can map classes to the database in open-ended, multiple ways - allowing the object model and database schema to develop in a cleanly decoupled way from the beginning.

If you want to learn MongoDB, check out this MongoDB tutorial from Intellipaat.

Enroll in our Online SQL Certification to learn the basic concepts of Microsoft SQL Server!

0 votes
by (7.8k points)
No, SQLAlchemy is primarily designed for relational databases and follows the SQL (Structured Query Language) paradigm.

MongoDB is a NoSQL database that uses a different data model and query language than traditional SQL-based databases.

While SQLAlchemy does not provide native support for MongoDB, there are other libraries and frameworks specifically designed for working with MongoDB, such as PyMongo and MongoEngine.

These libraries offer direct integration with MongoDB and provide a more suitable and optimized approach for interacting with the database.

Therefore, if you want to work with MongoDB, it is recommended to use dedicated MongoDB libraries rather than trying to force its usage with SQLAlchemy.
0 votes
by (11.4k points)
No, use dedicated MongoDB libraries like PyMongo or MongoEngine instead of SQLAlchemy.

Related questions

0 votes
1 answer
0 votes
1 answer
asked Feb 16, 2021 in SQL by rahulnayar01123 (6.1k points)
0 votes
4 answers
asked Feb 26, 2021 in SQL by rahulnayar01123 (6.1k points)
0 votes
1 answer

Browse Categories

...