[plug] Database advice - Newbie

Kirk Turner kirk.turner at wagoonline.com
Tue Jun 24 08:16:02 WST 2003


As someone who uses Java-<insert x database here> everyday I give it the
big thumbs up(tm). As was said Java uses JDBC which basically means that
the database on the backend can be whatever your comfortable with/have
experience with. We use both Oracle and MySQL, but have switched to
using MySQL in more of our projects simply because of runtime licence
costs ~$30,000 per year compared to $600 once off (from memory) - also
depending on the usage MySQL could be free.

The main thing to remember about JDBC is that some of its functions
aren't supported by certain databases (ie MySQL does not support
commit/rollback functionality) so these methods are obsolete in the
MySQL implementation.

Java servlets and JSP are also easy to get your head around if you have
some experience with Java. One thing I like about Java is that the
documentation is good, so you can generally find a tutorial on what you
need on the web. Also there are multiple good books about - a couple we
have in the office are:
	Instant Java Servlets by Phil Hanna
	Using Java Server Pages and Servlets by Mark Wutka

I cant say how Java compares to PHP and Python as I haven't really used
the other two.

Setting up Java/Tomcat/MySQL on linux is quite easy... there are
packaged MySQLs for different distributions, and Java and Tomcat are a
case of uncompressing the data, setting a couple of environment
variables and your underway. The trickiest part if getting apache to
interact with tomcat, so that you don't have a non standard port to
access the servlets.

The one thing I've found a little lacking with MySQL is a good client. I
use either the command line client, or phpMyAdmin. If your on windows
I've fount MySQLFront good as well. Recent versions of mysql navigator
have been better than the old ones. Does anyone have some better
suggestions??

Hope that helps,

Kirk

On Tue, 2003-06-24 at 00:36, Craig Ringer wrote:
> >
> >
> >I need to set-up a database which will probably be standalone
> >application, but at short notice may need to be developed to web
> >database.
> >
> OK, ideally it won't matter much what DB you use. I believe that both 
> MySQL and PostgreSQL run on Windows, though you'll need to look into it 
> further. That is, if you're setting up on a Windows platform - you 
> didn't mention, but it sounded likely given the reccomended apps.
> 
> >Obviously I would prefer to use free/Linux software (my business partner
> >is less computer literate than I) and am thinking of postgresql with
> >Java  because we may also need to access data from other hardware
> >(various types of swipe cards and exercise equipment) - on a Linux
> >server.  Cost is also an issue, is it easy/quick for Java programmers
> >and is it the best option.
> >
> I think both PostgreSQL and MySQL have JDBC drivers, so you should be 
> alright on the interface to the (java-based) client app. Avoid MySQL 3, 
> since it lacks some significant features like transactions and subqueries.
> 
> I haven't worked much with Java, so I can't say for sure how well 
> maintained these projects are, but they'll provide the JDBC interface 
> you'll need:
> 
> http://jdbc.postgresql.org/
> http://www.mysql.com/downloads/api-jdbc-stable.html
> 
> It should be as simple as installing the database onto the host, setting 
> up JDBC, and starting work. Certainly it's that easy when working with 
> those databases under Linux with languages like Python and PHP - most 
> distros have everything packaged in a fully set-up state. I don't know 
> how much fuss you'll encounter installing and setting up on Windows, but 
> I don't expect it'll be excessive. MySQL has an installer for win32, so 
> presumably that won't be much fuss. I don't know the status of a native 
> PostgreSQL port for Windows - there is one, or was, but I don't know any 
> more.
> 
> I'd be inclined to suggest MySQL 4 if you are going to to run the DB 
> server under Windows, or pick either if the DB server is to run under a 
> *NIX host.
> 
> It should be easy enough that you can download the software and just try 
> it out with a few sample Java apps that talk to a database.
> 
> Craig Ringer
-- 
Kirk Turner <kirk.turner at wagoonline.com>
Software Engineer
WA Go Online Pty. Ltd.
Suite 5, 1 Sarich Way
Bentley WA 6102
Australia

-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

mQGiBD6RSIgRBACRm7YZuE3hss6monmfVnGtOmDW2esXRp53AOiU0XAUnEQFtQCA
Iyhw+SwY5sbd94SzUTPveYOKRmLBSdaZqXrh5m1Kxe8f686bf6AKs1cvfOuzRPim
IozAso//ouq3G50PLWjIYTy7JYdz9MYCOG1K3loT3FhZh+2JO04+B71LgwCgzyP3
jWDynm7TrtUoY1XtDfAMkIED/in2XZqhuPU0zfwrpy3JGwk6Blj6+9RwwLCZI/ZV
kSQi37ftycNHxpFHtGdw9rTQqNuO3SHiuwIvtEa20m19QTOcd7OQV3zqAZDHNCim
07htCmVEzSSIVXcjEhLZl+wK5n474wgl9ASy+JnYj7vJEs6GehRTnwPF6pVTGzEX
Z0TpA/9NgzB9sRFDYr/D2fbcO2+0H1KX+x/kxoI2pfIQjt4c94EsQhX6F/5Q4FYA
iAVpcfR9/iSVOeldTT/Z5FlnRx8gIdDnT/dqccUXyahbFeZEr8pyCcj1sNb7Omox
iOoQuk2dK3qG+Qd4RfOpvpwyZoJOKN/QnyD1XSxNp76sSqImPbQ8S2lyayBUdXJu
ZXIgKFNvZnR3YXJlIEVuZ2luZWVyKSA8a2lyay50dXJuZXJAd2Fnb29ubGluZS5j
b20+iFcEExECABcFAj6RSIgFCwcKAwQDFQMCAxYCAQIXgAAKCRDAXmWE4BNAB0VB
AKCZQKI7pKW8aGshkYxIqcie+vILWQCfTyzCBiPPbnCqgdk8WfSZqlwp/LC5AQ0E
PpFIihAEALSMzB6GiCRh36bwg+/+o+N3RBlx2NhxNvRXiFVLNyeUsq19ZwK8sdX+
mrc/2e75Y5iakdOkIu5hQ5qEcp/OBm+RCP0kUgNmwSjydbYYNlgH/j2CNIaxPp1n
OxmtFaPfYN0eP67oUOpfSgViJh4HWgR7421WjPuZ0+lN0Weaoq8fAAMFA/4uJpt2
2AIqRYUAhLn4ag1X6uwwL8Y2zRMJKKE9mHz/nWqpL4QvMceVcGa3OKI6oR9sXONi
9szHpY1htVnieO3vXShVukmMW6eAK1KgnOXihTf++Z2CHgKBj9ueatOA7kxOYwsF
ZmVB4xo5ja3xxdfuj9Ec/GT18HgT17vOPYZGR4hGBBgRAgAGBQI+kUiKAAoJEMBe
ZYTgE0AHf7IAoKl67G9GT6RWJsjpOMeb89Sudb85AJ9Bl4nvDKTIVBYsczg5oZru
ORxHaA==
=XU88
-----END PGP PUBLIC KEY BLOCK-----


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.plug.org.au/pipermail/plug/attachments/20030624/117d5a31/attachment.pgp>


More information about the plug mailing list