Skip to Content
Essential SQLAlchemy, 2nd Edition
book

Essential SQLAlchemy, 2nd Edition

by Jason Myers, Rick Copeland
May 2025
Intermediate to advanced
208 pages
2h 55m
Japanese
O'Reilly Media, Inc.
Content preview from Essential SQLAlchemy, 2nd Edition

序文

この作品はAIを使って翻訳されている。ご意見、ご感想をお待ちしている:translation-feedback@oreilly.com

私たちはいたるところでデータに囲まれており、そのデータをストア、更新、レポートする能力は、あなたが構築するすべてのアプリケーションにとって重要である。ウェブ、デスクトップ、その他のアプリケーションのいずれを開発するにしても、データへの高速かつセキュアなアクセスが必要だ。リレーショナル・データベースは、そのデータを格納する最も一般的な場所のひとつである。

SQLはデータベース内のデータをクエリしたり操作したりするための強力な言語だが、アプリケーションの他の部分と統合するのが難しい場合もある。文字列操作を使ってODBCインタフェース上で実行するクエリを生成したり、PythonプログラマとしてDB APIを使ったことがあるかもしれない。これらはデータを扱う効果的な方法ではあるが、セキュリティやデータベースの変更を非常に困難にする可能性がある。

本書は、リレーショナルデータベースと伝統的なプログラミングのギャップを埋める、SQLAlchemyという非常にパワフルで柔軟なPythonライブラリについての本である。SQLAlchemyは、クエリを実行するために生のSQLに "ドロップダウン "することができる一方で、データベースのクエリや更新に対してより "Python的 "でフレンドリーなアプローチを通して、より高いレベルの思考を促す。SQLAlchemyは、アプリケーションのクラスやオブジェクトをデータベースのテーブルにマッピングするためのツールを提供する。

SQLAlchemy はパワフルで柔軟だが、少し難しいかもしれない。SQLAlchemyのチュートリアルは、この優れたライブラリで利用可能なことのほんの一部しか公開していないし、オンラインドキュメントは充実しているが、ライブラリを初期学習する方法としてよりも、リファレンスとして利用する方がよいことが多い。本書は、学習ツールとして、また、"実装モード "に入っていて、すぐに答えが必要なときのための便利なリファレンスとして使われる。

本書は SQLAlchemy の 1.0 リリースに焦点をあてているが、これから取り上げる内容の多くは、それ以前のバージョンでも利用可能である。確かに 0.8 からはちょっとした調整で動くし、0.5 からも大部分は動く。

本書は大きく3つのパートに分かれている:SQLAlchemy Core、SQLAlchemy ORM、そして Alembic のセクションである。最初の 2 つのパートは、可能な限りお互いを反映させることを意図している。 SQLAlchemy を使う 2 つの主な方法を比較対照できるように、それぞれのパートで同じ例を実行するように配慮した。また、この本は、SQLAlchemy Core と ORM の両方のパートを読んでもよいし、今のあなたのニーズに合った方だけを読んでもよいように書かれている。

この本は誰のためにあるのか?

本書は、Python プログラムでリレーショナルデータベースを使う方法についてもっと学びたい、あるいは SQLAlchemy について聞いたことがあり、それについてもっと情報が欲しいという人を対象としている。この本を最大限に活用するために、読者は Python の中級のスキルがあり、SQL データベースに中程度以上触れている必要がある。 私たちは、この本が利用しやすいものになるよう努力したが、もしあなたが ...

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

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Essential SQLAlchemy, 2nd Edition

Essential SQLAlchemy, 2nd Edition

Jason Myers, Rick Copeland
High Performance Python, 3rd Edition

High Performance Python, 3rd Edition

Micha Gorelick, Ian Ozsvald
Python in a Nutshell, 4th Edition

Python in a Nutshell, 4th Edition

Alex Martelli, Anna Martelli Ravenscroft, Steve Holden, Paul McGuire

Publisher Resources

ISBN: 9798341649866