Here's what I would do conceptually.
1. Extend the Photo table with a ParentId
2. When inserting the main picture, leave this ParentId empty.
3. Redirect to a new page and forward the new PhotoId of the picture you just inserted.
4. On this new page, allow the user to insert 5 (or any number) of pictures and save them in the database. Pass the Id of the first image from step 3 in the ParentId picture.
5. When you display the main PhotoPicture you can query its children using something like
SELECT .... WHERE ParentId = Id
where Id is the ID of the main picture.
Does this help?
Imar
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of
ASP.NET 2.0 Instant Results and
Beginning Dreamweaver MX / MX 2004