Adam: "I'm running into all sorts of conceptual problems with my custom weblog code. All due to my weird editing requirements that don't map well to RDBS tables." ... "My editing weirdness is that I like to play around with a whole day's worth of entries at once, possibly rearranging or combining them. Which wreaks havoc with all the permalink systems I've come up with so far."
What's the problem? This stuff seems easy. Rearranging is easy. Just have an "order_in_day" field. The interface is kind of a pain: do you have numbers you fill in and can change, or do you have up and down arrows that will let you move a post within the day? In the past I've chosen the latter, but I've done it and it's not too hard. There's your rearranging.
As for combining two entries... the easiest way is to just put all the text for one of the entries in the other, and just make the deleted entry a "pointer" somehow. Either just put the id number of the entry it points to in the text of the entry, and write code to recognize that and get the correct entry, or have a "point_to" field, and recognize that when the text field is null (or when the point_to field isn't null), get the "point_to" entry instead. None of your links break. Does this work?
And by the way, if you wind up combining more than once, you can still keep to a scheme where there's never a "chain" of pointed entries. In other words, there's only one level, so when retrieving an entry, you can say something like: "select * from entry where entry_id = coalesce((select point_to from entry where entry_id = $entry_id), $entry_id)" (but oh yeah, this won't work in MySQL). That's just how to do it in one query (which I think is correct), though it's probably not the best way. It's probably just best to do it in code and only go back to look another entry if the first entry is a pointer (and that way you can actually return a 302 code and redirect to tell spiders or whoever that the posts have been joined).
Don't use flat files. Databases are meant for this kind of stuff. You get searching for free, it's much much less work, and it's much much faster to use a database.
I guess that's about it for now. Well, one more thing: "It's kind of funny seeing all these sites enabling comments, and then seeing "0 comments" straight down the page. I'm not sure why I think it's funny, but it's probably meant in a mean way. Which means that it's about time for The Conversatron to be live so I can just be mean on there instead." Are you talking about me?
I've thought the same thing for awhile, but then I ran into a few times when I wished I would have comments on my site (this was one of them), so I took an hour and a half and wrote the feature. It doesn't hurt being there for the times I want it, and if I never used it I could do away with it.
And... what's the Conversatron?
The Conversatron is the "humor" site that I co-program and co-write for in my copious free time.
It's currently down, as the Conversatron Curse has taken another hosting company out of business.
With any luck it should be back up this week or next.