[development] relationships API vs i18n

Jeremy Epstein jazepstein at gmail.com
Fri Nov 10 01:21:46 UTC 2006


It would be good to support relations between entities of any type,
not just nodes. So instead, we could have:

CREATE TABLE relation (
  type char(12),
  id1 int,
  type1 char(12),
  id2 int,
  type2 char(12),
  weight int
);

I also give my +1 to a lightweight triple-based relationship API in
core. I know that dman (author of the relationships / RDF module) has
been putting a lot of work into this stuff, although he has expressed
concern that his module is currently too heavy for most simple uses.
It would be great if we could get a super-light version of his API
into core.

Cheers,
Jaza.

On 11/10/06, Arnab Nandi <arnab at arnab.org> wrote:
> +1 for relations. I remember sharing some emails with Jeff(eaton)
> about this a long time ago; but yes, triples are pretty much the way
> to go. So we have:
>
>   CREATE TABLE relation (
>     type CHAR(12)
>     nid1 int
>     nid2 int
>     priority int;
>   );
>
> which takes care of all possible relations(books, buddylists,
> relativity, etc) and has a lightweight ordering mechanism for things
> like page numbers, etc.
>
> -Arnab
>
> On 11/9/06, Jeff Eaton <jeff at viapositiva.net> wrote:
> > Gabor Hojtsy wrote:
> > > By offloading this work to a relationships API, I hope to get more out
> > > of this "related nodes" concept then just binary relations of
> > > translation nodes. Also this would be something to do for those who are
> > > absolutely not interested in i18n, but would like to help bring some
> > > cool stuff into Drupal.
> > >
> > > The existing relations efforts (some ready code) already operate in this
> > > field, and category module uses a similar conceptual approach. I hope
> > > that this way we can also revitalize the book module.
> >
> > That sort of relationship model is (IMO) a necessity for Drupal's
> > long-term health. Like everyone else I took a crack at implementing such
> > a model and have had it sitting in my sandbox for a few months.
> >
> > If we do use 'relationships' as the basis for translation, I hope we
> > take the time to do it in such a way that taxonomy terms, buddy lists,
> > and other kinds of connections can be represented as well.
> >
> > --Jeff
> >
> >
> >
>
>
> --
> http://www.arnab.org
>


More information about the development mailing list