Tuesday, 17 September 2013

What is the difference between dbExpress, dbGo and BDE in Delphi? Why to use dbExpress?

What is the difference between dbExpress, dbGo and BDE in Delphi? Why to use dbExpress?

There are a lot of database connectivity options in Delphi. Embarcadero supplies drivers for many databases, including Oracle, Firebird, InterBase, DB2, Informix, SQL Server, MySQL and ODBC. Additional drivers are available from third parties. Delphi supports many databases using several data access providers like dbExpress, dbGo, BDE, Interbase, FIBPlus, DevartIntebase (third party) etc. We will only talk about difference between BDE, dbGo and dbExpress and why should we use dbExpress instead of dbGo and BDE?

BDE is Borland Database Engine which was used in earlier versions of Delphi. Although its not deprecated still in Delphi XE4 but its advisable to migrate from BDE to dbExpress. 

dbGo for ADO mainly uses ADO connections to connect to MSSQL Server. No further enhancements have been made to dbGo since Delphi 6 when dbExpress was introduced. 

Both BDE and dbGo are bidirectional and uses connected access to database which degrades the performance in case of complex applications.  

dbExpress was introduced in Delphi 6 to replace BDE. dbExpress is a light-weight, extensible, cross-platform, high-performance mechanism for accessing data from SQL servers. dbExpress provides connectivity to databases for the Windows, .NET and Linux (using Kylix) platforms. dbExpress allows you to access different database servers like MySQL, Interbase, Oracle, MS SQL, Firebird, Informix etc. 

Disconnected Access and Unidirectional Approach in dbExpress

BDE and dbGo for ADO use connected data access techniques, that operate directly on the table or database but dbExpress architecture is the disconnected data access implementation available in Delphi. Instead of directly making any modification in database table, the dbExpress architecture requires the use of a TDataSetProvider to feed a TClientDataSet before we can connect to a TDataSource and data-aware controls.

One of the most significant features of dbExpress lies in the fact that it accesses databases using unidirectional datasets. Unidirectional datasets do not buffer data in memory - such a dataset cannot be displayed in a DBGrid. To build a user interface using dbExpress you will need to use two more components: TDataSetProvider and TClientDataSet as described above. 

Due to disconned access and unidirectional approach, dbExpress is provides good performance, so it is suitable for complex applications.

2 comments:

  1. Just to update to the current state, right now dbxpress is not the golden chicken, since last year, Embarcadero own the former AnyDac component set, now called FireDac.

    http://www.embarcadero.com/products/rad-studio/firedac

    ReplyDelete
    Replies
    1. Thanks for sharing the above link. Its very useful.

      Delete