Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

tangram::sucks(3pm) [debian man page]

Tangram::Sucks(3pm)					User Contributed Perl Documentation				       Tangram::Sucks(3pm)

NAME
Tangram::Sucks - what there is to be improved in Tangram DESCRIPTION
Tangram has taken a concept very familiar to programmers in Java land to its logical completion. This document is an attempt by the coders of Tangram to summarise the major problems that are inherant in the design, describe cases for which the Tangram metaphor does not work well, and list long standing TO-DO items. DESIGN CAVEATS query language does not cover all SQL expressions Whilst there is no underlying fault with the query object metaphor per se, there are currently lots of queries that cannot be expressed in current versions of Tangram, and adding new parts to the language is not easy. some loss of encapsulation with queries It could be said this is not a problem. After all, adding properties to a schema of an object is akin to declaring them as "public". Some people banter on about data access patterns, which the Tangram schema represents. But OO terms like that are usually treated as buzzwords anyway. HARD PROBLEMS partial column select This optimisation has some serious dangers associated with it. It could either be no support for SQL UPDATE It may be possible to write a version of "$storage->select()" that does this, which would look something like: $storage->update ( $r_object, set => [ $r_object->{bar} == $r_object->{baz} + 2 ], filter => ($r_object->{frop} != undef) ); no explicit support for re-orgs The situation where you have a large amount of schema reshaping to do, with a complex enough data structure can turn into a fairly dif- ficult problem. It is possible to have two Tangram stores with different schema and simply load objects from one and put them in the other - however the on-demand autoloading combined with the automatic insertion of unknown objects will result in the entire database being loaded into core if it is sufficiently interlinked. replace SQL expression core The whole SQL expression core needs to be replaced with a SQL abstraction module that is a little better planned. For instance, there should be placeholders used in a lot more places where the code just sticks in an integer etc. support for `large' collections Where it is impractical or undesirable to load all of a collection into memory, when you are adding a member and then updating the con- tainer, it should be possible to This could actually be achieved with a new Tangram::Type. MISSING FEATURES concise query expressions For simple selects, this is too long: ... non-ID joins tables with no primary key tables with multi-column primary keys tables with auto_increment keys tables without a `type' column tables with custom `type' columns tables with implicit (presence) `type' columns fully symmetric relationships back-refs are read-only. bulk inserts Inserting lots of similar objects should be more efficient. Right now it generates a new STH for each object. `empty subclass' schema support You should not need to explicitly add new classes to a schema if a superclass of them is already in the schema. perl v5.8.8 2006-03-29 Tangram::Sucks(3pm)

Check Out this Related Man Page

Tangram::Type::Array::Scalar(3pm)			User Contributed Perl Documentation			 Tangram::Type::Array::Scalar(3pm)

NAME
Tangram::Type/Array/Scalar - map Perl array of strings or numbers SYNOPSIS
use Tangram::Core; use Tangram::Type/Array/Scalar; # always $schema = Tangram::Schema->new( classes => { NaturalPerson => { fields => { flat_array => { interests => { table => 'NP_int', sql => 'VARCHAR(50)', }, lucky_numbers => 'int', # use defaults } DESCRIPTION
Maps references to a Perl array. The persistent fields are grouped in a hash under the "array" key in the field hash. The array may contain only 'simple' scalars like integers, strings or real numbers. It may not contain references. For arrays of objects, see Tangram::Type::Array::FromMany and Tangram::Type::Array::FromOne. Tangram uses a table to save the state of the collection. The table has three columns, which contain * the id of the container object * the position of the element in the array * the value of the element The field names are passed in a hash that associates a field name with a field descriptor. The field descriptor may be either a hash or a string. The hash uses the following fields: * type * table * sql Optional field "type" specifies the type of the elements. If the type is "string"Tangram quotes the values as they are passed to the data- base. Not specifying a "type" is exactly equivalent to specifying "string". Optional field "table" sets the name of the table that contains the elements. This defaults to 'C_F', where C is the class of the contain- ing object and F is the field name. Optional field "sql" specifies the type that deploy() (see Tangram::Deploy) should use for the column containing the elements. If this field is not present, the SQL type is derived from the "type" field: if "type" is "string" (or is absent) VARCHAR(255) is used; otherwise, the "type" field is interpreted as a SQL type. If the descriptor is a string, it is interpreted as the value of the "type" field and all the other fields take the default value. perl v5.8.8 2006-03-29 Tangram::Type::Array::Scalar(3pm)
Man Page