leading up to the download center tutorial is the tutorial for adding registration to the checkout process.
the concept works like this:
The user adds an item to the cart.
they go to checkout, if they are not already logged in, they are prompted to login.
when they login, the User ID is saved as a session.
when they checkout an order is created in the orders table with the userID stored.
the items ordered are stored in the order details table.
the order table relates to the orderdetails table using:
orders.orderID = orderDetails.DetailOrderID
the orders table relates to the users table using:
orders.orderUserID = users.User.ID this is used to determine which orders belong to the user, and then look in the orderdetails tqable to find the items that where ordered
the details table relates to the products table by:
oderdetails.DetailProductID = products.productID
if the product is downloadable, the file name should be stored in the product location column.