Essential SQLAlchemy
暫譯: 精要 SQLAlchemy

Rick Copeland

  • 出版商: O'Reilly
  • 出版日期: 2008-06-15
  • 定價: $1,180
  • 售價: 2.5$299
  • 語言: 英文
  • 頁數: 240
  • 裝訂: Paperback
  • ISBN: 0596516142
  • ISBN-13: 9780596516147
  • 相關分類: SQL
  • 立即出貨(限量) (庫存=5)

買這商品的人也買了...

商品描述

Essential SQLAlchemy introduces a high-level open-source code library that makes it easier for Python programmers to access relational databases such as Oracle, DB2, MySQL, PostgreSQL, and SQLite. SQLAlchemy has become increasingly popular since its release, but it still lacks good offline documentation. This practical book fills the gap, and because a developer wrote it, you get an objective look at SQLAlchemy's tools rather than an advocate's description of all the "cool" features.

SQLAlchemy includes both a database server-independent SQL expression language and an object-relational mapper (ORM) that lets you map "plain old Python objects" (POPOs) to database tables without substantially changing your existing Python code. Essential SQLAlchemy demonstrates how to use the library to create a simple database application, walks you through simple queries, and explains how to use SQLAlchemy to connect to multiple databases simultaneously with the same Metadata. You also learn how to:

  • Create custom types to be used in your schema, and when it's useful to use custom rather than built-in types
  • Run queries, updates, and deletes with SQLAlchemy's SQL expression language
  • Build an object mapper with SQLAlchemy, and understand the differences between this and active record patterns used in other ORMs
  • Create objects, save them to a session, and flush them to the database
  • Use SQLAlchemy to model object oriented inheritance
  • Provide a declarative, active record pattern for use with SQLAlchemy using the Elixir extension
  • Use the SQLSoup extension to provide an automatic metadata and object model based on database reflection

In addition, you'll learn how and when to use other extensions to SQLAlchemy, including AssociationProxy, OrderingList, and more.

Essential SQLAlchemy is the much-needed guide for every Python developer using this code library. Instead of a feature-by-feature documentation, this book takes an "essentials" approach that gives you exactly what you need to become productive with SQLAlchemy right away.

商品描述(中文翻譯)

《Essential SQLAlchemy》介紹了一個高階的開源程式庫,使得 Python 程式設計師更容易訪問關聯式資料庫,如 Oracle、DB2、MySQL、PostgreSQL 和 SQLite。自從發布以來,SQLAlchemy 變得越來越受歡迎,但仍然缺乏良好的離線文檔。這本實用的書籍填補了這一空白,因為是由開發者撰寫的,您將獲得對 SQLAlchemy 工具的客觀看法,而不是對所有「酷」功能的推崇描述。

SQLAlchemy 包含一個與資料庫伺服器無關的 SQL 表達語言和一個物件關聯映射器(ORM),讓您可以將「普通的 Python 物件」(POPOs)映射到資料庫表中,而不需要實質上改變您現有的 Python 代碼。《Essential SQLAlchemy》展示了如何使用這個程式庫來創建一個簡單的資料庫應用程式,帶您逐步了解簡單查詢,並解釋如何使用 SQLAlchemy 同時連接到多個資料庫,並使用相同的 Metadata。您還將學習如何:

- 創建自定義類型以用於您的架構,以及何時使用自定義類型而非內建類型的好處
- 使用 SQLAlchemy 的 SQL 表達語言執行查詢、更新和刪除
- 使用 SQLAlchemy 構建物件映射器,並理解這與其他 ORM 中使用的主動記錄模式之間的差異
- 創建物件,將其保存到會話中,並刷新到資料庫
- 使用 SQLAlchemy 建模物件導向繼承
- 提供一個聲明式的主動記錄模式,與 SQLAlchemy 一起使用 Elixir 擴展
- 使用 SQLSoup 擴展提供基於資料庫反射的自動 Metadata 和物件模型

此外,您還將學習如何以及何時使用 SQLAlchemy 的其他擴展,包括 AssociationProxy、OrderingList 等等。

《Essential SQLAlchemy》是每位使用這個程式庫的 Python 開發者所需的指南。這本書採取「基本要素」的方法,而不是逐項功能的文檔,讓您能夠立即有效地使用 SQLAlchemy。