This is why a fucking hate SQL so much. I need to create THREE TABLES just to implement tagging. At least, that's the "proper way". Not to mention all the JOINS and nested queries I have to do.

I should've used MongoDB for this project, but I feel like it's too late to turn things around.

Follow

@xianc78 You'd want to do the same thing pretty much anywhere. A tag and it's relationships are different kinds of data you'd want to keep on their own. You wouldn't want to store tag data on posts themselves

Since querying by tags is also gonna be common it gives you a better opportunity to index it, like he says

· · Web · 1 · 0 · 0

@applejack >You wouldn't want to store tag data on posts themselves

I was thinking about going with a two table solution. Not the three table one.

@xianc78 Then it becomes a bit more complicated if you want to store more data with tags later, change names, you'll probably want a page that lists all the tags, and iterating over all the games/tags to list all the tags each time is a bit…

@applejack I guess you're right. I do plan on including mods for the site as well.

Here is what I have so far. A table for games, a table for tags, and a table for tag links. Eventually, there will be a table for mods, which is why tag_link either references a game or a mod.

Sign in to participate in the conversation
Game Liberty Mastodon

Mainly gaming/nerd instance for people who value free speech. Everyone is welcome.