Thread: Using BLOBs with several DBMS

Using BLOBs with several DBMS

From
Ricardo Maia
Date:
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


Re: Using BLOBs with several DBMS

From
Ricardo Maia
Date:
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


Re: Using BLOBs with several DBMS

From
Manika dey
Date:
Hi, I didnot try it that way, since my application was using java and postgresql , i used blob type. But the way you
arelooking is definitely a betteridea to solve the problem for all other database .In SQLServer we use type text for
largedata.
 
If you arrive at solution i would also like knowabout it.

Thanks 
manika

-------------------------------------------------------------------

From:-                          | Ms. Manika Dey.                |Ph.No:--Engineer-SC (Comp. Tech.)      | IPR -- 02712
-69276 I.P.R                          |          EXT 336,315BHAT, GANDHINAGAR              | Residence -- 079 -
6745701Gujrat-- 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
> 



Re: Using BLOBs with several DBMS

From
Manika dey
Date:
Hi,Declare the field type as oid for which youwant it to be type blob. we can surely create and update table with type
blobusing jdbc.
 

manika



-------------------------------------------------------------------

From:-                          | Ms. Manika Dey.                |Ph.No:--Engineer-SC (Comp. Tech.)      | IPR -- 02712
-69276 I.P.R                          |          EXT 336,315BHAT, GANDHINAGAR              | Residence -- 079 -
6745701Gujrat-- 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
> 



Re: Using BLOBs with several DBMS

From
Manika dey
Date:

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
> > 
> 
> 



DBI::Pg problems

From
Chris Hayner
Date:
Good Morning All,

I am having all kinds of problems with the DBI::Pg module. Installing
(mistakenly) as root, everything works fine. However, when I redo the
install as a normal user as per the instructions i read a little late, I
get the following error message.


ld.so.1: perl: fatal: relocation error: file
/usr/local/lib/perl5/site_perl/5.6.0/sun4-solaris/auto/DBD/Pg/Pg.so:
symbol PQconnectdb: referenced symbol not found

Any assistance would be greatly appreciated.

--chris hayner



Re: DBI::Pg problems

From
Tom Lane
Date:
Chris Hayner <hayner80@astro.ocis.temple.edu> writes:
> ld.so.1: perl: fatal: relocation error: file
> /usr/local/lib/perl5/site_perl/5.6.0/sun4-solaris/auto/DBD/Pg/Pg.so:
> symbol PQconnectdb: referenced symbol not found

Looks like you need to teach your dynamic loader where to find libpq.so.
Dunno how that's done on Solaris.
        regards, tom lane


Re: DBI::Pg problems

From
Peter Eisentraut
Date:
Chris Hayner writes:

> ld.so.1: perl: fatal: relocation error: file
> /usr/local/lib/perl5/site_perl/5.6.0/sun4-solaris/auto/DBD/Pg/Pg.so:
> symbol PQconnectdb: referenced symbol not found

export LD_LIBRARY_PATH=/usr/local/pgsql/lib # or whereever

-- 
Peter Eisentraut   peter_e@gmx.net   http://funkturm.homeip.net/~peter



Re: DBI::Pg problems

From
Richard Poole
Date:
On Wed, Jun 06, 2001 at 08:01:14AM -0400, Chris Hayner wrote:
> Good Morning All,
> 
> I am having all kinds of problems with the DBI::Pg module. Installing
> (mistakenly) as root, everything works fine. However, when I redo the
> install as a normal user as per the instructions i read a little late, I
> get the following error message.
> 
> 
> ld.so.1: perl: fatal: relocation error: file
> /usr/local/lib/perl5/site_perl/5.6.0/sun4-solaris/auto/DBD/Pg/Pg.so:
> symbol PQconnectdb: referenced symbol not found
> 
> Any assistance would be greatly appreciated.

From the README to 0.96 or later:

> If you get an error message like:
>   perl: error while loading shared libraries:
>   /usr/lib/perl5/site_perl/5.6.0/i386-linux/auto/DBD/Pg/Pg.so: undefined
>   symbol: PQconnectdb
> when you call DBI->connect, then your libpq.so was probably not seen at
> build-time. This should have caused 'make test' to fail; did you really
> run it and look at the output? Check the setting of POSTGRES_LIB and
> recompile DBD-Pg.

That's off a Linux box but you seem to have the Solaris equivalent.
Quick reminder:

1 Set POSTGRES_INCLUDE and POSTGRES_LIB
2 perl Makefile.pl
3 make
4 make test
5 su
6 make install

Richard