2010-12-20 108 views

回答

2

最簡單的方法可能是使用JRuby,因爲HSQLDB是一個Java數據庫。

否則,嘗試http://www.infoq.com/news/ruby-driver-hsqldbhttp://rubyforge.org/projects/hypersonic/

你可能也想看看的SQLite,而不是HSQLDB,因爲它們是相似的,但SQLite是沒有用Java編寫的。

http://www.sqlite.org/whentouse.html

With the default page size of 1024 bytes, an SQLite database is limited in size to 2 terabytes (2^41 bytes). And even if it could handle larger databases, SQLite stores the entire database in a single disk file and many filesystems limit the maximum size of files to something less than this. So if you are contemplating databases of this magnitude, you would do well to consider using a client/server database engine that spreads its content across multiple disk files, and perhaps across multiple volumes.

閱讀頁面的其餘部分,看它是否會適合您的需求。

兩個其他頁面可能對您有用:
http://www.sqlite.org/faq.html
http://www.sqlite.org/mostdeployed.html

+0

感謝您的回覆,但我想爲temperory存儲創建數據庫。你能告訴我什麼是用於存儲數據的sqlite的最大容量&容量差異hsqldb&sqlite – Pranoti 2010-12-20 06:13:46

+0

我已經更新了我的答案,並詳細介紹了SQLite。查看網站了解更多信息。 – Wodin 2010-12-20 07:34:32

+0

非常感謝你,我肯定會通過它 – Pranoti 2010-12-21 04:10:42

0

如果你在JRuby:

1-從here下載HSQLDB的驅動程序和的hsqldb.jar添加到您的/ LIB

2。在項目的config/database.yml文件:

... 
development: 
    database: db_name 
    adapter: jdbc 
    driver: org.hsqldb.jdbc.JDBCDriver 
    schema: K12_EDUCATION 
    url: jdbc:hsqldb:file:./db_files/db_name