|
|
|
|
|
|
|
|
|
|
Easily connecting to MySQL databases from WebSphere Studio (continued)
FIGURE B
You can change the structure of the database if you use the Import to Folder feature. Click picture for a larger image.
You can also generate SQL DDL for a database. What does this mean? DDL stands for Data Definition Language, and using this feature will generate an SQL statement that can essentially recreate the structure (not content) of a database. To do this, right click on the name of a database or table and select Generate DDL. Be sure to check the box next to "Open SQL DDL file for editing when done" as shown in Figure C so you can immediately see the results of the generated SQL DDL.
FIGURE C
After you generate the DLL, you might want to open it for editing. Click picture for a larger image.
Connecting to MySQL databases using WebSphere Studio won't make you a database guru, but it will give you the power to examine databases from the comfort of your favorite IDE. Think of it like being able to program the universal remote control that is WebSphere Studio with one more button that will easily connect to your databases. I'll be sure to write more in future articles about other ways of managing your database connections. If you have any suggestions for database-related tips or any other WebSphere tips, I'd love to hear about them. You can reach me at dvelasco@webspherepower.com.
Bonus tip: getting the information and software you need to use MySQL The following are links for both more information about MySQL and the specific software you'll need to work with MySQL, such as the MySQL server software and MySQL database driver.
For official information, you might want to visit the MySQL website, also known as the official page of the "World's Most Popular Open Source Database." Set your browser to http://www.mysql.com.
If you want to download MySQL, it's free. We've tested version 3.23, which is at http://www.mysql.com/downloads/mysql-3.23.html. This is a tested and proven version of MySQL that will definitely work with WebSphere Studio. Newer versions (such as 4.0) may work but I haven't had the chance to test them.
You'll need Connector/J 3.0, the driver to connect to MySQL from Java. Contained in the download at http://www.mysql.com/downloads/api-jdbc-stable.html is a file called "mysql-connector-java-3.0.8-stable-bin.jar" that you'll point to in the Class location field of the Database Connection dialog box.
The MySQL Control Center, at http://www.mysql.com/products/mysqlcc/, is a GUI application that allows you to view and manage MySQL databases. The latest version as of this writing is version 0.9.3. While being able to view and manipulate databases from within WebSphere Studio somewhat minimizes the need for this tool, it is still a good application to take a look at and have in your toolbox.
Many of you may not know that the team at ZATZ uses MySQL for much of their data infrastructure, including keeping track of the WebSpherePower Magazine subscriber list and managing the ZATZ Online Store (at http://store.ZATZ.com). The MySQL Control Center is used almost every day and while it's sometimes a bit cranky, it can also be an amazing time saver.
[ Prev | Next ]
|
|
|
|
|
|
-- Advertisement --
EASY DEDICATED AND VIRTUAL DEDICATED SERVERS FOR AS LOW AS $67.99 PER MONTH
Customize and configure your own dedicated server. Simply choose one of our popular plans or select your own Linux or Windows server and plan options.
NO LONG WAITS. Server provisioned within hours.
Tap here now and be up and running with your own server tonight. |
|
|
|
|
|
|
|
|
|