• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

blob/clob management irrespective of DBMS vendor

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hello all,

i am implementing the content management tier of a j2ee web application. i am currently researching the possibility of implementing it such that it would be possible to use several database vendors (changing only the jdbc driver and the data source parameters). currently i am testing on oracle/mySql.

for blobs and clobs, there seems to be a different approach for oracle than mySql, but i might very well be missing something. that is:
oracle:
insert empty lob with the normal insert/update query.
select the lob field for update
write the data using the inputStream/writer in the returned class.

mySql:
pass the inputStream/writer to the prepared statement as parameter for the blob/clob field.

has anyone researched this before ? any oppinions ?

thank you very much for your time,
andrei
 
author
Posts: 4335
39
jQuery Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Good luck with that. It's really hard to create a JDBC program that works with any database. Have you considered a ORM tool?
 
andrei radu
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
yeap, but orm is not an option because older versions of database items should be saved for auditing purposes which means that there is no update or delete and it uses a custom primary key generation. in my oppinion these cannot be implemented as they are using orm.

later edit: and about the way, the program is not supposed to cover all particular features of all DBMSs. so far insertion/selection work for oracle and mySql and should work on others too as it's plain sql. if i get the blob/clob reading and writing to work the only job left would be to test on other database types (and figure out the data type differences for creation of the tables).

thanks for your answer
 
permaculture is a more symbiotic relationship with nature so I can be even lazier. Read tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic