.\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.28) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{ . if \nF \{ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "Tangram::Sucks 3pm" .TH Tangram::Sucks 3pm "2015-10-09" "perl v5.20.2" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Tangram::Sucks \- what there is to be improved in Tangram .SH "DESCRIPTION" .IX Header "DESCRIPTION" Tangram has taken a concept very familiar to programmers in Java land to its logical completion. .PP 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. .SS "\s-1DESIGN CAVEATS\s0" .IX Subsection "DESIGN CAVEATS" .IP "\fBquery language does not cover all \s-1SQL\s0 expressions\fR" 4 .IX Item "query language does not cover all SQL expressions" Whilst there is no underlying fault with the query object metaphor \&\fIper se\fR, 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. .IP "\fBsome loss of encapsulation with queries\fR" 4 .IX Item "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 \*(L"public\*(R". .Sp Some people banter on about \fIdata access patterns\fR, which the Tangram schema represents. But \s-1OO\s0 terms like that are usually treated as buzzwords anyway. .SS "\s-1HARD PROBLEMS\s0" .IX Subsection "HARD PROBLEMS" .IP "\fBpartial column select\fR" 4 .IX Item "partial column select" This optimisation has some serious dangers associated with it. .Sp It could either be .IP "\fBno support for \s-1SQL UPDATE\s0\fR" 4 .IX Item "no support for SQL UPDATE" It may be possible to write a version of \f(CW\*(C`$storage\->select()\*(C'\fR that does this, which would look something like: .Sp .Vb 5 \& $storage\->update \& ( $r_object, \& set => [ $r_object\->{bar} == $r_object\->{baz} + 2 ], \& filter => ($r_object\->{frop} != undef) \& ); .Ve .IP "\fBno explicit support for re-orgs\fR" 4 .IX Item "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 difficult problem. .Sp 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. .IP "\fBreplace \s-1SQL\s0 expression core\fR" 4 .IX Item "replace SQL expression core" The whole \s-1SQL\s0 expression core needs to be replaced with a \s-1SQL\s0 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. .IP "\fBsupport for `large' collections\fR" 4 .IX Item "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 container, it should be possible to do this without loading the entire collection into memory. .Sp This could actually be achieved with a new Tangram::Type. .SS "\s-1MISSING FEATURES\s0" .IX Subsection "MISSING FEATURES" .IP "\fBconcise query expressions\fR" 4 .IX Item "concise query expressions" For simple selects, the query syntax is too long. Getting remote objects should take less code. .IP "\fBnon-ID joins\fR" 4 .IX Item "non-ID joins" We can't join on anything but \*(L"\s-1ID\*(R"\s0 values .IP "\fBtables with no primary key\fR" 4 .IX Item "tables with no primary key" We can't map tables unless they have a primary key, and it is called \&\*(L"id\*(R" (or, at least, the same name as the rest of the schema). .IP "\fBtables with multi-column primary keys\fR" 4 .IX Item "tables with multi-column primary keys" We can't map tables when they have multiple primary keys. Well, you can, but only if you make a view with an \s-1ID\s0 column which is functionally derived from the multi-part keys. But that sucks. .IP "\fBtables with auto_increment keys\fR" 4 .IX Item "tables with auto_increment keys" These suck, but Tangram could still support them without requiring schema hacks. .IP "\fBtables without a `type' column\fR" 4 .IX Item "tables without a `type' column" The 'type' column is unneeded for base tables which do not have sub-classes. .IP "\fBtables with custom `type' columns\fR" 4 .IX Item "tables with custom `type' columns" For mapping schemata where some clever person has invented their own special way of representing types using discrete column values. .IP "\fBtables with implicit (presence) `type' columns\fR" 4 .IX Item "tables with implicit (presence) `type' columns" It should be possible to infer the type value based on knowledge of the schema, and the tables which have rows. .IP "\fBfully symmetric relationships\fR" 4 .IX Item "fully symmetric relationships" back-refs are read-only. .IP "\fBbulk inserts\fR" 4 .IX Item "bulk inserts" Inserting lots of similar objects should be more efficient. Right now it generates a new \s-1DBI\s0 statement handler for each object. .IP "\fB`empty subclass' schema support\fR" 4 .IX Item "`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. .IP "\fBwarn about column redefinitions\fR" 4 .IX Item "warn about column redefinitions" Defining a column twice should be an error. Reported by Mark Lawrence.