Path: | README.og |
Last Update: | Wed Jun 10 07:42:39 -0700 2015 |
Nitro integrates the Og (ObjectGraph) object-relational mapping library. Og provides transparent serialization of object graphs to a RDBMS backend. Unlike other similar libraries Og maps standard Ruby objects to SQL tables and not vice versa. Og provides a meta language to describe the relations between objects, a flexible and intuitive api for querieng the database, raw access to the SQL language if needed (for example to fine tune the automatically generated SQL tables, or for custom queries), suports deserialization to Ruby objects or tuples, automatically generates join tables for many_to_many relations and provides a collection of usefull Mixins to synthesize common Entities.
Og is a combination of the best features of Active Record and the former O-R mapping library included in Nitro (NDB). Adapters for PostgreSQL and MySQL are included.
Og is part of the Nitro project, released as a stand-alone library due to popular demand. You can find the ChangeLog in the Nitro distribution (www.rubyforge.com/projects/nitro).
The library provides the following features:
+ Object-Relational mapping. + Absolutely no configuration files. + Multiple backends (PostgreSQL, MySQL). + ActiveRecord-style meta language and db aware methods. + Automatially generates join-tables for many_to_many relations. + Deserialize to Ruby Objects or ResultSets. + Deserialize sql join queries to Ruby Objects. + Serialize arbitrary ruby object graphs through YAML. + Connection pooling. + Thread safety. + SQL transactions. + Lifecycle callbacks. + Transparent support for cascading deletes for all backends. + Hierarchical structures (preorder traversal, materialized paths) + Works safely as part of distributed application. + Automatic Validation/Constraints. + Simple and clean implementation.
The latest version of Og can be found at
Documentation for Og can be found in the distribution.
Og requires the following applications or libraries:
http://www.ruby-lang.org Version 1.8.2 is recomended.
http://www.postgresql.jp/interfaces/ruby/archive/ruby-postgres-0.7.1.tar.gz Ruby interface to the PostgreSQL RDBMS.
http://tmtm.org/ja/ruby/mysql/README_en.html Ruby interface to the MySQL RDBMS.
http://www.postgres.org Used for the Database Backend.
http://www.mysql.org Used for the Database Backend.
Please install the required applications and libraries before continuing with the installation of Og. Only install the libraries needed for the backend you plan to use.
Og is distributed as a RubyGem. First of all make sure you have installed RubyGems on your system. Then run the following command:
gem install og
Then try to run the examples/og Example application.
A tar.gz distribution is also available on www.rubyforge.com/projects/nitro.
For any questions regarding Og, feel free to ask on the ruby-talk mailing list (which is mirrored to comp.lang.ruby) or contact gm@navel.gr.
Copyright (c) 2004-2005 Navel Ltd (www.navel.gr)
Og (www.navel.gr/og) is copyrighted free software created and maintained by George Moschovitis (gm@navel.gr) and released under the standard BSD Licence. For details consult the file LICENCE.