<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://dikini.net" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>dikini.net - relations</title>
 <link>http://dikini.net/taxonomy/term/55/0</link>
 <description></description>
 <language>en</language>
<item>
 <title>Cut down relations.inc</title>
 <link>http://dikini.net/07.02.2006/cut_down_relations_inc</link>
 <description>&lt;p&gt;Here comes a very short, cut-down version of relations.inc. It is a very basic api for use in various indexing schemes.&lt;/p&gt;
&lt;p&gt;It can be expanded to hook into db_rewrite_sql(), but I refuse to do that for the sake of my remaining sanity.&lt;/p&gt;
&lt;p&gt;The basic idea is that modules can/should use this or analogous api to perform all &quot;relation&quot; queries.&lt;/p&gt;
&lt;p&gt;There is a HUUGE confusion going on about &lt;strong&gt;What is a relation?&lt;/strong&gt;, but I won&#039;t participate in that any more - no time, sorry.&lt;/p&gt;
</description>
 <comments>http://dikini.net/07.02.2006/cut_down_relations_inc#comment</comments>
 <category domain="http://dikini.net/tags/code">code</category>
 <category domain="http://dikini.net/tags/drupal">drupal</category>
 <category domain="http://dikini.net/tags/relations">relations</category>
 <enclosure url="http://dikini.net/files/relations.inc.txt" length="2755" type="text/plain" />
 <pubDate>Tue, 07 Feb 2006 10:19:18 -0500</pubDate>
 <dc:creator>vlado</dc:creator>
 <guid isPermaLink="false">124 at http://dikini.net</guid>
</item>
<item>
 <title>Relations api and SQLGEN</title>
 <link>http://dikini.net/23.01.2006/relations_api_and_sqlgen</link>
 <description>&lt;p&gt;I decided to split the relations api from the more advanced issues realted to the current sqlgen implementation. The main reason for this split is due to the never ending discussions about what is a relation on drupal forums, irc, mailing lists, etc...&lt;/p&gt;
&lt;p&gt;The relations api is going to be a simple implementation of a tree and graph indexes, with emebeded SQL. You should be able to do things like - get related nodes; get next, previous, parent, children, sibling nodes.&lt;/p&gt;
&lt;p&gt;Long term-wise we should be able to replace the book and taxonomy implementations of the database using this api. I&#039;m intentionally going to make it extremely minimalistic, since I&#039;m really not a supporter of using embdedded sql statements.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://dikini.net/23.01.2006/relations_api_and_sqlgen&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <comments>http://dikini.net/23.01.2006/relations_api_and_sqlgen#comment</comments>
 <category domain="http://dikini.net/tags/coding">coding</category>
 <category domain="http://dikini.net/tags/drupal">drupal</category>
 <category domain="http://dikini.net/tags/projects">projects</category>
 <category domain="http://dikini.net/tags/relations">relations</category>
 <category domain="http://dikini.net/tags/todo">todo</category>
 <pubDate>Mon, 23 Jan 2006 11:52:33 -0500</pubDate>
 <dc:creator>vlado</dc:creator>
 <guid isPermaLink="false">118 at http://dikini.net</guid>
</item>
<item>
 <title>minor improvements</title>
 <link>http://dikini.net/12.01.2006/minor_improvements</link>
 <description>&lt;p&gt;&lt;a href=&quot;http://mec0026.engi.cf.ac.uk:80/websvn/listing.php?repname=drupal+relations&amp;amp;amp;path=%2F&amp;amp;amp;rev=4&amp;amp;amp;sc=0&quot; rel=&quot;nofollow&quot;&gt;minor imporvements&lt;/a&gt; - &lt;em&gt;&lt;strong&gt;Rev 4 - vlado&lt;/strong&gt; (2 file(s) modified)minor imporvements&lt;br /&gt;
&lt;/em&gt; [&lt;a href=&quot;http://mec0026.engi.cf.ac.uk:80/websvn/listing.php?repname=drupal+relations&amp;amp;amp;path=&amp;amp;amp;&quot; rel=&quot;nofollow&quot;&gt;relations svn&lt;/a&gt;]&lt;/p&gt;
&lt;p&gt;As it says on the box minor improvements. Actually the changes are a mockup of some of my ideas for better/proper database abstraction, and a variation on some of Adrian&#039;s model thoughts.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
  sqlgen_join(
    // functional form
    sqlgen_table(&#039;n&#039;=&amp;gt;&#039;node&#039;),
    //array(ish) form
    array(&#039;r&#039;=&amp;gt;&#039;node_revisions&#039;),
    // the join constrains, defines the new relation
    sqlgen_constraints(
      array(&#039;node_revisions&#039;=&amp;gt;&#039;may be null&#039;), 
      sqlgen_and(
        sqlgen_eq( arg(&#039;node&#039;,&#039;nid&#039;),arg(&#039;node_revisions&#039;,&#039;nid&#039;) ),
        sqlgen_eq( arg(&#039;node&#039;=&amp;gt;&#039;vid&#039;),arg(&#039;node_revisions&#039;,&#039;vid&#039;))
      )
    ),
    //result filtering
    sqlgen_cond( sqlgen_eq(arg(&#039;node&#039;,&#039;nid&#039;),$nid)) 
  );
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;This is the functional form. It provides a good abstraction. It is independant of the underlying structure. In my opinion it has better code readability. Can be thoroughly unit tested.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
 $view=array(
    &#039;*&#039;=&amp;gt;&#039;node_revisions&#039;,
    &#039;*&#039;=&amp;gt;&#039;node&#039;,
    &#039;name&#039;=&amp;gt;&#039;user&#039;,
    &#039;#cond&#039;=&amp;gt;array(
      &#039;#op&#039;=&amp;gt;&#039;AND&#039;,
      array(
          &#039;#op&#039;=&amp;gt;&#039;eq&#039;,
          array(&#039;node&#039;,&#039;nid&#039;),
          array(&#039;node_revisions&#039;,&#039;nid&#039;)),
      array(&#039;#op&#039;=&amp;gt;&#039;eq&#039;,
          array(&#039;node&#039;,&#039;vid&#039;),
          array(&#039;node_revisions&#039;,&#039;vid&#039;)),
      array(&#039;#op&#039;=&amp;gt;&#039;eq&#039;,
          array(&#039;node&#039;,&#039;nid&#039;),
          &#039;#param&#039;=&amp;gt;&#039;node_view_id&#039;)
      )
    );
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The array form, can easily become a mess. It is faster using arrays, rather than using functions to generate them, but could be daunting.&lt;/p&gt;
&lt;p&gt;Both cases provide a close native equivalent to s-forms in php. Although you have eval(), the native php syntax is not as easily manipulateable as in lisp.&lt;/p&gt;
&lt;p&gt;Still both forms have a significant advantage over &#039;embeded SQL&#039;. We can get native php expression of the concepts in the db. We can optimise the queries, based on both data knowledge and database backends. Database independence is obvious. No rewrite_sql hacks. So things like coding a new/custom permission system becomes a breeze. Content type mashups, view/form remixing becomes possible.&lt;/p&gt;
&lt;p&gt;As I&#039;ve said this is just a mockup.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;updated the comments in the functional form for readability&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://dikini.net/12.01.2006/minor_improvements&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <comments>http://dikini.net/12.01.2006/minor_improvements#comment</comments>
 <category domain="http://dikini.net/tags/code">code</category>
 <category domain="http://dikini.net/tags/drupal">drupal</category>
 <category domain="http://dikini.net/tags/ideas">ideas</category>
 <category domain="http://dikini.net/tags/relations">relations</category>
 <category domain="http://dikini.net/tags/work_in_progress">work in progress</category>
 <pubDate>Thu, 12 Jan 2006 10:42:20 -0500</pubDate>
 <dc:creator>vlado</dc:creator>
 <guid isPermaLink="false">115 at http://dikini.net</guid>
</item>
<item>
 <title>A pause for thought and some cut backs</title>
 <link>http://dikini.net/11.01.2006/a_pause_for_thought_and_some_cut_backs</link>
 <description>&lt;p&gt;I&#039;ve been reading. Scheming. And I stumpled upon &lt;a href=&quot;http://schematics.sourceforge.net/schemeunit-schemeql.ps&quot;&gt;SchemeUnit and SchemeQL: Two Little Languages&lt;/a&gt;. I liked the paper. Especially the SchemeQL part. It does state my (intellectual) motivation behind writing relations/sqlgen.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;SQL statements are not checked until execution time. That is error prone.&lt;/li&gt;
&lt;li&gt;SQL statements are not host language statements. They can&#039;t be used in the same way or manipulated as the host language statements. Except by using crude text processing, one cannot programatically compose, abstract and refine embedded SQL statements. Code quality and productivity suffers.&lt;/li&gt;
&lt;p&gt;&lt;a href=&quot;http://dikini.net/11.01.2006/a_pause_for_thought_and_some_cut_backs&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <comments>http://dikini.net/11.01.2006/a_pause_for_thought_and_some_cut_backs#comment</comments>
 <category domain="http://dikini.net/tags/drupal">drupal</category>
 <category domain="http://dikini.net/tags/programming">programming</category>
 <category domain="http://dikini.net/tags/projects">projects</category>
 <category domain="http://dikini.net/tags/relations">relations</category>
 <category domain="http://dikini.net/tags/scheme">scheme</category>
 <pubDate>Wed, 11 Jan 2006 06:05:00 -0500</pubDate>
 <dc:creator>vlado</dc:creator>
 <guid isPermaLink="false">114 at http://dikini.net</guid>
</item>
<item>
 <title>Relations, declarative knowledge and inference</title>
 <link>http://dikini.net/20.12.2005/relations_declarative_knowledge_and_inference</link>
 <description>&lt;p&gt;I realised that I need to demo, coming soon in flesh, why I&#039;m doing the relations the way I do, and why I have these strange concepts.&lt;/p&gt;
&lt;p&gt;Let&#039;s start with an example in KIF, the example is lifted from the KIF draft proposed American National Standard (dpANS).&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;
(defrelation number (?x) := (or (real ?x) (complex ?x))) 
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;
What does it mean? Well, is &lt;em&gt;number(x)&lt;/em&gt; will be true if x is either a real or complex number. Number is a relation. &lt;/p&gt;
&lt;p&gt;Generally speaking we have two ways to define a relation or function - either explictly defining all possible/known cases, or by using some procedure to produce them.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://dikini.net/20.12.2005/relations_declarative_knowledge_and_inference&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <comments>http://dikini.net/20.12.2005/relations_declarative_knowledge_and_inference#comment</comments>
 <category domain="http://dikini.net/tags/drupal">drupal</category>
 <category domain="http://dikini.net/tags/projects">projects</category>
 <category domain="http://dikini.net/tags/relations">relations</category>
 <category domain="http://dikini.net/tags/work_in_progress">work in progress</category>
 <pubDate>Tue, 20 Dec 2005 04:45:10 -0500</pubDate>
 <dc:creator>vlado</dc:creator>
 <guid isPermaLink="false">109 at http://dikini.net</guid>
</item>
<item>
 <title>relations update</title>
 <link>http://dikini.net/19.12.2005/relations_update</link>
 <description>&lt;p&gt;I&#039;ve updated the code in my relations svn repository.&lt;/p&gt;
&lt;p&gt;Some of the changes a very experimental - like the munit.inc - it is implementing bovine tests-  simply very basic (beasty), non-complicated, dirty, grazing unit tests. When I was writing  the tests I was out of net reach, so no simpletest for me. And now I just like it.&lt;/p&gt;
&lt;p&gt;Implemented tests for the majority of sqlgen. There are the beginnings of theme widgets - using drupal forms api for theming, as Adrian suggested earlier. The widget tests need to be refactored. Don&#039;t you believe them.&lt;/p&gt;
&lt;p&gt;What I need to do next is to figure out how to tie together the data from db and some meta-data so I can generate the different view. The main goal is minimal metadata for maximum impact. We shall see. At the moment nothing more than the table description from db is used.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://dikini.net/19.12.2005/relations_update&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <comments>http://dikini.net/19.12.2005/relations_update#comment</comments>
 <category domain="http://dikini.net/tags/code">code</category>
 <category domain="http://dikini.net/tags/drupal">drupal</category>
 <category domain="http://dikini.net/tags/projects">projects</category>
 <category domain="http://dikini.net/tags/relations">relations</category>
 <category domain="http://dikini.net/tags/work_in_progress">work in progress</category>
 <pubDate>Mon, 19 Dec 2005 06:50:21 -0500</pubDate>
 <dc:creator>vlado</dc:creator>
 <guid isPermaLink="false">107 at http://dikini.net</guid>
</item>
<item>
 <title>drpkg and relations svn</title>
 <link>http://dikini.net/13.12.2005/drpkg_and_relations_svn</link>
 <description>&lt;p&gt;The bryght repository seems to be down.&lt;/p&gt;
&lt;p&gt;So here are the urls to the drpkg and relations svn repositories maintained at &lt;a href=&quot;http://www.mec.cf.ac.uk&quot; title=&quot;Manufacturing Engineering Centre&quot; rel=&quot;nofollow&quot;&gt;MEC&lt;/a&gt; by me. I will be syncing them to bryght regularly.&lt;/p&gt;
&lt;pre&gt;
svn://mec0026.engi.cf.ac.uk/relations
svn://mec0026.engi.cf.ac.uk/drpkg
&lt;/pre&gt;&lt;p&gt;
To checkout the relations code do:&lt;br /&gt;
&lt;code&gt;svn co svn://mec0026.engi.cf.ac.uk/relations&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;To checkout the drpkg code do:&lt;br /&gt;
&lt;code&gt;svn co svn://mec0026.engi.cf.ac.uk/drpkg&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Update: It is back up, but I&#039;ll keep both in sync.&lt;br /&gt;
Update: repair&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://dikini.net/13.12.2005/drpkg_and_relations_svn&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <comments>http://dikini.net/13.12.2005/drpkg_and_relations_svn#comment</comments>
 <category domain="http://dikini.net/tags/code">code</category>
 <category domain="http://dikini.net/tags/drpkg">drpkg</category>
 <category domain="http://dikini.net/tags/drupal">drupal</category>
 <category domain="http://dikini.net/tags/relations">relations</category>
 <category domain="http://dikini.net/tags/svn">svn</category>
 <pubDate>Tue, 13 Dec 2005 06:38:42 -0500</pubDate>
 <dc:creator>vlado</dc:creator>
 <guid isPermaLink="false">103 at http://dikini.net</guid>
</item>
<item>
 <title>Relations Battle Plan II and first results</title>
 <link>http://dikini.net/30.11.2005/relations_battle_plan_ii_and_first_results</link>
 <description>&lt;p&gt;I uploaded the first version of the relations module to the Bryght svn repository. I intend to use it for easier management and brainstorming. When the module is considered alpha quality it will get into drupal&#039;s contrib cvs, maybe earlier. I don&#039;t want to pollute it earlier than nessesary.&lt;/p&gt;
&lt;h3&gt;current status&lt;/h3&gt;
&lt;p&gt;The bulk of the sql query generation has been done. An initial working version of the url parser, implemention a simple relation definition language parser has been done.&lt;/p&gt;
&lt;h3&gt;the critical things todo&lt;/h3&gt;
&lt;p&gt;There are a few things, which need to be done in order for the api to be properly usable. The main show-stoppers are the relation nodeapi and themeing of the output. I haven&#039;t done anything on the nodeapi side, since I&#039;m not sure about the UI. Needs experimenting. For the themeing, I need to think through themeing based on the field meta-data. Thes goes dangerously into the cck teritory. If anyone has any ideas, please come up and shout.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://dikini.net/30.11.2005/relations_battle_plan_ii_and_first_results&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <comments>http://dikini.net/30.11.2005/relations_battle_plan_ii_and_first_results#comment</comments>
 <category domain="http://dikini.net/tags/code">code</category>
 <category domain="http://dikini.net/tags/drupal">drupal</category>
 <category domain="http://dikini.net/tags/programming">programming</category>
 <category domain="http://dikini.net/tags/projects">projects</category>
 <category domain="http://dikini.net/tags/relations">relations</category>
 <pubDate>Wed, 30 Nov 2005 05:59:57 -0500</pubDate>
 <dc:creator>vlado</dc:creator>
 <guid isPermaLink="false">93 at http://dikini.net</guid>
</item>
<item>
 <title>Relations API - query generation and TODO</title>
 <link>http://dikini.net/21.11.2005/relations_api_query_generation_and_todo</link>
 <description>&lt;p&gt;OK, I was talking, talking, writing, fuming - here is some code. Please comment. I need some feedback. I need help as well - to make this better. The file is attached to this post.&lt;/p&gt;
&lt;p&gt;Some explanation is probably needed, or I might end up scoring even higher mad hatter points. My previous scribbles on relations give background on my thoughts on this. So I won&#039;t be repeating them. The goal is to produce an api, which can be used to form predicates, essentially queries on various related things. One and the same relation can be used in many ways. For example in a simple triple - (subject,predicate,object) or (left,relation,right), we can have four different questions - the free variables being subject and object. Things get more complicated when you consider relation tuples with a length more than two. This is the main reason to try and create a query generator.&lt;/p&gt;
&lt;p&gt;Now some implementation details. The RFS() function. The parameter passing is a bit awkward. It is not elegant, but I had to solve a particular problem there. Consider that the arguments can be generated using a different RFS function. Consider as well that $arg1 and $arg2 can be generated separately or as part of a single expression. There is a need to pass the arguments (signatures essentially) by name, so we can identify them properly, but the order is not guaranteed or even worse, the order and the number of arguments, as well as their shape can&#039;t be known in advance. This leads to what I consider a not elegant, but workable solution. I would love to streamline that.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://dikini.net/21.11.2005/relations_api_query_generation_and_todo&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <comments>http://dikini.net/21.11.2005/relations_api_query_generation_and_todo#comment</comments>
 <category domain="http://dikini.net/tags/code">code</category>
 <category domain="http://dikini.net/tags/drupal">drupal</category>
 <category domain="http://dikini.net/tags/projects">projects</category>
 <category domain="http://dikini.net/tags/relations">relations</category>
 <category domain="http://dikini.net/tags/work_in_progress">work in progress</category>
 <enclosure url="http://dikini.net/files/rel.inc.txt" length="7862" type="text/plain" />
 <pubDate>Mon, 21 Nov 2005 03:26:17 -0500</pubDate>
 <dc:creator>vlado</dc:creator>
 <guid isPermaLink="false">89 at http://dikini.net</guid>
</item>
<item>
 <title>Relations in drupal links</title>
 <link>http://dikini.net/16.11.2005/relations_in_drupal_links</link>
 <description>&lt;p&gt;A collection of relations in rupal related links. Add more in comments.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://dikini.net/16.11.2005/relations_in_drupal_links&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <comments>http://dikini.net/16.11.2005/relations_in_drupal_links#comment</comments>
 <category domain="http://dikini.net/tags/drupal">drupal</category>
 <category domain="http://dikini.net/tags/links">links</category>
 <category domain="http://dikini.net/tags/relations">relations</category>
 <pubDate>Wed, 16 Nov 2005 07:53:15 -0500</pubDate>
 <dc:creator>vlado</dc:creator>
 <guid isPermaLink="false">84 at http://dikini.net</guid>
</item>
<item>
 <title>Once again relations, or the need to focus on smaller parts of the big picture. A rant.</title>
 <link>http://dikini.net/15.11.2005/once_again_relations_or_the_need_to_focus_on_smaller_parts_of_the_big_picture_a_rant</link>
 <description>&lt;p&gt;After reading &lt;a href=&quot;http://coders.co.nz/drupal_development/?q=node/5&quot;&gt;The Need for RDF Linking - Module Proposal&lt;/a&gt;, &lt;a href=&quot;http://drupal.org/node/37556&quot;&gt;RDF Metadata&lt;/a&gt; and &lt;a href=&quot;http://dikini.net/node/53#comment-22&quot;&gt;this comment&lt;/a&gt; I felt the urge to engage in writing this spewage.&lt;/p&gt;
&lt;p&gt;The aim of the relations &quot;system&quot; I&#039;m working is to capture the structure of a relation domain. Nothing more. Not to try to interpret the meaning of a relation, not to try and build ontologies, semantic networks, not to store different metadata, etc... Not at all.&lt;/p&gt;
&lt;p&gt;You might ask why. Well the main reason is that I think that is not a consern for this particular module. I want it to be able to interpret structures well enough, that there is a way to express out of the box more complex things, that we can do now in drupal. As a side effect, we will end up having a library or API with wich we can express things like this thing is a tree. This thing is a graph. This thing is a set of things. this is an ordered set, and the distance between A and B is x. Things like that.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://dikini.net/15.11.2005/once_again_relations_or_the_need_to_focus_on_smaller_parts_of_the_big_picture_a_rant&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <comments>http://dikini.net/15.11.2005/once_again_relations_or_the_need_to_focus_on_smaller_parts_of_the_big_picture_a_rant#comment</comments>
 <category domain="http://dikini.net/tags/drupal">drupal</category>
 <category domain="http://dikini.net/tags/programming">programming</category>
 <category domain="http://dikini.net/tags/relations">relations</category>
 <category domain="http://dikini.net/tags/scribbles">scribbles</category>
 <category domain="http://dikini.net/tags/theory">theory</category>
 <category domain="http://dikini.net/tags/work_in_progress">work in progress</category>
 <pubDate>Tue, 15 Nov 2005 03:14:48 -0500</pubDate>
 <dc:creator>vlado</dc:creator>
 <guid isPermaLink="false">82 at http://dikini.net</guid>
</item>
<item>
 <title>nodes related to this one by tags</title>
 <link>http://dikini.net/09.11.2005/nodes_related_to_this_one_by_tags</link>
 <description>&lt;p&gt;Nasty title. Never the less, the first hurdle is done. Time to wrap up the code. You can see this working on any post within this website. For example this one - you should notice the &quot;Similar content&quot; block. Links are ordered by number of &#039;my&#039; tags present. As simple as that.&lt;/p&gt;
&lt;p&gt;I had a silly problem. mysql 4.0 doesn&#039;t support sub-selects, the way my original implementation was coded. Silly, because I spent hours debugging this, without even thinking to check the version. &lt;/p&gt;
&lt;p&gt;end result: mysql 1 - vlado 1&lt;/p&gt;
&lt;p&gt;I have my test cases for relations now. So things should be out in the wild soon&lt;/p&gt;
</description>
 <comments>http://dikini.net/09.11.2005/nodes_related_to_this_one_by_tags#comment</comments>
 <category domain="http://dikini.net/tags/drupal">drupal</category>
 <category domain="http://dikini.net/tags/relations">relations</category>
 <category domain="http://dikini.net/tags/tags">tags</category>
 <pubDate>Wed, 09 Nov 2005 11:25:50 -0500</pubDate>
 <dc:creator>vlado</dc:creator>
 <guid isPermaLink="false">78 at http://dikini.net</guid>
</item>
<item>
 <title>Relations, SQL, views, algebra or how to cook that broth</title>
 <link>http://dikini.net/03.11.2005/relations_sql_views_algebra_or_how_to_cook_that_broth</link>
 <description>&lt;p&gt;I&#039;ve been experimenting, again with these. Apart from some bugs, the things are moving. I&#039;ll try to summarise my findings and thoughts on this beast called relations.&lt;/p&gt;
&lt;h3&gt;throw everything into the water&lt;/h3&gt;
&lt;p&gt;Let&#039;s start with a little bit of maths. It gives me that comfort feeling of being serious if I put down some formulas. I might be shooting myself in the head, which is not that comforting.&lt;/p&gt;
&lt;p&gt;So, in our case, a relation is a n-tuple - &lt;code&gt;R(X(1),..,X(n))&lt;/code&gt;, where Xi are some sets, possibly ordered, or partially ordered sets. The simplest useful relation would be the  R(x) - a single value. The equivalent of an SQL databse table is &lt;code&gt;R(Y(1),...,Y(n)), where Y(i)&lt;/code&gt; is a column in that table. The equivalent of a SELECT ... WHERE query in this little math markup journey is F(R(Y(1),...,Y(n))), where F() is a filter function implementing the conditions in the where clause. Similarly a row in the db is R(y1,...,yn), where yi is the value for Y(i) in that row.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://dikini.net/03.11.2005/relations_sql_views_algebra_or_how_to_cook_that_broth&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <comments>http://dikini.net/03.11.2005/relations_sql_views_algebra_or_how_to_cook_that_broth#comment</comments>
 <category domain="http://dikini.net/tags/drupal">drupal</category>
 <category domain="http://dikini.net/tags/relations">relations</category>
 <category domain="http://dikini.net/tags/theory">theory</category>
 <category domain="http://dikini.net/tags/work_in_progress">work in progress</category>
 <pubDate>Thu, 03 Nov 2005 04:34:45 -0500</pubDate>
 <dc:creator>vlado</dc:creator>
 <guid isPermaLink="false">64 at http://dikini.net</guid>
</item>
<item>
 <title>Relations battle plan</title>
 <link>http://dikini.net/31.10.2005/relations_battle_plan</link>
 <description>&lt;p&gt;The battle plan for implementing relations in drupal in no particular order.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;framework
&lt;ul&gt;
&lt;li&gt;relations hook&lt;/li&gt;
&lt;li&gt;composition&lt;/li&gt;
&lt;li&gt;intersection&lt;/li&gt;
&lt;li&gt;exclusion&lt;/li&gt;
&lt;li&gt;relation node type&lt;/li&gt;
&lt;li&gt;integration with listings api of cck fame&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;data model
&lt;ul&gt;
&lt;li&gt;adjacency lists&lt;/li&gt;
&lt;li&gt;trees&lt;/li&gt;
&lt;li&gt;term&lt;/li&gt;
&lt;li&gt;user&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;user interface
&lt;ul&gt;
&lt;li&gt;add relation between two things&lt;/li&gt;
&lt;li&gt;add to tree&lt;/li&gt;
&lt;li&gt;query builder
&lt;ul&gt;
&lt;li&gt;composition&lt;/li&gt;
&lt;li&gt;exclusion&lt;/li&gt;
&lt;li&gt;intersection&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href=&quot;http://dikini.net/31.10.2005/relations_battle_plan&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <comments>http://dikini.net/31.10.2005/relations_battle_plan#comment</comments>
 <category domain="http://dikini.net/tags/code">code</category>
 <category domain="http://dikini.net/tags/drupal">drupal</category>
 <category domain="http://dikini.net/tags/plan">plan</category>
 <category domain="http://dikini.net/tags/programming">programming</category>
 <category domain="http://dikini.net/tags/projects">projects</category>
 <category domain="http://dikini.net/tags/relations">relations</category>
 <pubDate>Mon, 31 Oct 2005 04:37:57 -0500</pubDate>
 <dc:creator>vlado</dc:creator>
 <guid isPermaLink="false">58 at http://dikini.net</guid>
</item>
<item>
 <title>Relation modules</title>
 <link>http://dikini.net/31.10.2005/relation_modules</link>
 <description>&lt;p&gt;Specifications of a bundle of relations and structures modules. They naturally are tightly connected to SQL, so can be viewed as a kind of SQL query builder.&lt;/p&gt;
&lt;h3&gt;Goals&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;explicit relations module
&lt;ul&gt;
&lt;li&gt;provide a unified db structure for explicitly related things&lt;/li&gt;
&lt;li&gt;provide a set of functions to get and set relations&lt;/li&gt;
&lt;li&gt;provide nodeapi extension&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;tree relations module
&lt;ul&gt;
&lt;li&gt;provide a db structure for nested set indexes&lt;/li&gt;
&lt;li&gt;provide setter and getters for those&lt;/li&gt;
&lt;li&gt;provide nodeapi extension&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;related by terms module
&lt;ul&gt;
&lt;li&gt;implement the relations api&lt;/li&gt;
&lt;li&gt;provide a db interface&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;general relations module
&lt;ul&gt;
&lt;li&gt;provide a relations api&lt;/li&gt;
&lt;li&gt;provide a set of relation operations - addition, difference&lt;/li&gt;
&lt;li&gt;provide a relations node&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href=&quot;http://dikini.net/31.10.2005/relation_modules&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <comments>http://dikini.net/31.10.2005/relation_modules#comment</comments>
 <category domain="http://dikini.net/tags/code">code</category>
 <category domain="http://dikini.net/tags/drupal">drupal</category>
 <category domain="http://dikini.net/tags/programming">programming</category>
 <category domain="http://dikini.net/tags/projects">projects</category>
 <category domain="http://dikini.net/tags/relations">relations</category>
 <pubDate>Mon, 31 Oct 2005 04:35:29 -0500</pubDate>
 <dc:creator>vlado</dc:creator>
 <guid isPermaLink="false">57 at http://dikini.net</guid>
</item>
<item>
 <title>Relations and their domain structures</title>
 <link>http://dikini.net/29.10.2005/relations_and_their_domain_structures</link>
 <description>&lt;p&gt;In this scribble I&#039;ll discuss an implementation of different topological structures, which can be used for indexing different &quot;relation systems&quot;, for example trees for menus, book structures, etc... graphs for caching links between pages.&lt;/p&gt;
&lt;p&gt;We can split the problem into two main subproblems. First, navigation and queries withing a single relation domain. For example local table of contents for a section in a book. Second is higher order or inter-domain queries. For example: given a node, determine the all related nodes, ordering them by their distance from the node, based on taxonomy, their position in a book(s), and their position in the site&#039;s &quot;link web&quot;. We should be able to implement second and hier order based queries, based on the results of these two basic problems.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://dikini.net/29.10.2005/relations_and_their_domain_structures&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <comments>http://dikini.net/29.10.2005/relations_and_their_domain_structures#comment</comments>
 <category domain="http://dikini.net/tags/articles">articles</category>
 <category domain="http://dikini.net/tags/code">code</category>
 <category domain="http://dikini.net/tags/drupal">drupal</category>
 <category domain="http://dikini.net/tags/programming">programming</category>
 <category domain="http://dikini.net/tags/relations">relations</category>
 <category domain="http://dikini.net/tags/scribbles">scribbles</category>
 <category domain="http://dikini.net/tags/sql">sql</category>
 <category domain="http://dikini.net/tags/theory">theory</category>
 <pubDate>Sat, 29 Oct 2005 12:53:56 -0400</pubDate>
 <dc:creator>vlado</dc:creator>
 <guid isPermaLink="false">55 at http://dikini.net</guid>
</item>
<item>
 <title>Going mad talking about relations</title>
 <link>http://dikini.net/26.10.2005/going_mad_talking_about_relations</link>
 <description>&lt;p&gt;This is a very dirty and mathematically not precise  dialogue between me and me on &quot;general&quot; relations in drupal. &lt;/p&gt;
&lt;h3&gt;What is a relation&lt;/h3&gt;
&lt;p&gt;		Something taking the form of &lt;em&gt;(object,predicate,subject)&lt;/em&gt;, or in its general form &lt;em&gt;(objects,predicate,subjects)&lt;/em&gt;. The predicate can be viewed as a label denoting the relation. In a lot of cases, the predicate of a relation is implied.&lt;/p&gt;
&lt;h3&gt;Yes, but what does that mean?&lt;/h3&gt;
&lt;p&gt;                Well, with relations we can express things like &lt;em&gt;X is part of Y&lt;/em&gt; or &lt;em&gt;x,y,z are Y&lt;/em&gt;&lt;/p&gt;
&lt;h3&gt;Ok, but give me some more real examples&lt;/h3&gt;
&lt;p&gt;&lt;a href=&quot;http://dikini.net/26.10.2005/going_mad_talking_about_relations&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <comments>http://dikini.net/26.10.2005/going_mad_talking_about_relations#comment</comments>
 <category domain="http://dikini.net/tags/drupal">drupal</category>
 <category domain="http://dikini.net/tags/programming">programming</category>
 <category domain="http://dikini.net/tags/relations">relations</category>
 <category domain="http://dikini.net/tags/scribbles">scribbles</category>
 <pubDate>Wed, 26 Oct 2005 05:31:05 -0400</pubDate>
 <dc:creator>vlado</dc:creator>
 <guid isPermaLink="false">53 at http://dikini.net</guid>
</item>
</channel>
</rss>
