Hi List!

I'm building an application in base-x that's sort of like a local music
wiki: bands, members, venues, promoters, and albums and songs are some of
what I'm representing in XML.

And what I'm wondering is that, in a situation where there's one of
something (a musician), and a bunch of something else they're associated
with (song writting or performance credits), which node should get the
reference?

The numerous node gets the reference back to the one:

    <album name="We Might Rock You" by="The Quesadillas">
        <track number="1" name="Hot Cross Buns" written-by="Joe Schmoe" />
        <track number="2" name="Bicycle" written-by="Joe Schmoe" />
    </album>
    [ etc ]

Or the one refers to the many:

    <person name="Joe Schmoe">
        <songs-written>
            <song name="Hot Cross Buns" />
            <song name="Bicycle" />
        </songs-written>
    </person>

Example 1, I could use something like:

    track[@written-by="Joe Schmoe"]

Example 2:

    person[@name="Joe Schmoe"]/songs-written/song

My other thought was putting the references in both, but I'll have to do
this with many types of objects I'm representing and I don't want things to
get out of control (then again, if I go to export an <album/> or <band/>
and I'm using the second method, I'll have to do a join)

I have a feeling in a large set, the second way wins out. Even where I
live, with only around 750,000 people in our entire state (Alaska), we have
easily 100 - 200 acts, including bands, solo performers, traditional acts,
etc, with thousands of individuals that compose them. But I want bands that
are extinct, bands that are on hiatus, etc, and I hope my software is
useful to others in larger cities as well.

So, maybe a pointless question because my db will be so tiny compared to
some folks who post on here, but just curious :-)

Also, if this problem has a name I can research myself, that'd be great!

Be well,
Jay Straw

Reply via email to