Quadcap Software

Quadcap Embeddable Database

Quadcap Software

Frequently Asked Questions

How do I create a database?
 

Simply open a connection, using a JDBC URL which specifies a local path. To create a database in /tmp named myDatabase, attach to the following JDBC URL:

	  jdbc:qed:/tmp/myDatabase;create=true
	

For example:

import java.sql.Connection;
import java.sql.Driver;
import java.sql.DriverManager;

public class Faq1 {
    static {
        Class.forName("com.quadcap.jdbc.JdbcDriver");
    }

    /**
    * Create the database /tmp/myDatabase
    */
    public static void main(String[] args) {
        String url = "jdbc:qed:/tmp/myDatabase";
        Driver driver = DriverManager.getDriver(url);
        Connection conn = driver.connect(url, new Properties());
        conn.close();
    }
}
	  

What's the 'logger' parameter in the JDBC url?
 

QED supports a pluggable logger architecture. You can select the logger if you're the first connection to the database (!), by specifying a connection property, for example:

jdbc:qed:/tmp/myDatabase;logger=0
	

Three loggers are currently available, named '0', '1', and '2'. Very clever, eh? Here's what the different loggers do:

QED Loggers
Logger 0 This logger does nothing. Yes, nothing. This is the logger to use for batch bulk database building operations, where the operation either succeeds completely or it fails; no rollback or recovery is necessary.
Logger 1 This logger uses a separate thread to perform the actual logging function, as well as recovery and rollback operations.
Logger 2 This logger performs all logging operations synchronously. In my tests, this is the fastest logger which supports rollback and recovery. This is the default logger.
What are the database size limits?
 

Architecturally, there are very few limits:

QED Database Limits
Max file size 32K pages: 2 ^ 59 bytes. 8K pages: 2 ^ 57 bytes. The physical data file is accessed using a page/segment mechanism which permits (2 ^ 44) blocks, with a maximum block size of 32K bytes, for a theoretical limit of about 576,460 T bytes.
Max rows 2 ^ 64 (Row identifiers are 64 bits)
Max columns 2 ^ 32 (column indexes are 32 bites)
Max row size 2 ^ 32 bytes. Each row must fit into memory, including all of its data for each non-BLOB columns.
Max BLOB size 2 ^ 32 bytes
How do I connect to a QED database on a remote machine?
 

QED can be used with RmiJdbc. This allows you to run a stub server on one machine, linked to QED "native" on that machine, and then use RmiJdbc client stubs on the client nodes. Performance is quite a bit less this way than with QED directly embedded, but it is a true client-server JDBC architecture.