How do software packages such as wordpress create permalinks? I've looked in the .htaccess file of an installation and found they use the ModRewrite Rule, but would like some more pointers about how this affects their database as I'm trying to get my head around it, to no avail.