Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: HELP : Using multiple LONG fields in one table

Re: HELP : Using multiple LONG fields in one table

From: Matthias Gresz <GreMa_at_t-online.de>
Date: 1997/11/14
Message-ID: <64h1na$j3r$1@news00.btx.dtag.de>#1/1

sector Sociale Zaken wrote:
>
> Hi all,
>
> Is it possible to use multiple LONG fields in one table.
>
> We have (in a DB2 database) a table called TXTFIELDS
> containing 5 fields of the long datatype; these fields
> must be able to contain approx. 5000 characters each.
>
> We are going to migrate the DB2/6000 database to a
> Oracle 7.3.3 database on Windows NT.
> On creating the Oracle tables we found out that a table
> can only contain one Long field.
>
> The only solution we found out was creating 5 tables,
> each containing one Long field.
> The problem then is that we have to adjust the SQL
> staements for the insert and update procedures.
>
> Is there a workaround for this, so we don't have to modify
> our SQL statements when inserting or updating rows in
> the 5 tables.
>
> Any help is appreciated,
>
> Greetings,
>
> Bart H.M. Verwijst
>
> for E-mail reply, please use the address below
> ===============================================
> Bart H.M. Verwijst
> Software Development Manager
>
> Sector Sociale Zaken Tilburg - The Netherlands
> Phone +31 (0)13 542 92 61
> Fax +31 (0)13 542 97 10
> Mobile +31 06 53 87 15 47
> E-mail : superdev_at_pi.net
> ===============================================
Hi,

as I think your migration from db2 to oracle should take as less time as possible so you intend to migrate your data modell as it is and implement this in oracle, right?

Some questions?

  1. Isn't it allmost a one to many relationship between your entity and the five text fields which at the moment is reduced to a 'one to five'? Like your modell can held only 5 letters or something like this?
  2. Wouldn't it be the better way to have a separate table containing a l l text-issues with a fk into yout entity? Allowing thus to keep as many information you want.
  3. do your realy need 5000 characters in your text field or aren't 2000 suffisant so that you can use varchar2-fields?

If you'll take the way to create five tables containing the fk and a long field for your texts then create a view to diplay the five text-fields as well as the other entity-attributes. This view won't be updateble!

-- 
Regards

Matthias Gresz    :-)
Received on Fri Nov 14 1997 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US