Why can't you just control that in the name?
Like <a href="a/really/long/tedious/screwy/looking/url.php">Short URL</a>
You don't need a database, though it helps for storage. As long as it never changes, you can hard code it. Or, for dynamic, you could use a flat file...