UNIX Socket FAQ

A forum for questions and answers about network programming on Linux and all other Unix-like systems

You are not logged in.

  • Index
  • » Java
  • » Plz help me to resolve the exception.....

#1 2006-08-16 06:35 AM

surya_jc
Member
Registered: 2006-07-18
Posts: 8

Re: Plz help me to resolve the exception.....

Offline

#2 2006-08-17 09:30 AM

thinking
Member
Registered: 2005-09-15
Posts: 103

Re: Plz help me to resolve the exception.....

Offline

#3 2006-08-18 10:45 PM

mlampkin
Administrator
From: Sol 3
Registered: 2002-06-12
Posts: 911
Website

Re: Plz help me to resolve the exception.....

May I humbly suggest... that you modify your tables for storage to something ( like ) the following:

int        ( id )
foreignkey ( self id )
int        ( block id )
blob       ( data )

Where the first col is a generated unique id... the foreign key is pointing back to an id of an object of the same type...  the block id is to allowed proper ordering of all blocks where id == self id == ( some value ) ...  more or less just a simplistic inode-ish type system...

The rational is that by limiting the data blob segment to a size that you know will work on ANY ( or a large number of ) db / driver combo impls... then it - in the end - makes it much simpler for any users / maintainers of the system... though it does add ( slightly ) more load on the db...

Of course...

I'm more of a defensive programmer than most... but there is a reason...  I've just had to suffer thru too many times where product 'A' required a specific dependency version... and product 'B' required the same dependency but a different version ( or range of versions )...  AND the thing was I wanted to use both products A and B but couldn't... so as a programmer I want users of my code to avoid the same sort of frustration if possible...


Michael


"The only difference between me and a madman is that I'm not mad."

Salvador Dali (1904-1989)

Offline

  • Index
  • » Java
  • » Plz help me to resolve the exception.....

Board footer

Powered by FluxBB