Preface
If you’re an application programmer, you’ve probably run into a relational database at some point in your professional career. Whether you’re writing enterprise client-server applications or building the next killer Web 2.0 application, you need someplace to put the persistent data for your application. Relational databases, accessed via SQL, are some of the most common places to put that data.
SQL is a powerful language for querying and manipulating data in a database, but sometimes it’s tough to integrate it with the rest of your application. You may have used some language that tries to merge SQL syntax into your application’s programming language, such as Oracle’s Pro*C/C++ precompiler, or you may have used string manipulation to generate queries to run over an ODBC interface. If you’re a Python programmer, you may have used a DB-API module. But there is a better way.
This book is about a very powerful and flexible Python library named SQLAlchemy that bridges the gap between relational databases and traditional object-oriented programming. While SQLAlchemy allows you to “drop down” into raw SQL to execute your queries, it encourages higher-level thinking through a “pythonic” approach to database queries and updates. It supplies the tools that let you map your application’s classes and objects onto database tables once and then to “forget about it,” or to return to your model again and again to fine-tune performance.
SQLAlchemy is powerful and flexible, but it can also be ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access