Well, you could KEEP the sid and have a sequence that links stories and
topics together. Then you'd have the nice SID thing alive still, and then
deal with the space issue.
Or you could maybe have two tables that assign a sequence to a SID (story and
topic) and then those sequences are added to another table that links
multiple stories and topics together.....
Just a thought
Brian Aker wrote:
> Eric Dannewitz wrote:
> > Multiple topics would be good. How about a story can have one main
> > topic, but have many related subtopics? That would make more sense.
> That is what this would do for you.
> > Yeah, but aren't the sid's or whatever is used to identify them already
> > unique? Then you really don't need to create a sequence do you? The
> > table could just have the unique fields from the topics table and the
> > stories table.
> I knew someone was going to ask this :)
> This is the issue. A select on an int is very fast and the table
> doesn't take up much space. Now, think about this over a long
> period. Say you attach 5 additional topics to a story so that
> you get enough keywords for what you want.
> Now say you run 50 stories a day (newsforge style). Start
> doing the math for over a year, for over 5 years.
> This could easily become a huge table. To make sure this will
> work over time we would want it to be as fast as possible.
> getDescriptions() with a cachable hash reference to
> topic sequence to name keeps this from being either
> a join, or a large hit to the DB.
> The nice things about sid's over sequences is that for
> display purpose (or I should say fetch purpose) a user
> can not see stories before they are being meant to be
> seen. Aka right now you need to be pretty bored to
> do this with article.pl (even though this is
> enforceable with basic business logic in article.pl).
> Slashcode-development mailing list
Back up my hard disk? I can't find the reverse switch!
Eric Dannewitz - Adventurer, saxophonist, good-timer (crook? quite possibly),
clarinetist, manic self-publicist, part-time flautist(flutist?), macintosher,
and often thought to be completely out to lunch. http://www.jazz-sax.com