Tangram

Tangram is a simple Perl module that can store pure objects in standard relational databases.
Download

Tangram Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Sam Vilain and Andres Kievsky
  • Publisher web site:
  • http://search.cpan.org/~samv/T

Tangram Tags


Tangram Description

Tangram is a simple Perl module that can store pure objects in standard relational databases. Tangram is a simple Perl module that can store pure objects in standard relational databases.Tangram is an object-relational mapper. It is orthogonal, meaning that it does not require anything of the objects stored in it (other than the common convention that base objects be based upon HASHes; individual columns can be anything).It consists of a schema language that can describe or be built around an object structure, or so as to closely match an existing SQL schema (with some limitations). This schema language is rich enough to express such common RDBMS features as links, foreign keys, and link tables.It also consists of a relational database storage engine, which based on the schema structure, will make Perl structures persist in a relational (SQL compliant) database. References to other objects (or collections, as represented with foreign keys and link tables) may be loaded using on demand references that `lazily' load data when it is needed.As of Tangram 2.08, the schema need not describe every single object property, so that you can map only the columns you intend to query. The rest of the object is then stored in a column via a serialiser, like Data::Dumper, YAML or Storable. These structures themselves may contain arbitrary references to other objects in storage.Tangram has soundly engineered transaction support, without sacrificing excellent data caching abilities. The general optimisation strategy of the code makes it most suited for OLTP (aka application servers) and other situations where it is better to select and update whole rows than to worry about which columns to retrieve/update or not retrieve/update.Once your object are persistent, you can build query expressions to find them in terms of the schema language that you used to put them in. Therefore, the schema data structure does not describe a data structure, it describes a data access pattern.If you are not picky about which accessor module to use, preferring to specify the schema once only, then you can use the seperately distributed Class::Tangram::Generator to make a set of classes from a Tangram schema structure.If you are looking for a tool that implements SQL abstraction only, you have probably missed the point (of this module, anyway), and a well-supported module like Class::DBI, or an interactive SQL modeller like Alzabo will likely suit your needs better.Tangram is beginning to include preliminary support for aggregation functions, and currently supports grouping, summing and counting. Joins must currently be in terms of integer primary key columns, to extend past this would require extra mapping types to be developed. Basic support for alternative join types is present, but in its infancy.Tangram currently contains no support for database-side updates (ie, UPDATE foo SET bar = 'baz' where frop = 'blarg'), but support is planned.There is no support for creating views based on existing classes to make new derived classes; you have to use your database SQL and create corresponding Tangram classes manually to do that.Tangram has a web site at http://tangram.utsl.gen.nz/, currently sponsored by MarketView (New Zealand) Ltd. Requirements: · Perl


Tangram Related Software