← Back to team overview

zeitgeist team mailing list archive

Re: Fwd: RFC: Database Schema Changes Blueprint

 

2009/10/10 Siegfried Gevatter <rainct@xxxxxxxxxx>

> ---------- Forwarded message ----------
> From: Siegfried Gevatter <rainct@xxxxxxxxxx>
> Date: 2009/10/9
> Subject: Re: [Zeitgeist] RFC: Database Schema Changes Blueprint
> To: Mikkel Kamstrup Erlandsen <mikkel.kamstrup@xxxxxxxxx>
>
>
> Hey,
>
> (1)
> > Relational Mimetype
> To save disk space? Sounds fine.
>
> (2)
> > Remove event.end
> Ack.
>
> (3)
> > Relational Origin
> Ack, but see below, (4) and (5).
>
> (4)
> > Questionable: Origin moved to uri Table?
> > Siegfried has an idea - I don't completely get it :-)
> https://bugs.launchpad.net/zeitgeist/+bug/425258
>
> The "origin" field we currently have is in the "item" table, and this
> doesn't make any sense at all. It should be a property of events,
> instead. Let me explain it with an example. Suppose I'm on Google,
> search for Zeitgeist and click on a link to zeitgeist-project.com; the
> origin here would be "google.com". Now, some hours later, I'm reading
> Seif's blog and click on a link to zeitgeist-project.com; for this
> event, the origin should be Seif's blog: but origin is in the "item"
> table and is already set to "google.com", so the new origin can't be
> stored!
>
> (5)
> I'm also not quite sure what the value of "origin should be. In the
> example above, what would the URI for Google be, just
> "http://google.com"; or the URI of the search query? In case we go with
> the former, what happens with pages on shared hosting, how do we
> differentiate between them?
>
> I find the "origin" field rather confusing, and given that we'll get
> the focus tracking I tend to agree with "Questionable: Remove
> item.origin?".
>
> (6)
> > Questionable: Remove the app table all together?
> > [...] One less table can save us a SQL JOIN.
> No, if we get two things from the same table we still need two joins
> as the stuff is in different rows. Further, this would increment disk
> space usage.
>
> (7)
> > Solution 2: Separate Tables
> > [...] the event and annotation tables will look exactly like the item
> table but
> > adding an extra column subject_id
> I don't understand this at all.
>

This solution allows us to have 3 smaller tables to join and searc hthrough
instead of one huge tabel that we join 3 times and go through! as far as i
understand


> Gotta run now, see you later. By the way, I'll try to take a look at
> how views/procedures/etc work to see how we can optimize the big
> query.
>
> > On a related note: You might note that I've started writing a clean
> > wiki page for the engine alone at: http://live.gnome.org/Zeitgeist.
>
> Great, that was really needed :). You rock!
>
> Cheers,
>
> --
> Siegfried-Angel Gevatter Pujals (RainCT)
> Free Software Developer       363DEAE3
>
> _______________________________________________
> Mailing list: https://launchpad.net/~zeitgeist
> Post to     : zeitgeist@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~zeitgeist
> More help   : https://help.launchpad.net/ListHelp
>

References