473,376 Members | 1,054 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,376 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 1125

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: Phil Powell | last post by:
if (is_array($_POST)) { foreach ($this->getAssocSectionsObjArray($key, $dbAP) as $obj) { print_r($obj); print_r(" in array? "); print_r(in_array($obj, $result)); print_r("<P>"); if...
by: OlgaM | last post by:
Hello, i'm trying to initialize an array. The class List contains this in its private data members: ListNode<DATATYPE> *dataItems; In the constructor, i'm trying to allocate space for...
by: Raptor | last post by:
Hi, I'm quite new to MySQL and quite impressed by its feature set. I've also been looking at Interbase and it has a feature that allows a multidimensional array to be stored in a single field. ...
by: Gattaca | last post by:
I would like to create a matrix of integers by allocating memory dynamically (malloc or calloc) because i and j are defined during execution of the program. I have got not problem to do this in...
by: Magix | last post by:
Hi, what is wrong with following code ? typedef struct { word payLen; datatype data; } msg_type;
by: able | last post by:
Dear friends I have loaded a huge amount of data in an two domensional array. I need to do a lot searching in the array and sorting the array. My question is if an array is the most apropriate...
by: XML newbie: Urgent pls help! | last post by:
Hi, I am getting the error: Value of type 'String' cannot be converted to '1-dimensional array of Long'. in the following line for TextBox2.Text field : ...
by: DWalker | last post by:
VBA, as used in Excel 2000 and Excel 2003, has a function called Array. It's commonly seen in statements like the following: Workbooks.OpenText Filename:=ACFileName, _ StartRow:=1,...
by: rascal_mon | last post by:
I'm new with XML. Please give me some advice. I wonder there are any difference between XML that is automatically generated from ADO and XML file that shows in many textbooks. I found that the...
by: harsh123 | last post by:
I wish to add a new datatype to help me in doing mathametical computations.We all know that the system has got limited amount of memory ie we cannot create an array of very big size. for example a....
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.