Blackfish SQL

This chapter describes Blackfish SQL features.

  • Blackfish SQL
  • Blackfish SQL DataStore
  • Compatibility Between Windows and Java
  • Blackfish SQL for Java Connectivity
  • Blackfish SQL API for Windows
  • Administration and Utility Functions Available from SQL

Blackfish™ SQL is a high-performance, small-footprint, transactional database. Blackfish SQL was originally implemented as an all-Java database called JDataStore. This is now called Blackfish SQL for Java. Blackfish SQL was then ported from Java to C#. The C# implementation is called Blackfish SQL for Windows.  

The design and implementation of Blackfish SQL emphasizes database performance, scalability, ease of use, and a strong adherence to industry standards. Blackfish SQL capabilities include the following:

  • Industry standards compliance:
    • Entry level SQL-92
    • Unicode storage of character data
    • Unicode-based collation key support for sorting and indexing
    • dbExpress 4 drivers for Win32 Delphi and C++
    • ADO.NET 2.0 providers for .NET
    • JDBC for Java
    • JavaBean data access components for Java
    • XA/JTA Distributed transactions for Java
  • High performance and scalability for demanding online transaction processing (OLTP) and decision support system (DSS) applications
  • Delphi, C#, and VB.NET stored procedures and triggers for Windows
  • Java-stored procedures and triggers
  • Zero-administration, single assembly or single-jar deployment
  • Database incremental backup and failover in the Java version


Blackfish SQL DataStore

Blackfish SQL is the name of the product, its tools, and of the file format. Within RAD Studio, there are assemblies that include classes that start with DataStore.

Compatibility Between Windows and Java

Blackfish SQL for Windows and Blackfish SQL for Java are compatible, though some restrictions apply. The database file format is binary-compatible between the two. The database clients and servers are interchangeable. Windows clients can connect to Java servers and Java clients can connect to Windows servers. However, because the Blackfish SQL for Windows implementation is more recent, some Blackfish SQL for Java features are not yet supported for the Windows version. 

For additional information about Blackfish SQL compatibility, see System Architecture.

Blackfish SQL for Windows Connectivity

Blackfish SQL for Windows provides the following database drivers:

  • DBXClient: This 100% Object Pascal dbExpress 4 database driver enables C++ and Win32 Delphi applications to connect to a remote Blackfish SQL for Windows or Blackfish SQL for Java server.
  • Local ADO.NET 2.0 Provider: This 100% managed code driver enables .NET applications to connect to a local Blackfish SQL for Windows server. The local ADO.NET driver executes in the same process as the BlackFish SQL database kernel, for better performance.
  • Remote ADO.NET 2.0 Provider: This 100% managed code driver enables .NET applications to acquire a remote connection to either a Blackfish SQL for Windows or Blackfish SQL for Java server.

For instructions on using these drivers, see Establishing Connections.

The Blackfish SQL API may be used in Delphi and C++ programs with the DBXClient DBX4 driver. .NET applications can use the API with the ADO.NET Provider. In RAD Studio the API is in the Borland.Data.DataStore and Borland.Data.MetaData namespaces. 

The administrative capabilities listed below are not yet supported in DataExplorer for Blackfish SQL for Windows. Use SQL commands or Blackfish SQL built-in DB_ADMIN stored procedures to complete these tasks.

  • Create/alter autoincrement and max inline properties for columns
  • Create secondary indexes
  • Create, alter, drop users and roles
  • Create, alter, drop database mirrors
  • Database encryption
  • Database backup


Administration and Utility Functions Available From SQL

Two classes are available, DB_ADMIN and DB_UTIL. These methods can be called from SQL using the CALL statement. They can be called without creating a METHOD alias, because the Blackfish SQL dialect recognizes methods in DB_ADMIN as built-in methods.


DB_ADMIN is a group of stored procedures for performing a variety of database administration tasks. Some of the capabilities include:

  • Configuring automatic failover and incremental backup
  • Viewing and altering database configurations
  • Backing up databases (explicit)
  • Encrypting databases
  • Mirror management

For more information, see the Stored Procedures Reference.


DB_UTIL is a set of SQL stored procedures for performing numeric, string and date/time operations on data stored in database tables. These procedures include such functions as:

  • Mathematical functions, such as trigonometric, arithmetic, and random
  • String manipulation functions
  • Date and time functions

For more information, see the Stored Procedures Reference.


Blackfish SQL includes an ADO.NET implementation. This is similar to the AdoDbx Client, which is also an ADO.NET implementation.

  • DataStoreCommand: Provides execution of SQL statements and execution of stored procedures.
  • DataStoreCommandBuilder: Generates single-table commands to reconcile changes made to a DataSet with its underlying database.
  • DataStoreConnection: Provides a connection to a database.
  • DataStoreConnectionPool: Provides access to a connection pool.
  • DataStoreDataAdapter: Fills a DataSet and updates a database.
  • DataStoreDataReader: Gives access to a result table from a database server.
  • DataStoreDataSourceEnumerator: Provides enumerator for finding all data sources on local network.
  • DataStoreParameter: Specifies parameter for DataStoreCommand.
  • DataStoreParameterCollection: Collection of parameters for DataStoreCommand.
  • DataStoreProviderFactory: Base class for a provider's implementation of data source classes.
  • DataStoreRowUpdatedEventArgs: Holds data for RowUpdated event of DataStoreDataAdapter.
  • DataStoreRowUpdatingEventArgs: Holds data for RowUpdating event of DataStoreDataAdapter.
  • DataStoreTransaction: Provides a transaction.
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!