Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Store in one database column an array is a bad practice.
As far as I remember you can't query a varray. Also you are limiting
yourself to a fixed number of items.
Jim
From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Jared Still
Sent: Thursday, August 18, 2005 9:00 AM
To: juancarlosreyesp_at_gmail.com
Cc: oracle-l_at_freelists.org
Subject: Re: Store in one database column an array is a bad practice.
IIRC there is nothing in the relational model that prohibits this.
Personally, I would call it a bad practice, simply because it makes my life more difficult and I don't like it. :)
It does complicate the SQL somewhat, though I can't at the moment recall how to query a varray.
If you have repeating groups of a varray, that would violate first normal form.
eg. address_array_1, address_array_2...
Likewise an array of arrays would also violate 1NF ( I think). It would also be ugly.
I'm sure Lex will jump in here and provide an insightful answer to this.
Jared
On 8/18/05, Juan Carlos Reyes Pacheco <juancarlosreyesp_at_gmail.com> wrote:
Hi, I think to store in one database column an array is a bad practice. for example store in one colmun the person name, age and professoin, is wrong, it should be another column and/or another table, when a multicolumn array is stored in a column. Including the fact some features are not available for this kindof store.
Do you have a valid reason to do this?
Thank you
--
Oracle Certified Profesional 9i 10g Orace Certified Professional Developer 6i 8 years of experience in Oracle 7,8i,9i,10g and developer 6i
--
http://www.freelists.org/webpage/oracle-l
-- Jared Still Certifiable Oracle DBA and Part Time Perl Evangelist -- http://www.freelists.org/webpage/oracle-lReceived on Thu Aug 18 2005 - 11:06:08 CDT
![]() |
![]() |