Size: 2065
Comment:
|
← Revision 15 as of 2009-12-25 07:13:51 ⇥
Size: 2741
Comment: converted to 1.6 markup
|
Deletions are marked like this. | Additions are marked like this. |
Line 1: | Line 1: |
[[TableOfContents]] = 简介 = SQLAlchemy: the power of Hibernate; the ease of Python |
<<TableOfContents>> '''''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。这样数据库关系和领域对象模型之间的耦合从一开始就得以很好地解开,使得两个领域都得以发挥其各自的极致。 = 教程&文档 = * [[http://www.sqlalchemy.org/docs/|官方文档]] * [[attachment:SQLAlchemy教程.zip|SQLAlchemy指南]](官方文档中的教程的中文翻译 by gashero) [[在线阅读]] * [[http://www.rmunn.com/sqlalchemy-tutorial/tutorial.html|A step-by-step SQLAlchemy tutorial]] = Elixir = [[http://elixir.ematia.de|项目地址]] == 简介 == SQLAlchemy 的 ORM 遵从 DataMapping 设计模式,而 Elixir 则是在 SQLAlchemy 基础上的一层 ActiveRecord 模式的实现,它使用一套类似 RoR 的 ActiveRecord 系统的领域语言语法,从此开发者可以用一种更加简洁的方式对 SQLAlchemy 的强大功能进行访问。 Elixir 是由 ActiveMapper 和 TurboEntity 两个项目发展而来,这两个项目作者最终得出了这样一个完美的实现方案。使用 Elixir,你将拥有更方便的访问接口,同时还能享受绝大部分 SQLAlchemy 的强大功能。 == 示例 == [[/ElixirExamples]] |
Line 17: | Line 38: |
* [http://www.sqlalchemy.org/ 首页] * [http://www.sqlalchemy.org/docs/ 文档] * [http://www.rmunn.com/sqlalchemy-tutorial/tutorial.html A step-by-step SQLAlchemy tutorial] * [http://erosson.com/migrate/ Migrate: sqlalchemy的数据库版本控制] * [http://turboentity.ematia.de/ TurboEntity: 对 sqlalchemy 的一层封装] * [http://www.sqlalchemy.org/trac/wiki/SqlSoup SqlSoup: 建立在 sqlalchemy 基础上的一个 sql 工具] * [http://spyced.blogspot.com/2006/04/introducing-sqlsoup.html Introducing SqlSoup] * [http://spyced.blogspot.com/2007/01/why-sqlalchemy-impresses-me.html Why SQLAlchemy impresses me](使用 sqlalchemy 表达复杂的关联) * [http://spyced.blogspot.com/2006/02/why-schema-definition-belongs-in.html Why schema definition belongs in the database] (与 sqlalchemy 无关) |
* [[http://www.sqlalchemy.org/|首页]] * [[http://erosson.com/migrate/|Migrate: sqlalchemy的数据库版本控制]] * [[http://www.sqlalchemy.org/trac/wiki/SqlSoup|SqlSoup: 建立在 sqlalchemy 基础上的一个 sql 工具]] * [[http://spyced.blogspot.com/2006/04/introducing-sqlsoup.html|Introducing SqlSoup]] * [[http://spyced.blogspot.com/2007/01/why-sqlalchemy-impresses-me.html|Why SQLAlchemy impresses me]](使用 sqlalchemy 表达复杂的关联) * [[http://spyced.blogspot.com/2006/02/why-schema-definition-belongs-in.html|Why schema definition belongs in the database]] (与 sqlalchemy 无关) |
Line 28: | Line 46: |
[[PageComment2]] |
The power of Hibernate; the ease of Python
简介
SQLAlchemy 主要由两部分组成,一个 SQL 工具包和一个关系对象映射(ORM),它能让开发者完全发挥出 SQL 的灵活性与强大的能量。
他实现了一整套企业级持久层模式,可以通过简单而 Pythonic 的接口,进行高效率和高性能的数据库访问。
设计哲学
当你越关注性能,就会发现 SQL 数据库离对象集合越来越远;当你越关注抽象,就会发现对象集合离表和行这些概念越来越远。SQLAlchemy 将致力于尽量包容这两个世界。
SQLAlchemy 并不把数据库简单地视为数据表的集合;它把它们看作是关系代数引擎。它的关系对象映射能够让类以不同的方式映射到数据库。SQL 工具包也不光能够对数据表进行 select 操作——你还能对连接、子查询和联合进行 select。这样数据库关系和领域对象模型之间的耦合从一开始就得以很好地解开,使得两个领域都得以发挥其各自的极致。
教程&文档
SQLAlchemy指南(官方文档中的教程的中文翻译 by gashero) 在线阅读
Elixir
简介
SQLAlchemy 的 ORM 遵从 DataMapping 设计模式,而 Elixir 则是在 SQLAlchemy 基础上的一层 ActiveRecord 模式的实现,它使用一套类似 RoR 的 ActiveRecord 系统的领域语言语法,从此开发者可以用一种更加简洁的方式对 SQLAlchemy 的强大功能进行访问。
Elixir 是由 ActiveMapper 和 TurboEntity 两个项目发展而来,这两个项目作者最终得出了这样一个完美的实现方案。使用 Elixir,你将拥有更方便的访问接口,同时还能享受绝大部分 SQLAlchemy 的强大功能。
示例
相关链接
Why SQLAlchemy impresses me(使用 sqlalchemy 表达复杂的关联)
Why schema definition belongs in the database (与 sqlalchemy 无关)