Introduction
Dec 31, 2012
FastFileDB
is an open source database built with Oracle JDK. It caches data as "Primitive Type" for java primitive data type. Thus, it is fast and consume less memory..
The Vision of FastFileDB is to provide fast data management service with the minumum use of hardware memory storage.
The Mission of FastFileDB is to maintain/optimize the balance between
speed and size (performance vs size of memory storage). It aims to keep itself simple and small to provide fast
data handling services regardless of the data size.
Summary:
- It supports basic SQL syntax and works SQL
commands like CREATE/DROP, INSERT/UPDATE/DELETE, and SELECT.
- It is a file-based database, per table directory. Each table has its own directory, locked by current position. The meta data and content is stored in file with ext.:*.TB.
- Table content is loaded only when necessary. And can be tuned to unload immediately after usage. It reduces the initial
loading/start time. Hence, the start-up time is fast regardless the size of database.
- Current version has not yet supported indexing. However, due to it's nature of storing data as primitive (e.g. "int" rather than "Integer", "byte" rather than "Byte"), the data processing is very fast.
Mile Stone for Features [Ver.2.0]:
- Data caching [100%]
- No SQL Database [100%]
- SQL Database [100%] - NOTE: certain "GROUP BY" query result may not work expectedly, still under testing.
- SQL-99 Compliant Database [50%] -
- Fast I/O algorithm [90%]
- Work as TableModel, ListModel, List as temporary data storage [70%]
- Indexed Column [80%] - NOTE: Not yet applied in the current release.
- Full Text Search [50%] - NOTE: Not yet applied in the current release.
- Stored Procedure / Trigger [0%]
- Internal Function [0%] - NOTE: works only with SQL like SUM(), AVG(), MAX(), MIN(), COUNT(), etc.
Features of FastFileDB
- Data caching in table format, rather than key/value pair.
- Data stored in "Primitive Type".
- Data stored in array form.
- Light-weight. It provides basic database features / data processing functions only.
- Efficient SQL query parsering. Instead of applying SQL layer, FastFileDB process data while parsing a query. NOTE: exclude SELECT statement.
Usage of FastFileDB
JDBC Setting:
- Driver: "net.sf.fastfiledb.jdbc.DDriver"
- URL: "jdbc:fastfiledb:[Database name];[optional]"
- E.g: "jdbc:fastfiledb:Test;dir=.;create" will create the database "Test" under current directory (if it does not exist).
- User: "adm" / blank
- Password: "adm" / blank
Network JDBC Setting:
- E.g: "jdbc:fastfiledb:Test;IP=localhost;PORT=6543;create" will connect to "localhost:6543" and look for the database "Test".
- Other setting is same.
- NOTE: The database server must be started prior to this step. Exec the class "net.sf.fastfiledb.engine.FfdbEngine" to init the server listener.
Disk Table and Memory Table:
- Use "CREATE TABLE ..." to create a disk table, which has the ability to flush data from memory to file.
- Use "CREATE TEMPORARY TABLE ..." for in-memory-only table/cached table creation.
- NOTE: Temporary table will not remain after system exit.
Notice:
- FastFileDB engine will automatically shutdown after iddling for 10 min.
- Which means if no operation within 10 min., it will invoke System.exit().
- Uncommitted data will be lost after re-connect.
- The default AUTO-COMMIT is ON. Thus, data is saved unless AUTO-COMMIT is set to OFF manually.
Limitation of Session and Transaction.
The database core library has been completed. Limitation:
- Authentication: Not yet activated. Each connection is opened implicitly or explicitly by user "adm" (admin)
- Session: Each java.sql.Connection holds one session
- Transaction: READ_UNCOMMITTED only.
- Query Processing: Only one Transaction at a time. It is not yet optimizing with thread processing. The "synchronized" method is applied to support concurrency.
The above issues will be improved in future verison.
The initiative of building FastFileDB
Simply put in formula =
(
(
"Java Cache" +
"Java Database" +
NoSQL +
"In-Mem Database" +
SQL-layer
)
- "Heavy-weight features"
- "Unecessary classes"
)
+ "Simplicity"
+ "Light-weight"
+ "Customizable"
The are already this kind of product libraries however, the price tag is as well amazing!