简体   繁体   English

纯java sqlite库?

[英]Pure java sqlite library?

I saw Java and SQLite , but what ones are made in pure java and are platform independent? 我看过Java和SQLite ,但是那些是纯Java制作的并且与平台无关? Also which would be the best to start with? 哪个也是最好的开始? I have never used sqlite but I assume it is like mysql. 我从未使用过sqlite,但我认为它就像mysql。 Also do any of them come with a nice command line tool for testing queries? 还有他们中的任何一个带有一个很好的命令行工具来测试查询?

SQLite is getting quite a lot of hype in other language domains, however with Java you have something else available: SQLite在其他语言领域得到了很多炒作,但是对于Java,你还有其他可用的东西:

  • 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. HyperSQL通常称为HSQLDB )是纯Java RDBMS,专门用于将其作为应用程序的一部分运行,这意味着您可以将其嵌入到您的软件中并且它可以正常工作。
  • H2 is a complete rewrite of HypersonicSQL ( common ancestor for H2 and HyperSQL ) and is also fully Java. H2是HypersonicSQL( H2和HyperSQL的共同祖先 )的完全重写,也是完全Java。 One nice feature of this one is RDBMS emulation which allows it to function with SQL written specifically for, say, Oracle RDBMS. 这个的一个很好的特性是RDBMS仿真,它允许它使用专门为Oracle RDBMS编写的SQL来运行。
  • There's also the almost mandatory Apache Commons variation too, Apache Derby . Apache Derby也有几乎强制性的Apache Commons变体。 As with the other two, Derby is also embeddable and has a small JAR file size footprint. 与其他两个一样,Derby也是可嵌入的,并且具有小的JAR文件大小。

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. 例如,大多数Hypersonic系列产品主要用于单元测试,这意味着您可以使用( 几乎 )普通Java代码轻松地对DB模式和实际查询进行单元测试。

sqljet ,它与名称相矛盾,没有SQL,但可以使用SQLlite数据库。

And updated answer, you may want to try Xerial's Sqlite JDBC driver . 并且更新了答案,您可能想尝试Xerial的Sqlite JDBC驱动程序 While its current version is not pure-java, it packages binaries for major operating systems so that it is mostly portable. 虽然它的当前版本不是纯java,但它包含主要操作系统的二进制文件,因此它几乎是可移植的。

Also sqlite4java also currently packages binaries for major OSes. 此外,sqlite4java目前还包含主要操作系统的二进制文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 是否有用于将DXF转换为PNG的纯Java库? - Is there a pure java library for converting DXF to PNG? 将 Kotlin 扩展方法添加到纯 Java 库 - Adding Kotlin extension methods to a pure Java library 集成外部纯Java库并对其进行Android类访问 - Integrating an external pure Java library and having Android classes access on it Android Studio / Gradle Project中的纯Java 8库模块 - Pure Java 8 Library module in Android Studio/Gradle Project BoofCV或纯Java计算机视觉库中cvMatchTemplate()的等效性? - Equivalence of cvMatchTemplate() in BoofCV or pure java computer vision library? Android:在纯 Java 包中使用 JSON 库的问题 - Android: Issue using JSON library in pure java package 存在纯Java中用于多维数据的哪些库/组件? - Which Library/Components in pure Java for multi-dimensional Data exist? 是否有适用于ARM Linux的java sqlite3库? - Is there a java sqlite3 library for ARM Linux available? Sqlite和java.sql库-检查为Sqlite表创建的索引 - Sqlite and java.sql library - Checking Indices Created For a Sqlite Table 从Java加载库时出现“未定义符号:__cxa_pure_virtual”错误 - “undefined symbol: __cxa_pure_virtual” error when loading library from java
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM