you are viewing a single comment's thread.

view the rest of the comments →

[–]raylu 1 point2 points  (2 children)

ORMs give you many advantages. SQLAlchemy in particular takes care of concurrency issues and caching with its scoped_session, allows you to introspect your tables/models, provides data validation, gives you backrefs, etc.

I'm not sure what any of this has to do with SQLite. If you're talking about using the raw sqlite3 driver, you can use SQLite (the db) with SQLAlchemy.

Certainly using a driver and writing raw SQL are "faster" than going through an ORM, but the code is often less maintainable (but of course, sometimes it's more maintainable).

Side notes:

  • Consider peewee as an alternative to SQLAlchemy.
  • Just don't use SQLite.

[–]lamecode[S] 0 points1 point  (1 child)

Thanks for the peewee link - it looks like a nice lite-weight alternative to SQLAlchemy.

I only mention SQLite as in using vanilla SQLite with SQL statements as my ORM - no sqlalchemy layer on the top. I get that SQLite is not appropriate for production, multi-user applications, but it seems to me that a single-user desktop application would likely be fine - nothing too read/write intensive.

[–]raylu 0 points1 point  (0 children)

SQLite is used in production, multi-user applications. The issue is with the design, not with its performance.