The xml is interpreted at runtime to create sql commands, resulting in the creation of a new database file every time you play. Editing the xml will actually add new columns and rows to the database. You can use the sql if you want to -- its supposed to be capable of much more interesting manipulations than the xml (though people have complained that a lot of basic sql functionality seems to be missing).
You can learn a lot about sql by googling and following some simple tutorials. Sending queries to a database, creating/updating/deleting tables, is all very easy, basic stuff. It's the little syntax "gotchas" that'll have you tearing your hear out, like any scripting/programming language (what do you mean I missed a comma???)
I'm starting on lua tutorials. I can read the files easily enough, but I can't write them without copying-and-pasting. I don't actually know the syntax. I'm gonna need that in my head...