Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / July 2006

Tip: Looking for answers? Try searching our database.

How to modify a MySQL database...

Thread view: 
azsx - 04 Jul 2006 12:27 GMT
Please help me learn how can I create a MySQl database and then
modify/update it with Java. Please give me some helpfull code...
Alex Hunsley - 04 Jul 2006 14:45 GMT
> Please help me learn how can I create a MySQl database and then
> modify/update it with Java. Please give me some helpfull code...

There's this website called Google...
Rhino - 04 Jul 2006 14:58 GMT
> Please help me learn how can I create a MySQl database and then
> modify/update it with Java. Please give me some helpfull code...

Your questions are far too big to answer in detail in a newsgroup post.
There are many things that you need to learn before you can create databases
and then update them with Java.

This will get you started:

1. To learn how to create a MySQL database, visit the MySQL website.
Assuming that you have already downloaded and installed a fairly recent
version of MySQL, you can find the documentation on this page:
http://dev.mysql.com/doc/. As you'll see, you will have a choice between
several languages and formats for each of the recent versions of MySQL.
Click the appropriate links. You will probably want to look at Chapter 3,
Tutorial, first to learn the basics of connecting to the database, running
queries, creating the database etc. Bear in mind that they will show you how
to do these things from the MySQL command line, NOT from a Java program!

2. The technique most people use to communicate between Java and a MySQL
database is JDBC. Therefore, you will need to learn JDBC. You will need to
install a MySQL JDBC driver in your system. Then, you will be able to start
writing Java programs that talk with MySQL. Many people will create their
databases, tables, indexes etc. within MySQL and then limit their Java
programs to doing SELECT, INSERT, UPDATE, and DELETE against their database
but you can actually create your tables, indexes, and other database objects
in the Java program itself if you want to do so. If you do a Google search
on "JDBC Tutorial", you should find something that shows you the basic
techniques that you need for working with JDBC. Please bear in mind that
there are different versions of JDBC and the later versions of JDBC have
more capabilities - and more complexity - than the earlier versions.
Therefore, JDBC 3.0 does a lot more than JDBC 1.22. Be sure that your JDBC
tutorial is compatible with your JDBC driver. For example, if you do a JDBC
1.0 tutorial but have a JDBC 3.0 driver, your tutorial won't show you many
of the things that you can do.

If you have questions about using MySQL to create databases, tables, etc.,
the best place to ask those is in the MySQL mailings lists. Questions about
JDBC should be asked at comp.lang.java.databases.

--
Rhino
Mark Space - 05 Jul 2006 00:39 GMT
> Please help me learn how can I create a MySQl database and then
> modify/update it with Java. Please give me some helpfull code...

What Rhino said.  MySQL docs and JDBC is the answer.

SQL though is not a trivial subject.  You should approach it as if
learning a full language like Java or C++.  Take some time, take a
course if you have to, learn it right.
azsx - 06 Jul 2006 21:08 GMT
> SQL though is not a trivial subject.  You should approach it as if
> learning a full language like Java or C++.  Take some time, take a
> course if you have to, learn it right.

thanks. I know, but don't have time right now...
Timo Stamm - 06 Jul 2006 22:56 GMT
azsx schrieb:
>> SQL though is not a trivial subject.  You should approach it as if
>> learning a full language like Java or C++.  Take some time, take a
>> course if you have to, learn it right.
>
> thanks. I know, but don't have time right now...

That's a mistake. The additional time you will spend on development,
bugfixing and maintenance will be longer than the time it takes to learn
SQL.
vjg - 07 Jul 2006 19:48 GMT
> azsx schrieb:
> >> SQL though is not a trivial subject.  You should approach it as if
[quoted text clipped - 6 lines]
> bugfixing and maintenance will be longer than the time it takes to learn
> SQL.

There's never time to do it right.. but always time to do it over.
Timo Stamm - 07 Jul 2006 22:22 GMT
vjg schrieb:
>> azsx schrieb:
>>>> SQL though is not a trivial subject.  You should approach it as if
[quoted text clipped - 7 lines]
>
> There's never time to do it right.. but always time to do it over.

I would rather say there's never time to do it perfect. But it shouldn't
take too much time to read the mysql manual (or Rhinos posting) and
chose a right (not the perfect) way to update data in a table.

Timo


Free Magazines

Get 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 ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.