Gale
My first concern is about DATA INTEGRITY. We can get this using CLIENT/SERVER technology only, and in order to get CLIENT/SERVER we need to use SQL (Advantage DB is too expensive for small business to afford)
In the xHarbour forum I receive the following post from Przemyslaw, the programmer xHarbour guru.
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
On Thu, 1 Jun 2006 13:55:54 -0400,
George Abinader <
georgeabinader@msn.com> wrote:
> Przemyslaw
> I like DBF. I am using it from clipper 87.
> My first concern is when I have to do a Browse in a 500,000 records file.
> I learned that SQL only return a few rows, but DBF return the 500,000
> RECORDS.
The result of SQL query can be few records but RDBMS have to collect
it first from 500'000. It can uses some optimizations technics to
avoid linear scanning of 500'000. The most common optimization
used by RDBMS is parsing the filter expression and for the subexpressions
which are indexed and using indexes to reduce size of the set with possible
valid records and then making linear checking only for the records
which still exists in record set. Exactly the same is done by MachSix,
ClipMore, xHarbour RMDBFCDX/RMDBFNTX (they support all MachSix m6_*()
and ClipMore cm*()/rl*() functions) and ADS when you are setting
filter to table or when you call explicitly call a function to create
such record set, f.e.: rlNewQuery( cFilter ). You do not need RDBMS
with SQL for it.
> Also we have the problem with possible index and file corruption
> because the DBF is working directly with the database instead of a copy like
> SQL.
Not SQL but some [R]DBMS which may use SQL or not - it doesn't matter.
Farther not all [R]DBMS have to do that. It depends on implemented
transaction model and transaction isolation level. Only few [R]DBMS
(usually using some additional OS/hardware support) can cleanly revert
transactions when the server crashes. Most of them can cleanly revert
only transactions not committed by clients f.e. due to client computer
crash.
You can reach the same functionality porting your xHarbour application
to Linux and running them remotely inside 'screen' like tool. Even if
your station crash you can connect to the server from other computer
and continue your job on the same instance of program you were working
before.
You do not not need [R]DBMS for that.
There is yet another reason to use transactions. Bugs in application
which which may interrupt execution during update so logical data
structures can not be updated correctly and probably I will think
about adding some transaction mechanism to native RDDs.
> I think that the advantage that SQL have over DBF is the CLIENT/SERVER
> technology.
Not SQL. SQL is a language to access data stored in database not
database format or database motor system.
> But the problem is that we don't have a Client/Server for DBF. I
> know about the ADVANTAGE DATABASE SERVER but it is too expensive for an
> apllicaction with only two or three computers in a local network
> What other options do we have?
Port it to Linux. Your whole application will run on the server side.
> Are there any Client/Server for DBF other than Advantage?
I do not know. Maybe in this year I'll finish NETRDD which should
have such functionality but it strictly depend on spare time I will
have. I cannot promise any terms or deadlines. It's even possible
that I'll never finish it.
But I created USRRDD which allows to create RDDs at .prg level.
I should commit it in few days. Maybe someone implement RDD with
remote data access using RPC or other network communication methods
which exists in xHarbour.
best regards,
Przemek
ps. I do not want to say that [R]DBMS are wrong or not worth to use
because it will not be true. Just simply people expects some
amazing functionality from [R]DBMS basing on some myths about
them which are very often far from true.
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Regadrs
George