I use the term database loosely here -- it can be an actual database, or a spreadsheet (in any format including CSV) or can be package-dependent.
Is there a way to create mail-merged documents similar to what can be done in word processing packages? I found the mailmerge package which sort of works but it puts all the mail-merged data into one document.
Is there a package or way to generate new, individual documents for each part of the database? In other words, if I have a firstName value in whatever storage system, can I get LaTeX to generate a file called <firstName>.dvi for each of the names in the database? Or do I need to resort to a scripting language driver to pull that off?
EDIT
So to further explain what I am trying to do (and will now set it up based on the answer to Change document class per page ) :
I'm trying to create a "welcome to the company" sort of document that has a cover page, table of contents, welcome letter, then various sections of information. I've never tried this in anything other than a word processor where it's easy to set "master pages" or "template pages" for individual pages in the document. So I could use a letterhead template page for the welcome letter part and a standard article-type template for the rest and still have the letter numbered/referenced in the ToC.
If I use the approach on the answer there, how can I tell \pdfpages which page to include? Ultimately I would like to have many files like Bob.pdf, Sue.pdf, John.pdf etc. where each file is the same document with a custom letter embedded within.

datatoolpackage can be used to process a CSV file, and then you can extract the appropriate pages from the PDF file. – Peter Grill Jan 08 '13 at 00:40welcome.texwhich includes Bob-letter.pdf and then outputswelcome-bob.pdf, etc. for each person? You don't want 1 document which includes separate letters for Bob, Sue, etc. I would be inclined to script that part. – Alan Munn Jan 08 '13 at 01:07Bob-letter.pdf, I'll just haveletters.pdfwhich has Bob's letter on some page. So thewelcome.texused to createwelcome-bob.pdfwould need to know the same database asletters.pdfin order to know which order the pages are in. If that makes sense... – tpg2114 Jan 08 '13 at 01:10datatoolormailmerge. I will have one document of my auto-generated letters, each page is a new letter (assume only one page each). So I need to find a way to tellpdfpageswhich page to pull in when creating the multiple documents. – tpg2114 Jan 08 '13 at 01:15datatoolas suggested to create the letters from a.csvfile, then pdftk to 'burst' the 'combined-letter.pdf' into the individual letters, then usepdfpagesto create your final documents? Whew! Seems complicated.... – jon Jan 08 '13 at 03:22datatool, so that it outputs (all into one file, granted): cover page, ToC, letter, various sections --- once for each person. Everything, in short, would be generated for each person of in the.csvfile. Then you could usepdftkto burst the file if needed. – jon Jan 08 '13 at 04:50