本地存储的数据库

发布于 2024-12-26 05:00:44 字数 216 浏览 0 评论 0原文

我正在寻找一个数据库,我可以用它来存储某些股票多年来的数据。可能会有几千条记录。我正在用 Java 和 Clojure 编写一个应用程序,当需要显示数据时,它将从本地数据库中提取数据。

我想知道是否有人知道用于此目的的良好数据库?我只有在服务器端运行 MySQL 的经验。

在 Clojure 和 Java 中哪个数据库最容易用于本地存储?

谢谢,

亚当

I am looking for a database which I can use to store data about certain stock over a number of years. There will probably be a few thousand records. I am writing an application in Java and Clojure which will pull out data from this local database when required to display the data.

I was wondering if anyone knew of a good database to work with for this purpose? I only have experience with MySQL running on the server side.

Which database would be easiest to work with in Clojure and Java for local storage?

Thanks,

Adam

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

桃扇骨 2025-01-02 05:00:44

JDK 6 及更高版本与 Java DB 捆绑在一起,这足以满足您的用例。

JDK 6 and greater comes bundled with Java DB which good enough for your use case.

若言繁花未落 2025-01-02 05:00:44

对于这种小型应用程序,如果您选择众多好的嵌入式 Java 之一,那么几乎肯定是最简单的数据库。

我个人的首选可能是:

  • H2 - 可能是整体性能最好的纯 Java 数据库,如果你相信他们的 基准 那么它比 MySQL 快得多,而且确实比大多数其他数据库快得多数据库在运行时单机环境。
  • Apache Derby - 良好的多面手,成熟且得到良好的支持(Oracle 已经包含了一个品牌为 Java DB 在最近的 JDK 中)

之后,您应该能够很容易使用它们使用标准的 JDBC 工具集,因此与 MySQL 没有太大区别。

如果您正在寻找一个非常好的 DSL 来通过 Clojure 与 SQL 数据库交互,那么您绝对应该看看 Korma

For this kind of small-scale application it will almost certainly be easiest if you pick one of the many good embedded Java databases.

My personal top choices would probably be:

  • H2 - probably the best performance pure Java database overall, and if you believe their benchmarks then it is considerably faster than MySQL and indeed most other databases when run in a single machine environment.
  • Apache Derby - good all rounder, mature and well supported (Oracle have included a version branded as Java DB in recent JDKs)

After that, you should be able to use them pretty easily using the standard JDBC toolset, so not much different from MySQL.

If you're after a really nice DSL for interfacing with SQL databases with Clojure, you should definitely also take a look at Korma.

时光瘦了 2025-01-02 05:00:44

我已经将 Apache Derby 用于类似的应用程序(尽管主要是用 Java 编写的)。他们已经运行该系统近四年了,并使用它执行了 60,000 多笔交易,没有出现任何重大问题。只是我偶尔会遇到错误。

Derby 与 JavaDB 是相同的数据库,但是使用 Derby 可以更轻松地跟上版本,因为您可以将其作为依赖项包含进来,而不是等待下一版 JDK 版本的发布。

另外,IIRC、JavaDB 仅包含在 JDK 中,而不包含在 JRE 中。

I have used Apache Derby for a similar application (although written mostly in Java). They have been running it for almost four years now, and performed more than 60,000 transactions with it with no major problems. Only the occasional bug on my part.

Derby is the same database as JavaDB, however with Derby its easier to keep up on the releases as you can just include it as a dependency, rather than wait on the whim of when the next JDK rev is coming out.

Also, IIRC, JavaDB is only included with JDK, not the JRE.

a√萤火虫的光℡ 2025-01-02 05:00:44

根据您的数据和应用程序的性质以及您使用新数据库模式的意愿和/或限制,您可能还需要考虑面向文档的数据库之一:MongoDB 或 CouchDB。如果您的数据和应用程序是面向 SQL 的,请使用建议的数据库之一。

Depending on the nature of your data and application and your willingness and/or constraints in working with a new database modality, you might also want to consider one of the document-oriented databases, MongoDB or CouchDB. If your data and application are SQL oriented, use one of the databases suggested.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文