Topic: spambots illustrate problems with punbb data model
Some time ago (measured in years) I posed questions about the data model commonly used in php applications like punbb and wordpress-- like why isn't it normalized; why does punbb keep track of post counts in tables, instead of counting as part of a query; why isn't the user id always used, instead of sometimes using the username (poster)?
I was told that it was for 'efficiency' and responsiveness, so the database didn't have to have to do all those calculations. That didn't satisfy me then, and I'm now seeing problems with the data model as I try to prune spam.
It's an inconvenience to have to write pruning queries using id to prune posts, but 'poster' to prune topics. But then, none of the topic counts and page counts are correct, because these are maintained by the application instead of the database! So still more queries needed to count them up by groups, and then manually correct them.
it would be so much better IMHO to use the database instead of the app -- they're fast for this kind of thing. And it also allows scalability (multiple web servers hitting one or more punbb databases; which can't be done if topic and post counts are handled by the app.