Edward,
I don't have the answer to your questions about making new pages
directly in the database, but I accomplished the same thing in a
SpecialPage I wrote by creating the content and a new Article from
within the SpecialPage code itself. The SpecialPage defines the form,
and posts back to itself. That way you are still in context with all
the globals you need to make new pages easily. My only difficulty
with this is that the $newArticle->insertNewArticle method ends by
telling the new Article to display itself, yanking you out of the
SpecialPage code.
My SpecialPage is derived from BoardVote.php, which used to be
referenced as an example. You can find it here:
http://cvs.sourceforge.net/viewcvs.py/wikipedia/extensions/BoardVote/
BoardVote.php?rev=1.3&only_with_tag=MAIN&view=markup
John