Re: Normalisation
Date: Wed, 6 Jul 2005 10:32:38 +0200
Message-ID: <MPG.1d35b08b3efd14a69896e5_at_news.ntnu.no>
In article <PwBye.138032$Nn7.7012386_at_phobos.telenet-ops.be>,
jan.hidders_at_REMOVETHIS.pandora.be says...
> > Does it matter whether my unnest_string is system defined (by the DBMS)
> > or user-defined?
>
> Yes.
> Note btw. that if user-defined functions are restricted to the
> domains (their input and output types are only domains) then you cannot
> define such an operation as a user-defined function.
First, I derive an array of tuples from IN, in order to iterate over it. Alternatively, I use a cursor; the point is to access tuples one at a time.
For each tuple T, I look at the string value S of attribute A.
For each character C in S (I use length and substring operators here), I insert a tuple into OUT (if it is not already there), consisting of the tuple T without A, but with a new attribute B, the value of which is C for the new tuple in question.
Is there anything wrong with this?
-- JonReceived on Wed Jul 06 2005 - 10:32:38 CEST