pictures
----------------
pic_id
pic_number
pic_album
pic_path
pic_filename
pic_viewed
pic_description
pic_date
albums
-----------------
album_id
album_name
album_viewed
paths
--------------
path_id
path_guide
comments
-------------
comment_id
comment_album_id
comment_picture_id
comment_user
comment_ip
comment_date
This is my first database driven website, so please go easy on me.
A few details. Pictures will be stored in their on folder by album name. I set up a table named path for storing domain address up until the filename of the picture. Albums could have dozens or hundreds of pictures. This way $path_guide and $pic_filename will give me a full address for the pic: http://www.mysite.com/album/pic.jpg, but I only have to store http://www.mysite.com/album/ once and reuse as many times I need it.
Also, I set up a comments table which will store comments for all pictures. If there's more than one comment for one pic, then comment_album_id and comment_picture_id will be the same, but the comment_id will be unique to each comment.
My only problem is I can see this whole thing if in the main page I have all the albums displayed and selecting any album will take me to that album that is displaying all the thumbs from that album. However what if I want to have albums that could have more albums in them (albums only, not albums and pictures as well). How should I handle that?
Am I missing anything else?
Thanks.