A question for the more technically minded among ye. I'm going to be doing some work on a database of local information for inranelagh.com, and I'm think about how to structure it. At present, I'll want to flag entries in the database with various notes, and also attach tags to them, in the short-established Web2.0 style. Since there'll be an arbitrary number of possible tags for a given entry, and an occasionally changing number of flags, what's the best way to manage this?

Possibilities in my mind is to have one field, "flags", containing a comma separated list of words, and the same for tags. Another possibility is to have a field per flag, and let them be 1 or 0 - although I can't see that working for the tags. And finally, there's the possibility of a table co-relating flags/tags and entries separately.

I might just use tags overall, but I'd like to distinguish between the ones I set (flags) and the ones anyone else sets.

And a separate question - does anyone know how easy it is to get at phpBB's user storage, and if that login could be used elsewhere on the site, for comments, feedback, submissions, and the like?

I'm in an odd place on this; I know the stuff that can be done, I work with it every day, but in many ways, I haven't the slightest idea how to go about it anymore without developer support.

From: [identity profile] kshandr.livejournal.com


IrishGaming.Com piggybacks on phpBB's user table.

The one you want is phpbb_users (assuming you have the default db text extensions in place.) It's a nice, flat table with pretty much all you need in one place. When I used it I added a flag to the table which I needed (it's the bit that tags whether or not that user has anything in the scenario bank) and then I read values out of it if required.

As far as your tags go, I'd be inclined to have a table of tags and a table which relates tags to entries. To my mind it makes the whole thing easily searchable when you come to searching by tag 'cos you'll get a list of entries with tag X and then list them. As opposed to trawling through a field for a LIKE "tagname" and displaying based on that. That also will start to stink and degrade if you're searching for more than one tag. Nope - Table of tags and table of relations is my vote.
.
Powered by Dreamwidth Studios

Style Credit

Expand Cut Tags

No cut tags