Hi there,
Yes, you're absolutely right. It would make a lot of sense to use the ID so you can link the two records to each other.
However, at the stage where you implement this feature in the Planet Wrox site, the photo album and the use are stored in two separate databases. This makes it difficult to display the user's name along with the album as you need to do a join between two databases. Only in the last chapter are the two databases merged into a single one, enabling the scenario you're describing.
So, if you have a single database, storing just the user id pointing back to a Users table absolutely makes sense.
Cheers.
Imar
|