Re: Fwd: Re: Can I search for an array in csf? - Mailing list pgsql-sql

From Josh Berkus
Subject Re: Fwd: Re: Can I search for an array in csf?
Date
Msg-id 200210212002.52843.josh@agliodbs.com
Whole thread Raw
In response to Fwd: Re: Can I search for an array in csf?  (Vernon Wu <vernonw@gatewaytech.com>)
Responses Re: Fwd: Re: Can I search for an array in csf?
List pgsql-sql
Vernon,

> >> One field of a table stores an array of characters in a string fromat as
> >> "a,b,c,d". Is anyway to apply a select statement without using stored
> >> procedure?

> The reason I use this format for an array is that the array is dynamic. I
have quite few cases of this type of situation. The
> maximize length in some cases is known, is unknown in others. I have learnt
the comment separated format is one way
> to solve the problem. Someone also suggested to store the array as an
object. I am not sure whether it works or not.
> The application is written in Java, by the way.

You should store this data in a sub-table linked through a foriegn key.
Period.   Messing with arrays will only lead you to heartache ...

Try the book "Database Design For Mere Mortals" for a primer on SQL DB design.

--
-Josh BerkusAglio Database SolutionsSan Francisco



pgsql-sql by date:

Previous
From: Vernon Wu
Date:
Subject: Fwd: Re: Can I search for an array in csf?
Next
From: Achilleus Mantzios
Date:
Subject: Re: Fwd: Re: Can I search for an array in csf?