I think you are underestimating flat-file boards. I know that the YaBB 2 development team spent an incredible amount of time working to speed the thing up, and have done a very good job.
Database systems still have to access the disk at some point. They still store files on the hard drive. There are obvious differences with how they work, but it is not fair to just make a blanket statement that software based on a flat-file system is not scalable. Furthermore, assuming that sophisticated techniques are required to speed things up is preposterous. I don't think I've seen a single YaBB user complain about having too many files in a single directory.