This is a very easy task in FreePascal/Lazarus.

Drop TIBConnection component from SQLdb page in a form or data module.

Drop a button, and write this code in button’s OnClick event:

procedure TForm1.Button1Click(Sender: TObject); begin IBConnection1.DatabaseName:= '/home/motaz/firebird/newdb.fdb'; IBConnection1.CharSet:= 'UTF8'; IBConnection1.UserName:= 'sysdba'; IBConnection1.Password:= 'masterkey'; IBConnection1.CreateDB; end;

This will create an empty FireBird database in the location you have specified in DatabaseName property, with UTF8 character set.

Later you can create tables, generators, indexes, and constraints using SQLQuery component example:

create table BOOKS ( BOOKID INTEGER not null , BOOKNAME VARCHAR(52) , CONTENTS BLOB, LOCATION VARCHAR(55) , constraint PK_BOOKS_1 primary key (BOOKID) );

This will create a new table called Books. You need to put this DDL script in SQL property of SQLQuery component that linked to your IBConnection.