I'm currently trying to find a better way (in terms of usability and performance) when dealing with a situation, such as retrieving records tagged with a specific tag or category, or something like that.
A good way (the way I wanted to do this) is to retrieve the entries with the tag tag / category, so the URL will look like this:
http://stackoverflow.com/questions/tagged/language-agnostic
fetching slug entries that looks better:
http://stackoverflow.com/questions/tag/789/language-agnostic
fetching by ID and adding a bullet behind to make it more search engine friendly. This is better in performance because fetching data using an integer id will be faster than a string. (Cmiiw)
Now, with a db schema like:
posts post_to_tags tags
----- ------------ ----
id id id
title post_id name
content tag_id slug
... ...
? , , ? (, 10 000 , n - )
.