[fpc-pascal]Writing a highly portable database...

Michael Van Canneyt michael.vancanneyt at wisa.be
Fri Jul 20 09:33:20 CEST 2001


On Thu, 19 Jul 2001, Alexander Stohr wrote:

> > > For some nice reasons it is of high interest to have
> > > an offline reader and an offline editor for the two
> > > mentioned purposes.
> >
> > Does 'offline' mean that you will not be directly connected
> > to the MySQL server ?
>
> Yes, i.e. some file that contains all data for download
> or as a base of automatic updates via the network.
>
> > > I know FreePascal is portable to the desired targets.
> > > But i am not that sure if i know about the right
> > > collection of toolsets that let these clients
> > > perform synchronisation with the servers over an
> > > internet conncetion without coding any platform
> > > differently. Maybe an E-Mail interface would serve
> > > here or any other protocoll, maybe several of them.
> >
> > To answer your question, more information is needed; In principle
> > what you ask can be done using Free Pascal, but the implementation
> > of the synchronization is _not_ easy. This is difficult anyhow, and
> > this difficulty is not tied to FPC, but more of a principal nature.
>
> Okay, i went a bit too far into the application level.
> Anyways i mentioned it for the case if someone does have a clue
> on it here.
>
> > In your case I would recommend always use a local mysql engine,
> > (the memory footprint is low anyhow) and run a synchronization
> > of the databases when going online. (but this may be a problem)
>
> It depends. If all data fits onto a floppy its pretty okay.
> If it means there is CD burning requires its possilby not so good.

But this problem is not tied to the data access mechanism, but more to
the amount of data.

You could also consider using MySQL server as the central server,
and .dbf (dBase) files for local storage. The FCL contains TDataset
descendents for both, which would enable a uniform interface no matter
whether you're working offline or online.

If diskspace is also an issue, then this might be a better approach.

Michael.





More information about the fpc-pascal mailing list