i described in a previous post some of the work we've done with firebirdsql and now it is time to get to work. firebirdsql is a relational database that runs on linux, windows and many different unix platforms. it was originally developed in 1981 and has existed under various names and incarnations since that time. before being released as open source, it was a commercial product published by borland as interbase. on the firebirdsql (http://www.firebirdsql.org) website you will still find many references to interbase and even some links into the existing interbase community. as firebird moves forward, it seems to be moving further away from its interbase history so you will have to be sure that any freely available tools you choose specifically support the firebird release you will be using.

the first decision you will need to make is which version of the product do you want to use. the download page lists three different versions: firebird 1.0.3, firebird 1.5.4, and firebird 2.0.1. when we did our first project with firebird, version 2.0 was still in beta release so we choose version 1.5.4. our next project will probably be in version 2.0 assuming that it continues to be a stable release. the platform you are working on may also have an impact on which version you choose to download. from version 1.5 forward, you will also be given a choice to install either the classic or the superserver architecture. it is probably a good idea to read the technical notes to get an idea of the pros and cons of each architecture before you install.

the most important thing to note is this: the classic architecture allows programs to open a database file directly and spawns a seperate task per user connection. while this may affect scalability, there are some cases where this might be useful and/or faster. the super server provides a server process and all sql requests are handled via the server using a socket. this version uses multiple lightweight threads to process all requests.

so far, we've used only the super server architecture and if scalability is the most important concern you have, you should choose this option when installing the program. we find the super server to be incredibly fast and it uses very little memory. on the production server we currently have in place, we have seen that with an average of between 50 and 100 connections, the server uses between 100mb and 150mb of memory consistently.

when you select a version, click on the link and you'll be transferred to sourceforge where you can download in the installation program. the .exe for version 2.0 is about 4.1mb and includes all of the code necessary for either classic or super server architecture. once the download is complete you can either install the program on your local computer or any computer you want to designate as the "firebird server". for testing purposes, you may want to install the program on your local computer, just remember that the odbc connection requires a server name as part of the connection string and if the server is on your local computer this name must be 'localhost'.

start the install process for either 1.5 or 2.0 versions and you'll find that they are very similar with the first step on both being to select a language. version 1.5 includes dutch, english, french, and portuguese. version 2.0 includes all of these plus bosnian, italian, and spanish. accept the agreement and read any installation notes, yeah, right smile [:)]. select a destination path where you want the program to be installed. notice that in version 1.5, the server uses 1.4mb of space and in version 2.0, it uses 2.0mb of space.

the next screen will ask you to select the components that you will need. my personal recommendation is to select the super server binary and all the developer and server components. once you select all of the additional components the disk usages jumps to a whopping 9.2mb for version 1.5 and 14.7mb for version 2.0.

give the system a name for the start menu and then you will be asked to set several individual options, such as

  • use the guardian to control the server: the guardian is a separate software utility that runs in parallel to the firebird server and is designed to restart the firebird server if it ever fails. if you install the firebird server as a service it may not be necessary to install the guardian, however, i've installed it anyway and it only uses about 3mb of memory and very few resources. if memory is a premium on your server, you may consider installing firebird as a service and then leaving this off.
  • run firebird as an application or server: this is a choice that is strictly up to the developer and is probably more of a development type choice. i can't imagine a production server where you didn't run the database server as a service, but i have installed firebird as an application on my development laptop. this one is your call.
  • start firebird automatically everytime you boot: again, this is a developer call, but as in the previous setting, i can't imagine a production server where you wouldn't want this to happen automatically.
  • copy firebird client library to <system> directory: not defaulted, but might be useful if you were using the client driver rather than odbc which is what we expect to use with foxpro.
  • generate client library as gds32.dll for legacy app support: defaulted to do so, haven't needed the gds32.dll version because i don't have any legacy apps, but leave it checked just in case you need it later i guess.
  • install control panel applet?: defaulted, but it does install a cute little applet in the control panel that you can open and quickly start and stop the firebird server as well as change some of these setup apps even after the server is installed.

you'll be given a screen to verify your choices and then you can click 'install' and the files are installed to their respective locations. the last choice is to start the firebird server. if you confirm this, the server will start and any user on your network and/or yourself can begin accessing firebird database files.

that's it. the server is installed and is operating. check it with the control panel app to verify it is running, but other than that, you are off and running. there is a firebird.conf file that has some additional settings that you can customize if you choose, but basically you can build a complete sql app right now and get it working with no other setup. simply amazing!

next up for foxpro programmers, we'll talk about installing and using a tool to create, manage and edit databases and we'll create a test database to play with in later discussions. after that we'll discuss installing the odbc drivers and create a dsn and a dsn-less connection to the database we create.

questions, comments, corrections are welcome and appreciated.

pht

 

Leave a Reply

Your email address will not be published. Required fields are marked *