Re: [linux-audio-user] New Linux soundapp site progress

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-user] New Linux soundapp site progress
From: Steve Harris (S.W.Harris_AT_ecs.soton.ac.uk)
Date: Tue Apr 09 2002 - 13:33:37 EEST


On Mon, Apr 08, 2002 at 09:24:51 -0700, Paul Winkler wrote:
> > Shout if this doesn't make sense, or you want more information.
>
> OK, this is a shout. :)

Yup, sorry, I just reread that and its full of KE jargon, I wrote it in a
hurry I'm afraid.

> The way I've been thinking about the site is, to me, very simple.
>
> An app listing is just an entry in a large, disordered repository.
> A category is just a list of other categories or of app listings.
> Metaphorically, Think of categories as directories, and listings as files ...
> except that the categories don't actually contain the files,
> they contain the equivalent of hard links.
>
> This is simple, but it does present some obvious problems:

Yeah, that is because the model is not right for this kind of data.

Instead of thinking of it as a heirarchy with hardlinks think of it as a
graph (the CS sort of graph, not a chart), where you store the reations
between nodes (edges in the graph).

Imagine a SQL table that looks like:
CREATE TABLE classes ( class varchar(64) NOT NULL, superclass varchar(64) NOT NULL )

> e.g. how do you find out what categories a given entry belongs to?

SELECT superclass FROM classses WHERE class="foo"

> Asking all the categories seems like unpleasant work,
> and keeping a list of parent categories in the entry seems
> error-prone. e.g. what if we change the name of a category,
> or remove the category entirely? what if we remove the only
> category that a certain entry was assigned to? Ugh.

Well, in real life you just give the classes (categories) id's so you can
change the name without breaking the integrity, orphaned categories and
entries can be spotted easily.

Like all things there is a tradeoff, doing it this way means that the code
that builds the heirachy index is quite complex, but you only have to
write it once.

If you want I can flesh out a basic framework to handle the data (in php
and mysql). I've built several of these systems before, its about an
afternoons work.

- Steve


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Tue Apr 09 2002 - 13:19:54 EEST