Essential SQLAlchemy and over one million other books are available for Amazon Kindle. Learn more

Buy New

or
Sign in to turn on 1-Click ordering.
or
Amazon Prime Free Trial required. Sign up when you check out. Learn More
Buy Used
Used - Good See details
$6.55 & eligible for FREE Super Saver Shipping on orders over $25. Details

or
Sign in to turn on 1-Click ordering.
 
   
Kindle Edition
 
   
More Buying Choices
Have one to sell? Sell yours here
Essential SQLAlchemy
 
 
Start reading Essential SQLAlchemy on your Kindle in under a minute.

Don't have a Kindle? Get your Kindle here, or download a FREE Kindle Reading App.

Essential SQLAlchemy [Paperback]

Rick Copeland (Author)
4.7 out of 5 stars  See all reviews (3 customer reviews)

List Price: $34.99
Price: $22.97 & eligible for FREE Super Saver Shipping on orders over $25. Details
You Save: $12.02 (34%)
  Special Offers Available
o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o
In Stock.
Ships from and sold by Amazon.com. Gift-wrap available.
Want it delivered Monday, January 30? Choose One-Day Shipping at checkout. Details
Textbook Student FREE Two-Day Shipping for Students. Learn more

Formats

Amazon Price New from Used from
Kindle Edition $15.39  
Paperback $22.97  

Book Description

0596516142 978-0596516147 June 12, 2008 1

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.


Special Offers and Product Promotions

  • Buy $50 in qualifying physical textbooks, get $5 in Amazon MP3 Credit. Here's how (restrictions apply)

Frequently Bought Together

Essential SQLAlchemy + The Definitive Guide to Pylons (Expert's Voice in Web Development) + Foundations of Agile Python Development (Expert's Voice in Open Source)
Price For All Three: $88.77

Show availability and shipping details

Buy the selected items together
  • In Stock.
    Ships from and sold by Amazon.com.
    Eligible for FREE Super Saver Shipping on orders over $25. Details

  • The Definitive Guide to Pylons (Expert's Voice in Web Development) $34.42

    In Stock.
    Ships from and sold by Amazon.com.
    This item ships for FREE with Super Saver Shipping. Details

  • Foundations of Agile Python Development (Expert's Voice in Open Source) $31.38

    In Stock.
    Ships from and sold by Amazon.com.
    This item ships for FREE with Super Saver Shipping. Details



Editorial Reviews

About the Author

Rick Copeland is a senior software engineer with retail analytics firm Predictix, LLC, where he uses SQLAlchemy extensively, primarily for web application development. He has been using Python full-time for development since 2005, in projects as diverse as demand forecasting, business web applications, compilers, and hardware synthesis.


Product Details

  • Paperback: 240 pages
  • Publisher: O'Reilly Media; 1 edition (June 12, 2008)
  • Language: English
  • ISBN-10: 0596516142
  • ISBN-13: 978-0596516147
  • Product Dimensions: 9.2 x 7.1 x 0.6 inches
  • Shipping Weight: 13.6 ounces (View shipping rates and policies)
  • Average Customer Review: 4.7 out of 5 stars  See all reviews (3 customer reviews)
  • Amazon Best Sellers Rank: #185,801 in Books (See Top 100 in Books)

More About the Author

Discover books, learn about writers, read author blogs, and more.

 

Customer Reviews

3 Reviews
5 star:
 (2)
4 star:
 (1)
3 star:    (0)
2 star:    (0)
1 star:    (0)
 
 
 
 
 
Average Customer Review
4.7 out of 5 stars (3 customer reviews)
 
 
 
 
Share your thoughts with other customers:
Most Helpful Customer Reviews

12 of 13 people found the following review helpful:
5.0 out of 5 stars Essential SQLAlchemy is Magic, September 3, 2008
By 
Charles Anderson (Willamette Valley, OR) - See all my reviews
(REAL NAME)   
This review is from: Essential SQLAlchemy (Paperback)
Essential SQLAlchemy by Rick Copeland is a great book describing how to use SQLAlchemy to connect Python programs to databases. In fact, at the moment (mid-summer 2008), it is the book, since there are no other books on the subject, yet. Athough I am not (yet) a SQLAlchemy user, this book seems to cover all of the core topics in SQLAlchemy. The text includes many straightforward examples of how to use various facilities in SQLAlchemy and how to map various database programming problems into Python code via SQLAlchemy. Copeland also provides a whirlwind tour of some extensions to SQLAlchemy.
To be honest, the first chapter (the proverbial introduction) almost turned me off. The author starts out slowly enough, but then he starts touching on a huge number details, which were glazing my eyes over. However, the second chapter (getting started) started back at ground zero and stepped through everything in a nice clear fashion, and the rest of the book continued in that vein. He covers all the topics you would expect in a database programming book: queries, updates, joins, the built-in types, and how to hook in to provide support for your own types.
Something I didn't realize about SQLAlchemy coming into this is that SQLAlchemy is both an ORM (what I expected) as well as a high-level, database-independent API. Which is to say, you can just access the database as tables, columns and rows rather than as classes, attributes, and object instances. Although I'd personally prefer to use the ORM, I can imagine cases where it might not be the right tool for the job, and it's good to have a choice.
I was also surprised to see the ORM supports two styles of object-relational access: the data mapper pattern (which I had seen in Django and Hibernate) and the active record (used in Ruby). The author does a good job of explaining both of these and how to use them. He even devotes a whole chapter to Exlir, which is an extension that implements the active record pattern.
In conclusion, Essential SQLAlchemy provides a thorough presentation of the SQLAlchemy tool for interfacing Python code to SQL databases. The author covers a number of different methods in which SQLAlchemy can be used to access databases from Python, and he provides plenty of details of the various APIs available to the programmer.
Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No


4 of 4 people found the following review helpful:
4.0 out of 5 stars Slow Starter, strong finisher but getting long in the tooth, March 19, 2011
Amazon Verified Purchase(What's this?)
This review is from: Essential SQLAlchemy (Paperback)
The SQLAlchemy project docs and this book all suffer from a common problem: 0 to database connection is more complex than expected. The quick start story just isn't there. Django/Rails got us used to a blog in 15mins and SQLAlchemy isn't like that.

The first few chapters are the weakest point. Their is a lot of code that introduces a lot of moving parts with very little explanation. The first chapter tries to do too much and introduce all the components. This is tantamount to sticking the whole book in the first 15 pages which results in confusion. This is a failing of the book.

As the detail topical coverage begins the book continues to falter; however, this could be the nature of the code it covers. The "get going" chapter involves metadata, engines, sessions, etc all of which can be handled in different ways and are discussed in "we'll come back to it" detail. This is also confusing. However, I think you just need to know a lot before you can do anything interesting and the book is in an (understandable) rush to get to something interesting. It may have been better to introduce these as a black box and come back to it at the end.

Once a connection is up and running the book nicely deconstruction the API and gradual progression from known to unknown through the SQL Expression Layer and then ORM. The final chapters on Elixir and SqlSoup were a much appreciated addition.

From a general content standpoint I'd say the code samples are strong and do a good job of showing SQLAlchemy off. The prose are not as strong. The book rarely goes beyond "this is what X is and how to use it." I would have preferred a more structured discussion of when to do what and the implications of doing so. With these limitations I'd say plan to read this sitting at a computer and working with each code sample in the REPL.

Overall this book does a good job. It is a step up from the online docs which are extensive but have an unfavorable knowledge / word ratio and lack a good tutorial framework. The down side, as compared to the online docs, is that this book is 2+ years old and it is starting to show. Hopefully an updated edition is in the works.

Bottom Line: Worth the money.

Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No


2 of 5 people found the following review helpful:
5.0 out of 5 stars A powerful survey for Python developers, September 5, 2008
This review is from: Essential SQLAlchemy (Paperback)
Advanced programming collections will relish Rick Copeland's ESSENTIAL SQLALCHEMY, a powerful survey for Python developers who need to access relational databases. From customizing routines and creating objects to building a mapper and providing an active record pattern, this survey of SQLAlchemy will delight patrons of advanced developer guides.
Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No

Share your thoughts with other customers: Create your own review
 
 
 
Only search this product's reviews



Inside This Book (learn more)
Key Phrases - Statistically Improbable Phrases (SIPs): (learn more)
object mapper, inheritance mapping, table inheritance mapping, polymorphic loading, data mapper pattern, contextual session, object mappers, decorated function, print prod, bind parameter, mapped classes, mapped properties, keyword arguments, print row, operation cascades, metadata object, mapped column, positional argument, accessory table, session object, enum values, create engine, underlying query, connection pool, clothing table
Key Phrases - Capitalized Phrases (CAPs): (learn more)
Declarative Extension, Category Department, Using Elixir, Declaring Relationships Between Mappers, Category Class, Meta Data, Copeland Clone, False When True, Nice Pants, Getting Started, False If True, Concrete Table Inheritance, Single Table Inheritance, Print Dir, Query Object, Mapped Table
Browse Sample Pages:
Front Cover | Table of Contents | First Pages | Index | Back Cover | Surprise Me!
Search Inside This Book:

What Other Items Do Customers Buy After Viewing This Item?


Tags Customers Associate with This Product

 (What's this?)
Click on a tag to find related items, discussions, and people.
 
(1)
(1)

Your tags: Add your first tag
 

Customer Discussions

This product's forum
Discussion Replies Latest Post
No discussions yet

Ask questions, Share opinions, Gain insight
Start a new discussion
Topic:
First post:
Prompts for sign-in
 


Active discussions in related forums
Search Customer Discussions
Search all Amazon discussions
   
Related forums



So You'd Like to...



Look for Similar Items by Category


Look for Similar Items by Subject