Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.databases > #245

Re: Difference in JDBC re

Path csiph.com!x330-a1.tempe.blueboxinc.net!feeder1.hal-mli.net!feeder.news-service.com!feeder.news-service.com!proxad.net!feeder1-1.proxad.net!198.186.194.247.MISMATCH!news-out.readnews.com!transit3.readnews.com!news-out.news.tds.net!newsreading01.news.tds.net!86597e80!not-for-mail
From "Martin Gregorie" <martin.gregorie@THRWHITE.remove-dii-this>
Subject Re: Difference in JDBC re
Message-ID <gadla1$c87$2@localhost.localdomain> (permalink)
X-Comment-To comp.lang.java.databases
Newsgroups comp.lang.java.databases
In-Reply-To <317dcb86-f935-45ca-afbc-15f8e63252b2@d77g2000hsb.googlegroups.com><cd5a8be
References <317dcb86-f935-45ca-afbc-15f8e63252b2@d77g2000hsb.googlegroups.com><cd5a8be
Content-Type text/plain; charset=IBM437
Content-Transfer-Encoding 8bit
X-Gateway time.synchro.net [Synchronet 3.15a-Win32 NewsLink 1.92]
Lines 35
Date Wed, 27 Apr 2011 15:22:36 GMT
NNTP-Posting-Host 96.60.20.240
X-Complaints-To news@tds.net
X-Trace newsreading01.news.tds.net 1303917756 96.60.20.240 (Wed, 27 Apr 2011 10:22:36 CDT)
NNTP-Posting-Date Wed, 27 Apr 2011 10:22:36 CDT
Organization TDS.net
Xref x330-a1.tempe.blueboxinc.net comp.lang.java.databases:245

Show key headers only | View raw


  To: comp.lang.java.databases
On Thu, 11 Sep 2008 15:50:27 -0700, Tom Cole wrote:

> On Sep 11, 6:45-apm, Tom Cole <tco...@gmail.com> wrote:
>> We're using jTDS to connect to a backend SQL Server 2000 instance. The
>> connection is working fine.
>>
>> What we want to do is write a utility that will calculate maximum row
>> size for each table in a given database. The script we're using looks
>> something like this:
>>
>>
>> Any ideas what I'm doing wrong here?
>>
It looks to me as if your code is calculating the amount of space needed 
hold the data in a row but is ignoring overheads introduced by the DBMS 
such as padding between columns, index structures, length indication for 
a variable length column, etc.

As the overheads are implementation specific its probably not possible to 
calculate them using information returned by JDBC and almost certainly 
impossible to write a general solution. If the information can be 
retrieved at all it is likely to be in system tables which vary wildly in 
number, content and name between database implementations.


-- 
martin@   | Martin Gregorie
gregorie. | Essex, UK
org       |

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

Back to comp.lang.java.databases | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Difference in JDBC result "Tom Cole" <tom.cole@THRWHITE.remove-dii-this> - 2011-04-27 15:22 +0000
  Re: Difference in JDBC re "Martin Gregorie" <martin.gregorie@THRWHITE.remove-dii-this> - 2011-04-27 15:22 +0000
    Re: Difference in JDBC re "Tom Cole" <tom.cole@THRWHITE.remove-dii-this> - 2011-04-27 15:22 +0000
      Re: Difference in JDBC re "Silvio Bierman" <silvio.bierman@THRWHITE.remove-dii-this> - 2011-04-27 15:22 +0000
        Re: Difference in JDBC re "Tom Cole" <tom.cole@THRWHITE.remove-dii-this> - 2011-04-27 15:22 +0000
  Re: Difference in JDBC re "Martin Gregorie" <martin.gregorie@THRWHITE.remove-dii-this> - 2011-04-27 15:22 +0000

csiph-web