如何将 HSQL DB 与 Java 应用程序集成
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/6571111/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to integrate HSQL DB with java application
提问by Feras Odeh
I would like to integrate HSQL in my Java application for testing purposes. Is there any tutorial that describes in a simple way how to integrate it-I want to distribute it with my app. I'm not restricted to HSQL any other easier solution are welcomed.
我想将 HSQL 集成到我的 Java 应用程序中以进行测试。是否有任何教程以简单的方式描述了如何集成它 - 我想将它与我的应用程序一起分发。我不限于 HSQL,欢迎任何其他更简单的解决方案。
Thanks
谢谢
回答by a_horse_with_no_name
Your question is extremely broad and not really possible to answer, but I'll try anyway.
你的问题非常广泛,不太可能回答,但无论如何我都会尝试。
HSQLDB is not different to any other DBMS (except that it can run in the same process as your application - that is different e.g. to PostgreSQL).
HSQLDB 与任何其他 DBMS 没有什么不同(除了它可以在与您的应用程序相同的进程中运行 - 这与例如 PostgreSQL 不同)。
Starting the database is described in the first chapter of the manualincluding a chapter on how to create a new database
手册的第一章介绍了启动数据库,其中包括有关如何创建新数据库的章节
Apart from that, just run your CREATE TABLE
statements e.g. from within your application, the included SqlToolor any (JDBC based) SQL client that you like.
除此之外,只需CREATE TABLE
在您的应用程序、包含的SqlTool或您喜欢的任何(基于JDBC 的)SQL 客户端中运行您的语句。
Deployment and integration into your application is described in the manual as well: http://hsqldb.org/doc/2.0/guide/deployment-chapt.html.
手册中也描述了部署和集成到您的应用程序中:http: //hsqldb.org/doc/2.0/guide/deployment-chapt.html。
The chapter "Embedded Databases in Desktop Applications" might also be interesting to you.
“桌面应用程序中的嵌入式数据库”一章您可能也会感兴趣。