I am building a photo album webpage and am not sure exactly how I
should organize the database. Here's where Im at so far...
I have one table called 'images' which contains the columns 'albumID',
'url', 'title', and 'description'. Then another table called 'albums'
which contains the column 'name'.
The part where I am having the most trouble is the 'images.albumID '
column. Some photos should be placed in mutliple albums, so should the
'albumID' column be an array type?
Also, I would like to have sub-albums within larger albums. So instead
of having a column called 'images.albumID ', should I instead have an
array column called 'images.locatio n' which declares the locations of
where the photo exists? (eg. "Nick's photo album > Vacations > Hawaii"
and "Nick's photo album > Sports > Surfing"). I guess I would also
have to add a 'location' field to the 'albums' table also so they can
be nested.
I would then access the images through JSP/PHP/ASP/etc with ("SELECT *
FROM 'images' WHERE 'location' = albums.location ")
Does anyone have any experience with something like this or know of
the best way to do this??? -Nick
should organize the database. Here's where Im at so far...
I have one table called 'images' which contains the columns 'albumID',
'url', 'title', and 'description'. Then another table called 'albums'
which contains the column 'name'.
The part where I am having the most trouble is the 'images.albumID '
column. Some photos should be placed in mutliple albums, so should the
'albumID' column be an array type?
Also, I would like to have sub-albums within larger albums. So instead
of having a column called 'images.albumID ', should I instead have an
array column called 'images.locatio n' which declares the locations of
where the photo exists? (eg. "Nick's photo album > Vacations > Hawaii"
and "Nick's photo album > Sports > Surfing"). I guess I would also
have to add a 'location' field to the 'albums' table also so they can
be nested.
I would then access the images through JSP/PHP/ASP/etc with ("SELECT *
FROM 'images' WHERE 'location' = albums.location ")
Does anyone have any experience with something like this or know of
the best way to do this??? -Nick
Comment