There are some sample databases for solution recipes that may help you to get started. You can use the Blue Sky Music example to begin with. You should be customizing the database or creating your own to best fulfill your needs. If you have not seen it already there is a free Database Starter Kit for php that is very helpful and can teach you the basics of creating your own database that will suite your needs.
Here is a link to the trainings page where you can download this, it includes some sample db's as well.
When it comes to delivering your digital goods I think it is best to have a user login so that users that make a purchase can have access to the files they bought but not others. You can do this without logging in but what if the user is unable to complete their download after the purchase?