Differences between revisions 6 and 7
Revision 6 as of 2007-02-08 10:40:01
Size: 2065
Editor: HuangYi
Comment:
Revision 7 as of 2007-03-27 15:11:42
Size: 2628
Editor: HuangYi
Comment: 丰富文档
Deletions are marked like this. Additions are marked like this.
Line 2: Line 2:
= 简介 =
SQLAlchemy: the power of Hibernate; the ease of Python

'''''The power of Hibernate; the ease of Python'''''
Line 6: Line 6:
SQLAlchemy is the Python SQL toolkit and Object Relational Mapper that gives application developers the full power and flexibility of SQL. = 简介 =
Line 8: Line 8:
It provides a full suite of well known enterprise-level persistence patterns, designed for efficient and high-performing database access, adapted into a simple and Pythonic domain language. SQLAlchemy 主要由两部分组成,一个 SQL 工具包和一个关系对象映射(ORM),它能让开发者完全发挥出 SQL 的灵活性与强大的能量。
Line 10: Line 10:
= 哲学 = 他实现了一整套企业级持久层模式,可以通过简单而 Pythonic 的接口,进行高效率和高性能的数据库访问。
Line 12: Line 12:
SQL databases behave less and less like object collections the more size and performance start to matter; object collections behave less and less like tables and rows the more abstraction starts to matter. SQLAlchemy aims to accommodate both of these principles. = 设计哲学 =
Line 14: Line 14:
SQLAlchemy doesn't view databases as just collections of tables; it sees them as relational algebra engines. Its object relational mapper enables classes to be mapped against the database in more than one way. SQL constructs don't just select from just tables—you can also select from joins, subqueries, and unions. Thus database relationships and domain object models can be cleanly decoupled from the beginning, allowing both sides to develop to their full potential. 当你越关注性能,就会发现 SQL 数据库离对象集合越来越远;当你越关注抽象,就会发现对象集合离表和行这些概念越来越远。SQLAlchemy 将致力于尽量包容这两个世界。

SQLAlchemy 并不把数据库简单地视为数据表的集合;它把它们看作是关系代数引擎。它的关系对象映射能够让类以不同的方式映射到数据库。SQL 工具包也不光能够对数据表进行 select 操作——你还能对连接、子查询和联合进行 select。这样数据库关系和领域对象模型之间的耦合从一开始就得以很好地解开,使得两个领域都得以发挥其各自的极致。

= Elixir =

[http://elixir.ematia.de 项目地址]

== 简介 ==

SQLAlchemy 的 ORM 遵从的是 DataMapping 的设计模式,而 Elixir 则在 SQLAlchemy 的基础上实现了一层 ActiveRecord 模式,并使用一套类似 RoR 的 ActiveRecord 系统的领域语言语法,从此可以用一种更加简洁的方式对 SQLAlchemy 的强大功能进行访问。

Elixir 是由 ActiveMapper 和 TurboEntity 两个项目发展而来,这两个项目作者最终商量了一个完美的实现方案。使用 Elixir,你将拥有更方便的访问接口,同时也能得到大部分 SQLAlchemy 的能力。

== 示例 ==

TableOfContents

The power of Hibernate; the ease of Python


简介

SQLAlchemy 主要由两部分组成,一个 SQL 工具包和一个关系对象映射(ORM),它能让开发者完全发挥出 SQL 的灵活性与强大的能量。

他实现了一整套企业级持久层模式,可以通过简单而 Pythonic 的接口,进行高效率和高性能的数据库访问。

设计哲学

当你越关注性能,就会发现 SQL 数据库离对象集合越来越远;当你越关注抽象,就会发现对象集合离表和行这些概念越来越远。SQLAlchemy 将致力于尽量包容这两个世界。

SQLAlchemy 并不把数据库简单地视为数据表的集合;它把它们看作是关系代数引擎。它的关系对象映射能够让类以不同的方式映射到数据库。SQL 工具包也不光能够对数据表进行 select 操作——你还能对连接、子查询和联合进行 select。这样数据库关系和领域对象模型之间的耦合从一开始就得以很好地解开,使得两个领域都得以发挥其各自的极致。

Elixir

[http://elixir.ematia.de 项目地址]

简介

SQLAlchemy 的 ORM 遵从的是 DataMapping 的设计模式,而 Elixir 则在 SQLAlchemy 的基础上实现了一层 ActiveRecord 模式,并使用一套类似 RoR 的 ActiveRecord 系统的领域语言语法,从此可以用一种更加简洁的方式对 SQLAlchemy 的强大功能进行访问。

Elixir 是由 ActiveMapperTurboEntity 两个项目发展而来,这两个项目作者最终商量了一个完美的实现方案。使用 Elixir,你将拥有更方便的访问接口,同时也能得到大部分 SQLAlchemy 的能力。

示例

相关链接

讨论

PageComment2

SQLAlchemy (last edited 2009-12-25 07:13:51 by localhost)