Monday, February 7, 2011

What do I need to start using Embedded Firebird with Delphi?

I wan a good lightweight FOSS embedded database to use with Delphi. I've used DBISAM by Elevate Software for years and I just love it, but I like to share the source on some of my utilities, and it is closed source commercial.

Someone suggested Embedded Firebird as a FOSS alternative.

  • Where do I get components to use it with Delphi?
  • What is the difference between the SuperServer, classic and embedded servers?

I know CodeGear offers BlackFish SQL and Interbase, but they have license restrictions.

Thanks!

  • I've used embedded Firebird server and was very pleased with it. I think it's great choice. It's free, fast and offers features not available in other solutions (large db size, stored procs, transactions, etc) For example, here is a comparison with SQL Server Express

    Difference between classic, superserver and embedded described here.

    Nick Stinemates : Why were you pleased with it? What made it a good choice?
    From aku
  • The main firebird resource page is here http://www.ibphoenix.com/ there are links to download, docs, blogs and forums.

    Firebird is in fact a forked branch of Interbase, Firebird 1.0 was to all intents and purposes Interbase 6.0, the forks are a little wider nowdays, but in terms of programming they are still very similar to use.

    Rather than us tell you how good it is, I highly recommend that you download it and give it a go for yourself, you probably won't look back.

    From Tim Jarvis
  • There are a lot of component libraries. Here's a list of all of them, with explanation which does what:

    http://www.firebirdfaq.org/faq7/

    As for architecture:

    SuperServer is a single-process multi-threaded server (like Apache on Windows, for example) Classic is a multi-process single-threade server - things are synced via a separate lock manager process Embedded is a DLL you hook up to your application and work with database file directly

    SuperServer is good for OLTP, lot of users, etc. Classic is good for OLAP or few users running heavy queries. Embedded is good for desktop apps.

    You should install and use SuperServer while developing, since embedded only allows one connection at a time, so you cannot access the database from your application and administration tool at the same time. Later, you can deploy using any of those 3 architectures.

    mghie : Use of embedded should be considered very carefully, though: On Windows it makes the application unusable for multiple concurrent users (fast user switching, Terminal Server), and for multiple instances of the application for the same user. IMHO the server is light-weight enough that the SuperServer version can be deployed instead.
    Milan Babuškov : @mghie: I believe this issue is fixed with Firebird 2.5 which is currently in beta and should be released soon.
  • You had asked about components for using Firebird with Delphi. If you are fully committed to both delphi and firebird, I would suggest checking out FibPlus. It's an outgrowth of the original IBX components included with Delphi, reasonably priced, and quite solid. If you aren't, well, you probably ought to be using Delphi.NET with the ADO.Net data provider, which is open source.

    In order to use embedded firebird, simply add a database connection to a datamodule, select fbembed.dll as your client library, and have it. For development, it's nicer to develop against a server, however, so I leave the compiled in value as fbclient.dll, and simply deploy with fbembed.dll renamed as fbclient.dll.

    It works very nicely, especially after patching the source to allow opening databases across unc paths the way users expect them to. The post above nicely explains the difference between SS, CS and Embedded. Bear also in mind that embedded includes a full client library so you can also use it to connect to a server, allowing a sort of hybrid application.

    From easel
  • I found some additional links to components here

  • I had not used specifically the embedded packaging, but used firebird in different projects and is very good to know that I can embed the full db server with my app with only needing change the connection string. And, in the inverse way, you can take a embedded API to connect with a remote server. Again, you just need to change connection strings.

  • You could try the zeos componentes there are free componentes and u can ditribuit this with out penaltys. http://sourceforge.net/projects/zeoslib

    From Kipow
  • The Unified Interbase Components is a good one to use. The URL is http://www.progdigy.com/?page_id=5. It also has components for DB express. The only point against it is that its dataset component is read only. I am using the UIB components in the latest version of my time tracking application.

    With Firebird, you can download the embedded version. This version comes with the fbembed.dll which you can then rename in your application as fbclient.dll. You can use Flamerobin http://www.flamerobin.org to create and manage your firebird databases.

    From Phil
  • I have used ZeosLib (http://zeos.firmos.at/portal.php) with both Firebird and SQLLite and I like it a lot. The only drawback is that there is no D2009 version out yet. ZeosLib 7 is supposed to address D2009. The post (http://zeos.firmos.at/viewtopic.php?t=2001) announcing it was in September of 2008.

  • You can also try IBDAC (InterBase Data Access Components) that provides access to InterBase, Firebird and Yaffil databases. More info is available here.
    The components work with Delphi, C++Builder and RAD Studio.

    From Devart

0 comments:

Post a Comment