Subject Re: RE: [ib-support] Non-technical database question
Author Helen Borrie
At 05:21 PM 24/02/2003 +1000, you wrote:

> > Portable "data files" are not database tables. Fb/IB doesn't
> > store data in
> > "data files". It does have some mechanisms by which you can make
> > external
> > files visible to the database engine, as if they were database
> > tables.
>How then do applications such as MYOB & Quickbooks accomplish there

I don't know exactly, but some time ago, when I was doing a
MYOB-to-RDBMS export application, MYOB had its own proprietary (and
non-accessible) internal format for persistent data storage and didn't use
a database server as a backend. Given that MYOB is still a desktop
application, it's probably still the case.

>I am not writing accounting software, however surely this software uses
>databases? and each 'client' maintains its own copy, easily copied by a
>simple copy-and-paste from explorer. Can be opened and viewed at the
>accountants, etc.

You can't copy-and-paste data into a relational database management system
(which is what Firebird is). What you do is write client applications to
manage imported data and massage them into shape as SQL DML (data
manipulation language) statements.

For "viewing", a client/server system doesn't let clients touch data
physically at all, ever. SQL is all about specifying a view of the stored
data, with knowledge of what is stored where and how one set of data (call
it a table) is related to another...

Firebird doesn't come with an application user interface but it has an
application programming interface (API) which is used in many different
ways by many different tools. For example, if you are developing in
Delphi, Kylix or C++Builder, there are several component packages available
that encapsulate the function calls to the API; or, if you are using a
Java IDE, then you have the Jaybird JDBC driver at your disposal as a
database interface layer. If PHP or Python be your game, there are dbi
layers available for them. It is also possible in C or another host
language to program directly to the API and even to program without the API
using a subset of SQL known as Embedded SQL, or ESQL.

>This is the type of mobility I am going for.
>Is IB/FB not designed for this?

No, it's not DESIGNED as a Windows tool for hip-hopping data around between
applications. It's a cross-platform relational database management
system: a database server and a client program which provides the "API
window" through which SQL queries flow from client applications and data
sets are returned. The RDBMS doesn't presuppose any specific means of
client access: the boot is on the other foot. You look to third-party
materiel for special-purpose interfaces. For a generic interface on
Windows that doesn't need to be sensitive to the special features of
Firebird, you might look to ODBC or ADO.

>or is this what you meant by EXTERNAL FILEs?

Did you look it up in the Language Reference Guide? A text file on the
server's hard disk, with a fixed-field-length layout, can be mapped as a
Firebird table and accessed as if it were one (with certain limitations
<g>). But it's just a sometimes-handy feature of limited capability: it's
certainly not what the database engine is designed to do.