Java Forum / Databases / May 2004
MySQl-database
Simonne De Ryck - 13 May 2004 18:52 GMT Hi,
I want to use for my app an MySql-database. (I have been told that this is an good one to use). Because I never have used this before, I would like to know what are your experiences whit this. And what do I need to download to get started with this. Because on the site I saw that there are different things and versions that can be downloated.
Thanks in advance. Els
Flip - 13 May 2004 19:51 GMT > Because I never have used this before, I would like to know what are your > experiences whit this. I liked it! :> It's no Microsoft SQLServer, but you get quite a bit for the price (FREE! :>). You will have a bit of a learning curve (maybe buy a book, or get good with googling for help), but it's something you can certainly do! Maybe other's will suggest something different, but for my first time, I started with the most recent stable version. That let me focus on the issues and think of them as my problem. My main concern with alpha/beta code or new languages/product is when I run into a problem, I can't figure out if it's ME or the product! So if you go with the stable vers, chances are, not 100%, but chances are it's you. That's a good thing, you can learn more and more. If it's product based, you're screwed until the next ver, so you want those issues to be learning curve related.
> And what do I need to download to get started with this. Because on the Most recent stable version. :>
Good luck.
perry - 13 May 2004 21:59 GMT the only other thing i can add to what he said is that you might consider developing your app on a Linux environment. not necessary but if your going to dabble in open source, you might as well get the full package.
it's possible to have multiple operating systems on your computer using a tool like System Commander. provided you additional disk space (typically 5 gig for a system like mandrake).
but if your happy with the windows environment, thats ok too
- perry
>>Because I never have used this before, I would like to know what are your >>experiences whit this. [quoted text clipped - 16 lines] > > Good luck. Flip - 14 May 2004 20:42 GMT > consider developing your app on a Linux environment. not necessary but Ironic! I'm actually running my environment in Linux. DOH! :> If you are Windows person (which I was), it is (uhm, sorry linux people) a potentially painful experience switching to linux/unix variants. It took me a while and a lot of frustration. It can be done though. With a lot of hard work I finally got my six websites up and running in linux. I still have to get email working on linux, but baby steps forward. :>
Good luck.
Chris Smith - 13 May 2004 20:33 GMT > I want to use for my app an MySql-database. (I have been told that this is > an good one to use). > Because I never have used this before, I would like to know what are your > experiences whit this. A few comments:
1. You should be either writing a GPL app or willing to pay a good bit to use this database. (This is legally and morally quite questionable, as MySQL has happily accepted donated work under the premise that they would stick with open-source licensing... but unless you intend to get yourself sued, it's still best to stay away). There are other alternatives (PostgreSQL is a very good one) that don't carry this legal baggage, and everything works exactly the same above the hood, except that PostgreSQL supports a lot more powerful kinds of SQL that will choke MySQL (at least unless you care to use an unstable alpha-release version of their software).
2. If you are writing a GPL app, MySQL is a great option for a fast database where data integrity doesn't matter (such as a chat board or something, where no one considers their posts to be worth much if lost). However, it requires a lot of hoops, including non-standard syntax, to get any kind of referential or transactional integrity. Not recommended for the non-expert.
> And what do I need to download to get started with this. Because on the > site I saw that there are different things and versions that can be > downloated. You need two things to use most *any* database with Java:
1. The database server. 2. A JDBC driver.
The versions should match on the two. You can download both from the MySQL web site. The JDBC driver needs to be accessible to the JRE, which can be done in a few ways: You can drop it in jre/lib/ext of the system you plan to run on, or you can add it to your CLASSPATH environment variable, or to the "-cp" option of your JRE, or if it's a web-app, drop it in WEB-INF/lib relative to the web-app root, or for an executable JAR list it in the Class-Path manifest attribute and then drop the driver in the same directory as the executable JAR.
Then you'll need to install the database server, and then get started with programming (there are plenty of JDBC tutorials on the web).
 Signature www.designacourse.com The Easiest Way to Train Anyone... Anywhere.
Chris Smith - Lead Software Developer/Technical Trainer MindIQ Corporation
David Harper - 14 May 2004 07:22 GMT > A few comments: [SNIP]
> 2. If you are writing a GPL app, MySQL is a great option for a fast > database where data integrity doesn't matter (such as a chat board or > something, where no one considers their posts to be worth much if > lost). However, it requires a lot of hoops, including non-standard > syntax, to get any kind of referential or transactional integrity. > Not recommended for the non-expert. That's not entirely correct. It's true that the MyISAM tables are non-transactional, but MySQL also provides InnoDB tables, which are fully transaction-safe, if your application needs that kind of thing.
Besides, I've been using MySQL for three years, putting my data into non-transactional MyISAM tables, and I have *never* lost data.
Let me add my own suggestion to Simonne. Get yourself a copy of the excellent MySQL book by Paul Dubois. It will help you to install MySQL and configure it, as well as providing a complete MySQL reference.
David Harper Cambridge, England
Chris Smith - 14 May 2004 13:56 GMT > > A few comments: > [SNIP] [quoted text clipped - 6 lines] > > That's not entirely correct. Well, I think it is...
> It's true that the MyISAM tables are > non-transactional, but MySQL also provides InnoDB tables, which are > fully transaction-safe, if your application needs that kind of thing. Yep, and creating InnoDB tables does indeed require non-standard syntax. The ANSI SQL standard doesn't specify any way to tell the database what "type" of table to create. Since the default is MyISAM, if you stick to standard SQL then you lose *both* transactions and foreign key constraints, meaning that both referential and transactional integrity can be lost.
This would be merely a pain if it weren't for the fact that when using MyISAM tables, transactions and foreign key constraints are *silently* ignored. That's what causes the final step to "experts only". I wonder how many applications are using MySQL and *think* that the database is protecting their data integrity, when it's really not.
> Besides, I've been using MySQL for three years, putting my data into > non-transactional MyISAM tables, and I have *never* lost data. Lucky you, but the database hasn't helped there at all. Obviously, you have the privilege of running well-written code in a closely controlled environment against that database.
Clearly, though, this is not acceptable for an enterprise-level application where there is definite business value that can be attached to data records, or where multiple different applications of different kinds are all interacting with a single data source. Hence, as I said, MySQL is great when you don't need to guarantee referential or transactional integrity, and you happen to be developing under the GPL.
I'm not recommending Simonne using MySQL... unless he is developing a non-GPL application, or needs the database to verify the integrity of his data.
 Signature www.designacourse.com The Easiest Way to Train Anyone... Anywhere.
Chris Smith - Lead Software Developer/Technical Trainer MindIQ Corporation
Chris Smith - 14 May 2004 15:47 GMT I wrote:
> I'm not recommending Simonne using MySQL... unless he is developing a > non-GPL application, or needs the database to verify the integrity of > his data. Oops... that should have read "I'm not recommending AGAINST Simonne using MySQL..."
 Signature www.designacourse.com The Easiest Way to Train Anyone... Anywhere.
Chris Smith - Lead Software Developer/Technical Trainer MindIQ Corporation
Free MagazinesGet these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...
|
|
|