简体   繁体   中英

Migrating from Apache Derby to MySQL

I have a JDBC application that uses Apache Derby. How can I migrate my entire database system to use MySQL?

  1. I have 3 Java programs that access the database
  2. I have 3 tables and 2 views

I am using Netbeans. I have never used MySQL before and do not know where to begin. Is there nice integration with Java and MySQL in Netbeans? How can I get nice integration with NetBeans and MySQL?

All help is greatly appreciated!

看起来该插件可能会为您提供帮助: http : //netbeans.org/kb/docs/ide/mysql.html

I found this tutorial on the Spring site, but I think it is only a partial solution.

Tutorial

In it they are relying on hibernate to drop and create the tables, and I really don't like that. You have to go through special coding to add static data. For example, if your app is tracking devices, you probably want a table of device_types. At least some o those device types will be in the db, as well as devices, users, etc.

What I intend to do, is to use Derby until I am somewhat stable. From it, I will get the database schema and create it in mysql. It seems that the DB look utility can be used for that. DB Look

As added security I intend to run my web app with a db user that does not have the ability to add or drop tables. Also it is possible to remove the permission to delete rows if you use the concept of making rows "inactive" So instead of deleting a no longer used device type, you set the "active" flag to F. So your device type query would look like:

select * from device_type where active = 'T'

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM