What is the difference between sqlite3 and sqlalchemy?

前端 未结 2 641
-上瘾入骨i
-上瘾入骨i 2021-02-03 22:26

Beginner question- what is the difference between sqlite and sqlalchemy?

2条回答
  •  醉梦人生
    2021-02-03 22:45

    They're apples and oranges.

    Sqlite is a database storage engine, which can be better compared with things such as MySQL, PostgreSQL, Oracle, MSSQL, etc. It is used to store and retrieve structured data from files.

    SQLAlchemy is a Python library that provides an object relational mapper (ORM). It does what it suggests: it maps your databases (tables, etc.) to Python objects, so that you can more easily and natively interact with them. SQLAlchemy can be used with sqlite, MySQL, PostgreSQL, etc.

    So, an ORM provides a set of tools that let you interact with your database models consistently across database engines.

提交回复
热议问题