I do not have much experience with MYSQL CONNECTOR for Python. However, from what I know SQLAlchemy primarily uses ORM (Object-Relational Mapping) in order to abstract the details of handling the database. This can help avoid errors some times (and also introduce possibly introduce others). You might want to have a look at the ORM technique and see if it is for you (but don't use it as a way to avoid learning SQL). Generally, ORMs tend not to be as scalable as raw SQL either.
I am also a newbie. In my understanding SQLAlchemy is an ORM (Object-Relational Mapping) that allows you to abstract the database and query data from the DB more easily in your coding language treating query data as another object. Pros is that that you can more easily switch your DB under the hood. But it has some learning curve. Whereas MySQL Connector is "just" a plain simple direct connection to the DBMS at your database and you write SQL queries to get the data. For now I am sticking with the mysql connector to just train SQL queries more. But later on I will definitely test out SQLAlchemy.
2条答案
按热度按时间yebdmbv41#
I do not have much experience with MYSQL CONNECTOR for Python. However, from what I know SQLAlchemy primarily uses ORM (Object-Relational Mapping) in order to abstract the details of handling the database. This can help avoid errors some times (and also introduce possibly introduce others). You might want to have a look at the ORM technique and see if it is for you (but don't use it as a way to avoid learning SQL). Generally, ORMs tend not to be as scalable as raw SQL either.
hgtggwj02#
I am also a newbie. In my understanding SQLAlchemy is an ORM (Object-Relational Mapping) that allows you to abstract the database and query data from the DB more easily in your coding language treating query data as another object. Pros is that that you can more easily switch your DB under the hood. But it has some learning curve.
Whereas MySQL Connector is "just" a plain simple direct connection to the DBMS at your database and you write SQL queries to get the data.
For now I am sticking with the mysql connector to just train SQL queries more. But later on I will definitely test out SQLAlchemy.