pg.ddx.io pgsql-interfaces@postgresql.org mailing list archive
help / color / mirror / Atom feedUsing BLOBs with several DBMS
9+ messages / 4 participants
[nested] [flat]
* Using BLOBs with several DBMS
@ 2001-05-29 14:04 Ricardo Maia <rjmaia@student.dei.uc.pt>
2001-06-08 05:30 ` Re: Using BLOBs with several DBMS Stephen Crawley <crawley@dstc.edu.au>
0 siblings, 1 reply; 9+ messages in thread
From: Ricardo Maia @ 2001-05-29 14:04 UTC (permalink / raw)
To: pgsql-interfaces
Hi,
I'm trying to make a application in JAVA that connects thought JDBC to DBMS.
It should create tables, insert data and make queries.
My question is: how can i create a table with one BLOB field, in a DBMS
independent way?
I am using PostgreSQL7.1 and Oracle 8 but I want to make it be able to work
with other DBMSs.
Thanks
Ricardo Maia
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: Using BLOBs with several DBMS
2001-05-29 14:04 Using BLOBs with several DBMS Ricardo Maia <rjmaia@student.dei.uc.pt>
@ 2001-06-08 05:30 ` Stephen Crawley <crawley@dstc.edu.au>
2001-06-08 11:48 ` Re: Using BLOBs with several DBMS Ricardo Maia <rmaia@criticalsoftware.com>
0 siblings, 1 reply; 9+ messages in thread
From: Stephen Crawley @ 2001-06-08 05:30 UTC (permalink / raw)
To: Ricardo Maia <rjmaia@student.dei.uc.pt>; +Cc: pgsql-interfaces; crawley@dstc.edu.au
> My question is: how can i create a table with one BLOB field, in a DBMS
> independent way?
>
> I am using PostgreSQL7.1 and Oracle 8 but I want to make it be able to work
> with other DBMSs.
It is difficult, because:
* Different versions of SQL use different names for the BLOB type.
* Some DBMS don't support blobs at all.
* Some DBMS treat blobs differently to other SQL types and
require you to use special APIs to access them.
* Not all JDBC drivers support the JDBC 2.0 Blob APIs. Of those
that do, many implement them in part only.
Given this mess, you've got two choices:
* Define a Java interface for all of your database interactions.
Create a different implementation for each DBMS you plan to support,
complete with embedded SQL statements, table schemas, etc.
* Define wrapper classes for JDBC, and try to isolate the DBMS
differences in "adapters". This (more or less) allows you to
share SQL statements / table schemas across DBMS, but it is
kind of hard getting the wrapper / adapter APIs right.
-- Steve
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: Using BLOBs with several DBMS
2001-05-29 14:04 Using BLOBs with several DBMS Ricardo Maia <rjmaia@student.dei.uc.pt>
2001-06-08 05:30 ` Re: Using BLOBs with several DBMS Stephen Crawley <crawley@dstc.edu.au>
@ 2001-06-08 11:48 ` Ricardo Maia <rmaia@criticalsoftware.com>
2001-06-20 02:57 ` Re: Using BLOBs with several DBMS Stephen Crawley <crawley@dstc.edu.au>
0 siblings, 1 reply; 9+ messages in thread
From: Ricardo Maia @ 2001-06-08 11:48 UTC (permalink / raw)
To: Stephen Crawley <crawley@dstc.edu.au>; Ricardo Maia <rjmaia@student.dei.uc.pt>; +Cc: pgsql-interfaces; crawley@dstc.edu.au
Thanks Stephen.
Maybe I'll follow your second sugestion ...
Do you kown any JDBC Drivers (even if comercial) for PostgreSQL and/or Oracle
that implements fully the Blobs API?
Ricardo Maia
On Friday 08 June 2001 06:30, Stephen Crawley wrote:
> > My question is: how can i create a table with one BLOB field, in a DBMS
> > independent way?
> >
> > I am using PostgreSQL7.1 and Oracle 8 but I want to make it be able to
> > work with other DBMSs.
>
> It is difficult, because:
>
> * Different versions of SQL use different names for the BLOB type.
>
> * Some DBMS don't support blobs at all.
>
> * Some DBMS treat blobs differently to other SQL types and
> require you to use special APIs to access them.
>
> * Not all JDBC drivers support the JDBC 2.0 Blob APIs. Of those
> that do, many implement them in part only.
>
> Given this mess, you've got two choices:
>
> * Define a Java interface for all of your database interactions.
> Create a different implementation for each DBMS you plan to support,
> complete with embedded SQL statements, table schemas, etc.
>
> * Define wrapper classes for JDBC, and try to isolate the DBMS
> differences in "adapters". This (more or less) allows you to
> share SQL statements / table schemas across DBMS, but it is
> kind of hard getting the wrapper / adapter APIs right.
>
> -- Steve
>
>
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
--
----------------------
Critical Software, SA
Urbanização Quinta da Fonte
Lote 15, TZ, r/c H
3030 Coimbra
Telef.: 239 708 520
Telem.: 938 314 605
----------------------
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: Using BLOBs with several DBMS
2001-05-29 14:04 Using BLOBs with several DBMS Ricardo Maia <rjmaia@student.dei.uc.pt>
2001-06-08 05:30 ` Re: Using BLOBs with several DBMS Stephen Crawley <crawley@dstc.edu.au>
2001-06-08 11:48 ` Re: Using BLOBs with several DBMS Ricardo Maia <rmaia@criticalsoftware.com>
@ 2001-06-20 02:57 ` Stephen Crawley <crawley@dstc.edu.au>
0 siblings, 0 replies; 9+ messages in thread
From: Stephen Crawley @ 2001-06-20 02:57 UTC (permalink / raw)
To: Ricardo Maia <rmaia@criticalsoftware.com>; +Cc: Stephen Crawley <crawley@dstc.edu.au>; Ricardo Maia <rjmaia@student.dei.uc.pt>; pgsql-interfaces; crawley@dstc.edu.au
> Do you kown any JDBC Drivers (even if comercial) for PostgreSQL and/or Oracle
> that implements fully the Blobs API?
The latest Oracle JDBC drivers support the JDBC2 Blobs API, but I don't know
of any that support the API for PostgreSQL.
-- Steve
^ permalink raw reply [nested|flat] 9+ messages in thread
* Using BLOBs with several DBMS
@ 2001-05-29 14:09 Ricardo Maia <rmaia@criticalsoftware.com>
2001-05-30 15:00 ` Re: Using BLOBs with several DBMS Manika dey <bithi@ipr.res.in>
0 siblings, 1 reply; 9+ messages in thread
From: Ricardo Maia @ 2001-05-29 14:09 UTC (permalink / raw)
To: pgsql-interfaces
Hi,
I'm trying to make a application in JAVA that connects thought JDBC to DBMS.
It should create tables, insert data and make queries.
My question is: how can i create a table with one BLOB field, in a DBMS
independent way?
I am using PostgreSQL7.1 and Oracle 8 but I want to make it be able to work
with other DBMSs.
Thanks
Ricardo Maia
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: Using BLOBs with several DBMS
2001-05-29 14:09 Using BLOBs with several DBMS Ricardo Maia <rmaia@criticalsoftware.com>
@ 2001-05-30 15:00 ` Manika dey <bithi@ipr.res.in>
2001-05-30 10:23 ` Re: Using BLOBs with several DBMS Ricardo Maia <rmaia@criticalsoftware.com>
2001-05-30 15:52 ` Re: Using BLOBs with several DBMS Manika dey <bithi@ipr.res.in>
0 siblings, 2 replies; 9+ messages in thread
From: Manika dey @ 2001-05-30 15:00 UTC (permalink / raw)
To: Ricardo Maia <rmaia@criticalsoftware.com>; +Cc: pgsql-interfaces
Hi,
Declare the field type as oid for which you
want it to be type blob.
we can surely create and update table with type
blob using jdbc.
manika
-------------------------------------------------------------------
From:- |
Ms. Manika Dey. |Ph.No:--
Engineer-SC (Comp. Tech.) | IPR -- 02712 - 69276
I.P.R | EXT 336,315
BHAT, GANDHINAGAR | Residence -- 079 - 6745701
Gujrat -- 382 428 | FAX --- 69017
------------------------------------------------------------------
On Tue, 29 May 2001, Ricardo Maia wrote:
>
> Hi,
>
>
> I'm trying to make a application in JAVA that connects thought JDBC to DBMS.
> It should create tables, insert data and make queries.
>
> My question is: how can i create a table with one BLOB field, in a DBMS
> independent way?
>
> I am using PostgreSQL7.1 and Oracle 8 but I want to make it be able to work
> with other DBMSs.
>
>
> Thanks
>
> Ricardo Maia
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: Using BLOBs with several DBMS
2001-05-29 14:09 Using BLOBs with several DBMS Ricardo Maia <rmaia@criticalsoftware.com>
2001-05-30 15:00 ` Re: Using BLOBs with several DBMS Manika dey <bithi@ipr.res.in>
@ 2001-05-30 10:23 ` Ricardo Maia <rmaia@criticalsoftware.com>
2001-05-31 14:31 ` Re: Using BLOBs with several DBMS Manika dey <bithi@ipr.res.in>
1 sibling, 1 reply; 9+ messages in thread
From: Ricardo Maia @ 2001-05-30 10:23 UTC (permalink / raw)
To: Manika dey <bithi@ipr.res.in>; +Cc: pgsql-interfaces
Hi,
I didn't want to burn a SQL type in the application code. Because if I use
PostgreSQL a BLOB is named as "oid" in Oracle is "long raw" and other BDMS can
name it diferently.
I am looking for a solution that at runtime connects to the DBMS and find out
what SQL type corresponds to BLOB and then create a table with a field of
that type.
Ricardo Maia
On Wednesday 30 May 2001 16:00, Manika dey wrote:
> Hi,
> Declare the field type as oid for which you
> want it to be type blob.
> we can surely create and update table with type
> blob using jdbc.
>
> manika
>
>
>
>
> -------------------------------------------------------------------
>
> From:- |
> Ms. Manika Dey. |Ph.No:--
> Engineer-SC (Comp. Tech.) | IPR -- 02712 - 69276
> I.P.R | EXT 336,315
> BHAT, GANDHINAGAR | Residence -- 079 - 6745701
> Gujrat -- 382 428 | FAX --- 69017
> ------------------------------------------------------------------
>
> On Tue, 29 May 2001, Ricardo Maia wrote:
> > Hi,
> >
> >
> > I'm trying to make a application in JAVA that connects thought JDBC to
> > DBMS. It should create tables, insert data and make queries.
> >
> > My question is: how can i create a table with one BLOB field, in a DBMS
> > independent way?
> >
> > I am using PostgreSQL7.1 and Oracle 8 but I want to make it be able to
> > work with other DBMSs.
> >
> >
> > Thanks
> >
> > Ricardo Maia
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 4: Don't 'kill -9' the postmaster
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: Using BLOBs with several DBMS
2001-05-29 14:09 Using BLOBs with several DBMS Ricardo Maia <rmaia@criticalsoftware.com>
2001-05-30 15:00 ` Re: Using BLOBs with several DBMS Manika dey <bithi@ipr.res.in>
2001-05-30 10:23 ` Re: Using BLOBs with several DBMS Ricardo Maia <rmaia@criticalsoftware.com>
@ 2001-05-31 14:31 ` Manika dey <bithi@ipr.res.in>
0 siblings, 0 replies; 9+ messages in thread
From: Manika dey @ 2001-05-31 14:31 UTC (permalink / raw)
To: Ricardo Maia <rmaia@criticalsoftware.com>; +Cc: pgsql-interfaces
Hi,
I didnot try it that way, since my application
was using java and postgresql , i used blob type.
But the way you are looking is definitely a better
idea to solve the problem for all other database .
In SQLServer we use type text for large data.
If you arrive at solution i would also like know
about it.
Thanks
manika
-------------------------------------------------------------------
From:- |
Ms. Manika Dey. |Ph.No:--
Engineer-SC (Comp. Tech.) | IPR -- 02712 - 69276
I.P.R | EXT 336,315
BHAT, GANDHINAGAR | Residence -- 079 - 6745701
Gujrat -- 382 428 | FAX --- 69017
------------------------------------------------------------------
On Wed, 30 May 2001, Ricardo Maia wrote:
>
> Hi,
>
> I didn't want to burn a SQL type in the application code. Because if I use
> PostgreSQL a BLOB is named as "oid" in Oracle is "long raw" and other BDMS can
> name it diferently.
>
> I am looking for a solution that at runtime connects to the DBMS and find out
> what SQL type corresponds to BLOB and then create a table with a field of
> that type.
>
>
> Ricardo Maia
>
> On Wednesday 30 May 2001 16:00, Manika dey wrote:
> > Hi,
> > Declare the field type as oid for which you
> > want it to be type blob.
> > we can surely create and update table with type
> > blob using jdbc.
> >
> > manika
> >
> >
> >
> >
> > -------------------------------------------------------------------
> >
> > From:- |
> > Ms. Manika Dey. |Ph.No:--
> > Engineer-SC (Comp. Tech.) | IPR -- 02712 - 69276
> > I.P.R | EXT 336,315
> > BHAT, GANDHINAGAR | Residence -- 079 - 6745701
> > Gujrat -- 382 428 | FAX --- 69017
> > ------------------------------------------------------------------
> >
> > On Tue, 29 May 2001, Ricardo Maia wrote:
> > > Hi,
> > >
> > >
> > > I'm trying to make a application in JAVA that connects thought JDBC to
> > > DBMS. It should create tables, insert data and make queries.
> > >
> > > My question is: how can i create a table with one BLOB field, in a DBMS
> > > independent way?
> > >
> > > I am using PostgreSQL7.1 and Oracle 8 but I want to make it be able to
> > > work with other DBMSs.
> > >
> > >
> > > Thanks
> > >
> > > Ricardo Maia
> > >
> > > ---------------------------(end of broadcast)---------------------------
> > > TIP 4: Don't 'kill -9' the postmaster
>
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: Using BLOBs with several DBMS
2001-05-29 14:09 Using BLOBs with several DBMS Ricardo Maia <rmaia@criticalsoftware.com>
2001-05-30 15:00 ` Re: Using BLOBs with several DBMS Manika dey <bithi@ipr.res.in>
@ 2001-05-30 15:52 ` Manika dey <bithi@ipr.res.in>
1 sibling, 0 replies; 9+ messages in thread
From: Manika dey @ 2001-05-30 15:52 UTC (permalink / raw)
To: Manika dey <bithi@ipr.res.in>; +Cc: Ricardo Maia <rmaia@criticalsoftware.com>; pgsql-interfaces
Hi,
Declare the field type as oid for which you
want it to be type blob.
we can surely create and update table with type
blob using jdbc.
manika
>
>
>
>
> -------------------------------------------------------------------
>
> From:- |
> Ms. Manika Dey. |Ph.No:--
> Engineer-SC (Comp. Tech.) | IPR -- 02712 - 69276
> I.P.R | EXT 336,315
> BHAT, GANDHINAGAR | Residence -- 079 - 6745701
> Gujrat -- 382 428 | FAX --- 69017
> ------------------------------------------------------------------
>
>
>
>
>
>
>
>
> On Tue, 29 May 2001, Ricardo Maia wrote:
>
> >
> > Hi,
> >
> >
> > I'm trying to make a application in JAVA that connects thought JDBC to DBMS.
> > It should create tables, insert data and make queries.
> >
> > My question is: how can i create a table with one BLOB field, in a DBMS
> > independent way?
> >
> > I am using PostgreSQL7.1 and Oracle 8 but I want to make it be able to work
> > with other DBMSs.
> >
> >
> > Thanks
> >
> > Ricardo Maia
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 4: Don't 'kill -9' the postmaster
> >
>
>
^ permalink raw reply [nested|flat] 9+ messages in thread
end of thread, other threads:[~2001-06-20 02:57 UTC | newest]
Thread overview: 9+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-05-29 14:04 Using BLOBs with several DBMS Ricardo Maia <rjmaia@student.dei.uc.pt>
2001-06-08 05:30 ` Stephen Crawley <crawley@dstc.edu.au>
2001-06-08 11:48 ` Ricardo Maia <rmaia@criticalsoftware.com>
2001-06-20 02:57 ` Stephen Crawley <crawley@dstc.edu.au>
2001-05-29 14:09 Using BLOBs with several DBMS Ricardo Maia <rmaia@criticalsoftware.com>
2001-05-30 15:00 ` Manika dey <bithi@ipr.res.in>
2001-05-30 10:23 ` Ricardo Maia <rmaia@criticalsoftware.com>
2001-05-31 14:31 ` Manika dey <bithi@ipr.res.in>
2001-05-30 15:52 ` Manika dey <bithi@ipr.res.in>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox