纯java sqlite库? [英] Pure java sqlite library?

查看:273
本文介绍了纯java sqlite库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我看过 Java和SQLite ,但是哪些是纯java制作的,并且与平台无关?哪个也是最好的开始?我从来没有使用过sqlite,但我认为它就像mysql。他们中的任何一个都有一个很好的命令行工具来测试查询吗?

I saw Java and SQLite, but what ones are made in pure java and are platform independent? Also which would be the best to start with? I have never used sqlite but I assume it is like mysql. Also do any of them come with a nice command line tool for testing queries?

推荐答案

SQLite正在进行大量宣传其他语言域,但是使用Java,您还可以使用其他语言域:

SQLite is getting quite a lot of hype in other language domains, however with Java you have something else available:


  • HyperSQL 通常称为HSQLDB )是纯Java RDBMS,专门用于将其作为应用程序的一部分运行,这意味着您可以将其嵌入到您的软件中只是工作。

  • H2 是对HypersonicSQL的完全重写( H2和HyperSQL的共同祖先),也是完全Java。这个的一个很好的特性是RDBMS仿真,它允许它与专门为Oracle RDBMS编写的SQL一起工作。

  • 还有几乎强制性的Apache Commons变体, Apache Derby 。和其他两个一样,Derby也是可嵌入的,并且文件占用空间很小。

  • HyperSQL (more commonly known as HSQLDB) is pure Java RDBMS which is specialized around running it as part of your application meaning that you can embed it to your software and it just works.
  • H2 is a complete rewrite of HypersonicSQL (common ancestor for H2 and HyperSQL) and is also fully Java. One nice feature of this one is RDBMS emulation which allows it to function with SQL written specifically for, say, Oracle RDBMS.
  • There's also the almost mandatory Apache Commons variation too, Apache Derby. As with the other two, Derby is also embeddable and has a small JAR file size footprint.

至于工具,那就是变化的很多。例如,大多数Hypersonic系列产品主要用于单元测试,这意味着您可以使用(几乎)普通Java代码轻松地对数据库模式和实际查询进行单元测试。

As for tools, well, that varies a lot. Most of the Hypersonic family products for example are mainly meant for unit testing which means that you can unit test your DB Schemas and actual queries quite easily with (almost) plain Java code.

这篇关于纯java sqlite库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆