[thelist] SQL Multiple entries in same column?

Oliver Lineham oliver at lineham.co.nz
Mon Nov 13 04:16:57 CST 2000

At 20:02 13/11/2000 +1000, you wrote:

>Maybe a graphic will help..
>*  Col1   *  Col2      * Invoice    *
>* *************************
>* a          *       a      *   a,b,c,d,  *
>*             *              *    e,f,g      *

i think you are misunderstanding relational databases (ie. SQL).

if you think you are wanting to store more than one bit of data in a 
column, then you should be using another table and relating it to the first 

it would be *very* bad practice to use a comma (or otherwise) delimited 
list of values and separate them later (using Perl's splitting/pattern 
matching or otherwise).

there are two types of relationships between data: one-to-many, and 

if you elaborate on the data you are trying to store, we might be able to 
suggest the correct database structure.


     v i b e   m e d i a    http://www.vibe.co.nz/
  po box 10-492              wellington, new zealand
  phone +64 21 210-7845         oliver at lineham.co.nz

More information about the thelist mailing list