Firebird database Configuration in Debian

What is firebird?

Firebird is a relational database offering many ANSI SQL-99 features that runs on Linux, Windows, and a variety of Unix platforms. Firebird offers excellent concurrency, high performance, and powerful language support for stored procedures and triggers. It has been used in production systems, under a variety of names since 1981.

Firebird is a commercially independent project of C and C++ programmers, technical advisors and supporters developing and enhancing a multi-platform relational database management system based on the source code released by Inprise Corp (now known as Borland Software Corp) under the InterBase Public License v.1.0 on 25 July, 2000.

Firebird Database Supported platforms

Currently our main supported platforms are 32-bit Windows, Linux (i586 and higher), Solaris (Sparc and Intel), HP-UX (i386), FreeBSD and MacOS X. Main development is done on Windows and Linux, so all new releases are usually offered first for these platforms, followed by other platforms after few days (or weeks).

Download Firebird Database

Install Firebird database Debian

#apt-get install firebird2-super-server firebird2-utils-super firebird2-dev

This installs the bulk of firebird to /usr/lib/firebird and is configured for the data files to be stored in

You can start and stop firebird with /etc/init.d/firebird or the ibmgr utility in /usr/lib/firebird/bin.

Changing the sysdba password

Firebird comes with a special user called sysdba that is very useful tool on your database server. You should first modify the default password for this user using the firebird security tool called gsec.

$ /usr/lib/firebird/bin/gsec -user sysdba -password masterkey

GSEC> modify sysdba -pw newpasswd

GSEC> quit

Creating a User in Firebird database

Now lets make a normal user called ruchi again using the gsec tool.

$ /usr/lib/firebird/bin/gsec -user sysdba -password newpasswd

GSEC> add jsc -pw ruchi

GSEC> quit

Creating a Test Database

Pretty much any time we want to create databases or interact with them we can use the command line sql client isql that comes with firebird. First lets create a test database

$ /usr/lib/firebird/bin/isql

SQL> create database 'localhost:/var/lib/firebird/data/test.gdb' user 'ruchi' password 'ruchi';

SQL> quit;

That created a new empty database /var/lib/firebird/data/test2.gdb owned by our new user ruchi. After creating a database you are already connected to it so I didn't really need to quit but it gives the opportunity to show how to connect to an existing database. Let's connect and create a sample table.

$ /usr/lib/firebird/bin/isql localhost:/var/lib/firebird/data/test.gdb -u ruchi -p ruchi

SQL> create table plist (name varchar(50), phone varchar(7));

SQL> insert into plist (name, phone) values ('david','123');

SQL> insert into plist (name, phone) values ('mark','456');

SQL> select * from plist;

name                      phone
======                 ======
david                      123
mark                       456

If you want to do all these thing using firebird web interface or GUI tools click here