Basically, you have 3 options.
QtSql is a separate module in Qt for working with SQL databases.
Pros:
- Qt integration could be easier
Minuses:
- Hard to learn
- Made for C ++, some redundant code required
- Need to add another Qt module to your project
- The documentation looks bad.
This module in the Python standard library works with SQLite databases.
Pros:
- Very easy to use
- The code is pretty short
- No external dependencies
Minuses:
- You need to write SQL queries
SQLAlchemy makes working with databases similar to working with regular classes.
Pros:
- Object Relational Mapper: provides an object-oriented interface and makes SQL queries for you
- As soon as you set up the table, working with databases will be pure joy.
Minuses:
Here is my conclusion:
If you are comfortable writing SQL queries and do not need to work much with databases, use sqlite3. And if you don't mind spending some time learning something amazing, go for SQLAlchemy.
Other projects you mentioned:
Elixir seems dead, and SQLAlchemy now has built-in functionality, perhaps better.
Camelot is just weird ... I would not use it.
source share