Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news-1.dfn.de!news.dfn.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Kevin Nathan Newsgroups: comp.lang.java.databases Subject: Re: Local database library Date: Sat, 26 Oct 2013 18:58:08 -0700 Lines: 34 Message-ID: <20131026185808.4871c557@efreet.linux> References: <20131001135230.66af12f9@efreet.linux> <20131004110242.1be4f5ea@efreet.linux> <20131005120659.39a89f3b@efreet.linux> <20131026120811.1a9bc341@efreet.linux> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Trace: individual.net G+Br18KNEnITuKHZ0qdzyQt3FWiYf+9aGJqY1Hp8h/wB1ElLAg Cancel-Lock: sha1:ElY1axfiO/Zk9oMr28CStbdcZV0= X-Newsreader: Claws Mail 3.9.0 (GTK+ 2.24.18; i586-suse-linux-gnu) X-Face: %/gp4MCQT=`#JS##?-]V9ksid6OSR@(wbF"bK6wSLO$u,%(N@X~bVhAD+\A_[gRhx*T6=fq "N_5H8.v[&;q0iw!s_wuL05B0xg#OYUkbn#@&U_]fL%o==~2sphc?*L+bicO!POJLG#p'N.]J0/p_w Z^(.kOB%Ob914-V>?GI; Xref: csiph.com comp.lang.java.databases:646 On Sat, 26 Oct 2013 21:04:47 +0000 (UTC) Martin Gregorie wrote: >No, don't do that. > >As I said earlier, put all your SQL into one class. > >But, before doing anything *collect all the queries* and look at them >- you'll probably find several that are common to all programs and >that, with minor tweaks such as adjusting the attribute list, can be >combined. > >Actually, once you've collected the SQL statements and looked at them, >the way you'll want to group them into classes should become obvious. > We have, roughly, 20 classes in C++ dealing with just under 40 tables, so I believe they have it broken up about right. Give me a few days to put together a small sample of what they were doing in C++ and how I'd like to implement it in Java (and, how part of it is already implemented in Java). My main problem is my unfamiliarity with Java, which is slowly improving each day. I will see if I can't explain it better with a simple example... -- Kevin Nathan (Arizona, USA) Linux is not a destination, it's a journey -- enjoy the trip! Linux 3.7.10-1.16-desktop 18:43pm up 38 days 4:56, 15 users, load average: 0.67, 0.69, 0.61