How to modify a MySQL database...

A

azsx

Please help me learn how can I create a MySQl database and then
modify/update it with Java. Please give me some helpfull code...
 
A

Alex Hunsley

azsx said:
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...
 
R

Rhino

azsx said:
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.
 
M

Mark Space

azsx said:
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.
 
A

azsx

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

Timo Stamm

azsx said:
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.
 
V

vjg

Timo said:
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.

There's never time to do it right.. but always time to do it over.
 
T

Timo Stamm

vjg said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,681
Members
48,796
Latest member
Greg L.

Latest Threads

Top