DBDB.io The Encyclopedia of Database Systems · Est. 2017
Database of Databases

Database Entry

Firebird


Firebird is a free, open-source, SQL relational database management system based on the open source edition of InterBase released by Borland Software Corp, formerly known as Inprise Corp. Developed in C and C++, Firebird supports major hardware and software platforms including Windows, Linux, and Mac OS X. Firebird offers many ANSI SQL standard features, allows simultaneous OLTP and OLAP operations through its multi-generational architecture, and supports stored procedures and triggers.[05][06]

Source Code
https://github.com/FirebirdSQL/firebird[02]
Country of Origin
US
Start Year
2000 [07]
Former Name
InterBase
Coding Agent
Project Type
Open Source
Written in
C, C++
Supported Languages
C, C++, Delphi, Java, Perl, PHP, Python
Derived From
InterBase
Operating Systems
Linux, macOS, Solaris, Windows

Database Entry

Firebird


Firebird is a free, open-source, SQL relational database management system based on the open source edition of InterBase released by Borland Software Corp, formerly known as Inprise Corp. Developed in C and C++, Firebird supports major hardware and software platforms including Windows, Linux, and Mac OS X. Firebird offers many ANSI SQL standard features, allows simultaneous OLTP and OLAP operations through its multi-generational architecture, and supports stored procedures and triggers.[05][06]

History[07][08]


In July 2000, Inprise released the source code for the relational DBMS InterBase 6.0. Shortly after, the Firebird project was forked from the InterBase 6.0 code tree on SourceForge, and developers began working on platform builds and new ports and tools. Firebird 1.0 was released in March 2002 for Windows, Linux, and Mac OS X, with support for other platforms soon following. In November 2002, The FirebirdSQL Foundation (now known as the Firebird Foundation) was incorporated to support and raise funds for the developers of the Firebird DBMS.

Checkpoints[09]


Firebird does not support checkpoints as it does not include any transaction logging facilities.

Compression[10][11]


Firebird uses prefix and suffix compression for index keys. Record data is compressed using run-length encoding.

Concurrency Control[12][13][14][15]


Firebird uses a multi-generational architecture, also known as multi-version concurrency control, which uses record versions instead of read/write locks and transaction logs to provide external concurrency and consistency. Firebird keeps the preceding version of every modified record is kept as long as it is needed by at least one transaction. Each record version is signed by the transaction which created it, and each transaction knows what other transactions are currently active. Transactions cannot modify records whose most recent version is uncommitted, and transactions cannot read record versions created by active transactions. This ensures that active transactions can always see a consistent view of the database at any moment. Since readers typically do not block writers when accessing the same data, OLTP and OLAP operations can occur simultaneously in Firebird.

Limited explicit pessimistic locking is available through the WITH LOCK feature. However, Firebird warns users that explicit locking is rarely needed and intended for experts.

Firebird uses both its own lock manager and operating system locking for consistency control of the on-disk structure.

Data Model[05]


Foreign Keys[16]


Firebird supports both single-column and multi-column foreign keys and enforces foreign key constraints.

Indexes[11][17]


Firebird uses B-trees for indexes. Each index has dedicated index pages in the database and contains record locators in the leaf nodes.

When using an index to access a table, Firebird retrieves the necessary index information in one pass and creates a sparse bitmap, in which the true bits correspond to the page address and record offsets of records in the query. Multiple indexes can be used on a table by performing Boolean AND and OR operations on the bitmaps created from the indexes.

Isolation Levels[18][19]


Firebird supports snapshot isolation, snapshot table stability isolation, and read committed isolation. Snapshot isolation is the default isolation level and allows the transaction to see only changes committed before it started. Snapshot table stability isolation is similar to snapshot isolation but more restrictive. Once this level has started, other transactions cannot modify any tables that have changes pending.

Read committed isolation allows the current transaction to see all data changes by transactions which have committed since the current transaction started. There are two kinds of conflict resolution used in read committed isolation: one that reads the last committed version of a row and thus is non-blocking, and one that makes the transaction unable to modify any row that has pending updates from another transaction.

Joins[20][21]


The query optimizer picks the join order with the longest path and lowest estimated cost in terms of I/O operations and processing, in which a join path is defined as a sequence of joins. The cost of the join method is considered in the computation of the join cost.

Firebird uses nested loop join, sort-merge join, and hash join. The join algorithm is chosen as follows. If the join is an outer join, the join conditions are indexed, or the join conditions are inequalities, the nested loop join is used. If the join is an inner join and the join conditions are both equalities and not indexed, the sort-merge or hash join is used.

Logging[09]


Firebird does not include transaction logging facilities, but logging software is available from third-party vendors.

Query Compilation[22]


Firebird compiles SQL statements to Binary Language Representation (BLR), its internal language representation, before execution. Stored procedures, triggers, views, and computed columns are also compiled to BLR and stored along with the original SQL. When Firebird executes a stored procedure, the binary code is executed.

Query Interface[23][24]


The Firebird SQL language adheres to international SQL standards. Procedural extensions are supported through the procedural subset of the Firebird SQL language called Procedural SQL (PSQL). Users can use PSQL to write stored procedures, stored scalar functions, and triggers.

Firebird databases can be accessed interactively through the command-line interface provided by the isql utility. Applications and middleware can use the public Firebird API to connect with the database. The API can also be used to write user-defined routines in an external programming language.

Storage Architecture[25][26]


Storage Model[27]


Firebird uses row storage with a maximum row size of 64 KB.

Storage Organization[28][29]


Firebird uses a heap file organization with a linked list structure. Database pages called pointer pages contain a list of data pages that are part of a single table. Each pointer page has a pointer to the next pointer page for the table.

Stored Procedures[30]


Firebird supports two types of stored procedures: executable and selectable. Executable procedures typically modify data in the database, and selectable procedures typically retrieve data and return an arbitrary number of rows to the caller.

System Architecture[31]


Firebird is a shared-everything DBMS and consists of two parts: the database server and a client, which connects to the server through the Firebird client library. Clients can connect to the server remotely or locally, and many clients can connect to the same database. The Firebird server process and databases must be hosted on the same machine, and only the server has direct, filesystem-level access to the database.

Views[32]


Firebird supports three types of virtual views: naturally updatable views, which can be updated automatically without needing to write triggers; updatable views, which are updated through underlying triggers and can accept UPDATE, INSERT, and DELETE statements; and non-updatable views.

Citations

33 sources
  1. Firebird: The true open source database for Windows, Linux, Mac OS X and more firebirdsql.org
  2. GitHub - FirebirdSQL/firebird: Firebird server, client and tools · GitHub github.com
  3. Firebird: Firebird RDBMS firebirdsql.org
  4. Firebird (database server) - Wikipedia wikipedia.org
  5. Firebird: About Firebird firebirdsql.org
  6. Firebird: Features firebirdsql.org
  7. Firebird: Historical Reference firebirdsql.org
  8. Firebird: Firebird Foundation: a Retrospective firebirdsql.org
  9. ACID Compliance and Firebird firebirdsql.org
  10. Firebird Internals: Inside a Firebird Database firebirdsql.org
  11. https://www.ibphoenix.com/resources/documents/design/doc_18 ibphoenix.com Dead — Check Archive
  12. What is Multi Generational Architecture (MGA)? firebirdfaq.org
  13. Firebird 2.5 Language Reference firebirdsql.org Dead — Check Archive
  14. https://www.ibphoenix.com/resources/documents/how_to/doc_402 ibphoenix.com Dead — Check Archive
  15. https://www.ibphoenix.com/resources/documents/design/doc_22 ibphoenix.com Dead — Check Archive
  16. Firebird 2.5 Language Reference firebirdsql.org Dead — Check Archive
  17. https://www.ibphoenix.com/resources/documents/design/doc_392 ibphoenix.com Dead — Check Archive
  18. https://www.ibphoenix.com/resources/documents/how_to/doc_400 ibphoenix.com Dead — Check Archive
  19. Firebird 2.5 Language Reference firebirdsql.org
  20. https://www.ibphoenix.com/resources/documents/how_to/doc_399 ibphoenix.com Dead — Check Archive
  21. Insert your talk title ibphoenix.com
  22. What is BLR? firebirdfaq.org
  23. Firebird 2.5 Language Reference firebirdsql.org
  24. Firebird 3.0.14 Release Notes firebirdsql.org
  25. ✔Firebird recovery, optimization, and technical support. ✔HQbird - Firebird for big databases with replication, backups, monitoring, and optimization tools /Firebird Hardware Guide ib-aid.com
  26. What is ODS version and how to retrieve it? firebirdfaq.org
  27. https://www.ibphoenix.com/resources/documents/general/doc_323 ibphoenix.com Dead — Check Archive
  28. https://www.ibphoenix.com/resources/documents/design/doc_19 ibphoenix.com Dead — Check Archive
  29. Firebird Internals: Inside a Firebird Database firebirdsql.org
  30. Firebird 2.5 Language Reference firebirdsql.org
  31. Using Firebird: (work in progress) firebirdsql.org
  32. https://www.ibphoenix.com/resources/documents/how_to/doc_401 ibphoenix.com Dead — Check Archive
  33. https://github.com/FirebirdSQL/firebird/commit/42badf683132793c0234d496c5c873dae7dbd3b9 github.com
Revision #21 Last Updated: