如何将我的 MYSQL 表传输到 derby 数据库?
我尝试将 Derby 与 eclipse 结合使用,我是否必须拥有 Java EE eclipse?还有没有办法将 MYSQL 表导入到 derby 数据库中?抱歉,如果这些问题真的很基本,我是德比新手,我需要它快速工作(项目今天到期等) 谢谢
I am trying to use Derby with eclipse, do I have to have the Java EE eclipse? Also is there a way to import a MYSQL table into a derby database? Sorry if these questions are really basic, Im new to derby and I need it to work fast(project due today etc)
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
http://db.apache.org/derby/integrate/db_ddlutils.html
DdlUtils 是 Apache DB 子项目,提供用于创建和使用数据库定义 (DDL) 文件以及通过 Ant 任务或以 Java 编程方式导出和导入 XML 格式数据的实用程序。
除其他用途外,DdlUtils 使从一个数据库供应商迁移到另一个数据库供应商变得更加容易。本文提供了一个使用 DdlUtils 通过 DdlUtils Ant 任务将数据库迁移到 Derby 的简单示例。
此示例将 Derby 用作源数据库和目标数据库,因为 Derby 很容易获得并且是作者所了解的,但它可以与 DdlUtils 支持的任何数据库一起使用。通常有一种更简单的方法可以将 Derby 数据库从一台机器迁移到另一台机器:只需复制 Derby 数据库文件。如果源计算机和目标计算机使用官方 Derby 版本,则无需导出/导入架构和数据,即使对于具有不同体系结构的计算机也是如此,因为构成 Derby 数据库的文件是平台无关的。但是,如果您想要将 Derby 数据库升级到 Derby 的 alpha 版本或从 Derby 升级到正式版本,则必须导出架构和数据,因为 Derby 不支持升级 alpha 数据库。 DdlUtils 使这种迁移变得更加容易。
http://db.apache.org/derby/integrate/db_ddlutils.html
DdlUtils, an Apache DB subproject, provides utilities for creating and working with Database Definition (DDL) files and for exporting and importing data in XML format via Ant tasks or programmatically in Java.
Among other uses, DdlUtils makes it easier to migrate from one database vendor to another. This paper provides a simple example for using DdlUtils to migrate a database to Derby using the DdlUtils Ant tasks.
This example features Derby as both the source and target database because Derby is easily available and is what the author knows, but it can be used with any of the databases that DdlUtils supports. Usually there's an even easier way to migrate a Derby database from one machine to another: just copy the Derby database files. If the source and target machines use official Derby releases you don't need to export/import the schema and data, not even for machines with different architectures, because the files that make up a Derby database are platform-independent. However, if you want to upgrade a Derby database to or from an alpha version of Derby to an official release, you must export the schema and data because Derby doesn't support upgrading an alpha database. DdlUtils makes this migration easier.
您可以将 MySql 导出到 CSV 文件:
http://www.debianadmin.com/export-mysql -database-into-a-csv-file.html
并将其导入到 derby 数据库:
http://www.razorsql.com/features/derby_import.html
You can export MySql into CSV file:
http://www.debianadmin.com/export-mysql-database-into-a-csv-file.html
and import it to derby database:
http://www.razorsql.com/features/derby_import.html
您可以使用以下方法将 CSV 数据导入 Derby:
如 博客文章。
以下是参数的 Derby 文档。
无需购买任何东西;)
You can import your CSV data into Derby with something like:
as explained in this blog post.
Here is the Derby docs for arguments.
No need to buy anything ;)