
- Apache Derby 教程
- Apache Derby - 首頁
- Apache Derby - 簡介
- Apache Derby - 部署模式
- Apache Derby - 環境設定
- Apache Derby - 工具
- Apache Derby - 語法
- Apache Derby - 資料型別
- Apache Derby - 建立表
- Apache Derby - 刪除表
- Apache Derby - 插入資料
- Apache Derby - 檢索資料
- Apache Derby - 更新資料
- Apache Derby - 刪除資料
- Apache Derby - Where 子句
- Apache Derby - GROUP BY 子句
- Apache Derby - Order By 子句
- Apache Derby - Having 子句
- 修改表語句
- Apache Derby - Derby 索引
- Apache Derby - 儲存過程
- Apache Derby - 模式
- Apache Derby - 觸發器
- Apache Derby 有用資源
- Apache Derby - 快速指南
- Apache Derby - 有用資源
- Apache Derby - 討論
Apache Derby - 簡介
Apache Derby 是一個完全基於 Java 程式語言的關係型資料庫管理系統 (RDBMS)。它是由 Apache 軟體基金會開發的一個開源資料庫。
Oracle 釋出了 Apache Derby 的等效產品,名為 JavaDB。
Apache Derby 的特性
以下是 Derby 資料庫的顯著特性:
平臺獨立性 - Derby 使用磁碟上的資料庫格式,其中資料庫儲存在磁碟上的檔案中,該檔案與資料庫名稱相同。
無需修改資料 - 因此,您可以將 Derby 資料庫移動到其他機器而無需修改資料。
事務支援 - Derby 提供對事務的全面支援,確保資料完整性。
包含資料庫 - 您可以將預構建/現有資料庫包含到您當前的 Derby 應用程式中。
佔用空間小 - Derby 資料庫佔用空間小,易於使用和部署。
嵌入到 Java 應用程式中 - Derby 提供了一個嵌入式資料庫引擎,可以嵌入到 Java 應用程式中,並在與應用程式相同的 JVM 中執行。只需載入驅動程式即可啟動資料庫,並在應用程式停止時停止。
Apache Derby 的侷限性
以下是 Apache Derby 的侷限性:
Derby 不支援對 BLOB 和 LONGVARCHAR 等資料型別進行索引。
如果 Derby 沒有足夠的磁碟空間,它將立即關閉。
資料儲存
在儲存資料時,Apache Derby 遵循一個稱為聚集的概念。在此,表的每個資料將儲存在單獨的檔案中。同樣,表的每個索引也儲存在單獨的檔案中。因此,資料庫中的每個表或索引都將有單獨的檔案。
Apache Derby 庫/元件
Apache Derby 發行版提供了各種元件。在您下載的 Apache 發行版的 lib 資料夾中,您可以看到表示各種元件的 jar 檔案。
Jar 檔案 | 元件 | 描述 |
---|---|---|
derby.jar | 資料庫引擎和 JDBC 驅動程式 | Apache Derby 的資料庫引擎是一個嵌入式關係資料庫引擎,支援 JDBC 和 SQL API。 它也充當嵌入式驅動程式,您可以使用它透過 Java 應用程式與 Derby 通訊。 |
derbynet.jar derbyrun.jar | 網路伺服器 | Apache Derby 的網路伺服器提供客戶端伺服器功能,客戶端可以透過網路連線到 Derby 伺服器。 |
derbyclient.jar | 網路客戶端 JDBC 驅動程式 | |
derbytools.jar | 命令列工具 | 此 jar 檔案包含諸如sysinfo、ij 和dblook 等工具。 |
derbyoptionaltools.jar | 可選命令列實用程式(工具) | 此 jar 檔案提供可選工具:databaseMetaData 可選工具、foreignViews 可選工具、luceneSupport 可選工具、rawDBReader 可選工具、simpleJson 可選工具等 |
derbyLocale_XX.jar | 用於本地化訊息的 Jar 檔案 | 除了上述 jar 檔案外,您還可以看到幾個 derbyLocale_XX.jar(es、fr、hu、it、ja 等)。使用這些,您可以本地化 Apache Derby 的訊息。 |