471,316 Members | 1,325 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,316 software developers and data experts.

When to use an array datatype?

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.location' 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
Nov 12 '05 #1
0 1081

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Phil Powell | last post: by
1 post views Thread by Raptor | last post: by
14 posts views Thread by Gattaca | last post: by
11 posts views Thread by Magix | last post: by
3 posts views Thread by able | last post: by
2 posts views Thread by XML newbie: Urgent pls help! | last post: by
reply views Thread by DWalker | last post: by
reply views Thread by rascal_mon | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.