[comp.databases] LONG data type in Oracle

brinkema@fjcnet.GOV (John R. Brinkema) (09/27/89)

Oracle has two data types LONG and LONG RAW, which are designed to hold very
long byte strings (up to 64K; interpreted and uninterpreted, respectively).

These data types are not in standard SQL.  Are they (or the equivalent to store
clots of strange bytes) available in any other relational/SQL database systems
(eg. Sybase, Ingres, etc)?

Long byte strings are *very* useful for misc. text and wierd things (relative
to SQL anyway) like binary picture.
						tia. jb.

jkrueger@daitc.daitc.mil (Jon Krueger) (09/27/89)

brinkema@fjcnet.GOV (John R. Brinkema) writes:

>Oracle has two data types LONG and LONG RAW, which are designed to hold very
>long byte strings (up to 64K; interpreted and uninterpreted, respectively).

>These data types are not in standard SQL.  Are they (or the equivalent to store
>clots of strange bytes) available in any other relational/SQL database systems
>(eg. Sybase, Ingres, etc)?

All commercial DBMS have similar types now or will have them in the near future.

>Long byte strings are *very* useful for misc. text and wierd things (relative
>to SQL anyway) like binary picture.

Long byte strings are second class citizens in Oracle.  You cannot select,
join, pattern match, or index on them, or substrings of them.  They cannot
appear in the WHERE clause of any SQL query.  This is not a data type; this
is shared storage.

-- Jon
-- 
Jonathan Krueger    jkrueger@daitc.daitc.mil   uunet!dgis!jkrueger
Isn't it interesting that the first thing you do with your
color bitmapped window system on a network is emulate an ASR33?

dg@sisyphus.sybase.com (David Gould) (09/28/89)

In article <203@fjcp60.GOV> brinkema@fjcnet.GOV (John R. Brinkema) writes:
>Oracle has two data types LONG and LONG RAW, which are designed to hold very
>long byte strings (up to 64K; interpreted and uninterpreted, respectively).
>
>These data types are not in standard SQL.  Are they (or the equivalent to store
>clots of strange bytes) available in any other relational/SQL database systems
>(eg. Sybase, Ingres, etc)?
>
>Long byte strings are *very* useful for misc. text and wierd things (relative
>to SQL anyway) like binary picture.
>						tia. jb.

In the current shipping release of Sybase (4.0) we support TEXT and IMAGE
datatypes, which are character and arbitrary binary columns of up to two
gigabytes in size.  They are intended for documents or pictures
(eg. X-ray images) and such.
					- dg

------  All opinions are mine and may or may not represent Sybase Inc.  ------
David Gould       dg@sybase.com        {sun,lll-tis,pyramid,pacbell}!sybase!dg
                  (415) 596-3414      6475 Christie Ave.  Emeryville, CA 94608

tim@binky.sybase.com (Tim Wood) (09/28/89)

In article <203@fjcp60.GOV> brinkema@fjcnet.GOV (John R. Brinkema) writes:
>Oracle has two data types LONG and LONG RAW, which are designed to hold very
>long byte strings (up to 64K; interpreted and uninterpreted, respectively).
>
>These data types are not in standard SQL.  Are they (or the equivalent to store
>clots of strange bytes) available in any other relational/SQL database systems
>(eg. Sybase, Ingres, etc)?

Sybase supports TEXT and IMAGE datatypes.  These are almost identical
in implementation, but different in concept.  TEXT is for large documents
represented by character bytes.  IMAGE is raw binary data--bit-map screen 
dumps, digital audio, digital video, communication packet, etc.  
The maximum size of a single TEXT or IMAGE value is 2 ** 31 (2GB).
-TW


Sybase, Inc. / 6475 Christie Ave. / Emeryville, CA / 94608	  415-596-3500
tim@sybase.com          {pacbell,pyramid,sun,{uunet,ucbvax}!mtxinu}!sybase!tim
Voluntary disclaimer: This message is solely my personal opinion.
		      It is not a representation of Sybase, Inc.  OK.

ramiro@dopey.sybase.com (Ramiro Acha) (09/28/89)

In article <203@fjcp60.GOV> brinkema@fjcnet.GOV (John R. Brinkema) writes:
>Oracle has two data types LONG and LONG RAW, which are designed to hold very
>long byte strings (up to 64K; interpreted and uninterpreted, respectively).
>
>These data types are not in standard SQL.  Are they (or the equivalent to store
>clots of strange bytes) available in any other relational/SQL database systems
>(eg. Sybase, Ingres, etc)?
>
Yes. Sybase SQL Server 4.0, the current production version, supports TEXT and
IMAGE data types, which can hold 2^31 bytes of data. That's right, that's
billions of bytes...
>						tia. jb.

bsa@telotech.UUCP (Brandon S. Allbery) (09/29/89)

Informix is supposed to be adding types like these in the next release.  Unify
has TEXT and BINARY, and I don't think they have *any* limit (not even 64K).
IBM's DB2 and SQL/DS have long text and binary types (I forget the
designations, but they're differerent in SQL/DS and in DB2).  I'm not familiar
enough with other relationals to comment on them, except that last time I
checked, Progress didn't support either.

++Brandon
-- 
-=> Brandon S. Allbery @ telotech, inc.   (I do not speak for telotech.) <=-
Any comp.sources.misc postings sent to this address will be DISCARDED -- use
allbery@uunet.UU.NET instead. My boss doesn't pay me to moderate newsgroups.
** allbery@NCoast.ORG ** uunet!hal.cwru.edu!ncoast!{allbery,telotech!bsa} **

bsa@telotech.UUCP (Brandon S. Allbery) (09/29/89)

In article <640@daitc.daitc.mil>, jkrueger@daitc (Jon Krueger) writes:
+---------------
| Long byte strings are second class citizens in Oracle.  You cannot select,
| join, pattern match, or index on them, or substrings of them.  They cannot
| appear in the WHERE clause of any SQL query.  This is not a data type; this
| is shared storage.
+---------------

This is true of every relational DBMS with which I'm familiar.  I'm working on
this, though:  there is a set of hooks for Unify's Accell 1.4 which supports
text fields, and I'm working on expanded support for both Accell 1.4 and
Unify 2000/Accell SQL.  (The latter after they ship it to us in (I hope)
December.)  This support will include format-independence and will hopefully
be easily portable to other DBMS packages; at least, I'm trying to achieve
that.

++Brandon
-- 
-=> Brandon S. Allbery @ telotech, inc.   (I do not speak for telotech.) <=-
Any comp.sources.misc postings sent to this address will be DISCARDED -- use
allbery@uunet.UU.NET instead. My boss doesn't pay me to moderate newsgroups.
** allbery@NCoast.ORG ** uunet!hal.cwru.edu!ncoast!{allbery,telotech!bsa} **