Board index » delphi » 10 non-concurrent users, Pdox, Cached updates:

10 non-concurrent users, Pdox, Cached updates:

Hi!
My last network project for 4 concurrent users (WinNT, D2, Pdox) I made
using TTables without Cached updates and I didnt have ANY problems!
For my new project (for about 10 non-concurrent users) I am planing to use
TQuery instead of TTable because of security reasons (power loss= possible
corruption) and Im planning to use cached updates together with TUpdateSQL
connected with TQuery.
Am I thinking correct?

Regards
Aleksandar

 

Re:10 non-concurrent users, Pdox, Cached updates:


If your database is still going to be Paradox, then TQuery or cached
updates won't bring any extra security against power losses etc. The
security remains on the same level as just using TTables.

Ok, maybe a slightly better security, if you drop all the indexes, and
use only Queries to get the data. When there are no index files, then
they can't get corrupted either:)

Anyway, you'll need some Client/Server SQL-database, Interbase, Oracle,
Sybase etc. to get the real security you maybe are looking for.

Markku Nevalainen

Quote
Aleksandar Galovic wrote:

> Hi!
> My last network project for 4 concurrent users (WinNT, D2, Pdox) I made
> using TTables without Cached updates and I didnt have ANY problems!
> For my new project (for about 10 non-concurrent users) I am planing to use
> TQuery instead of TTable because of security reasons (power loss= possible
> corruption) and Im planning to use cached updates together with TUpdateSQL
> connected with TQuery.
> Am I thinking correct?

Re:10 non-concurrent users, Pdox, Cached updates:


Hi Markku!

Quote
>If your database is still going to be Paradox, then TQuery or cached
>updates won't bring any extra security against power losses etc. The
>security remains on the same level as just using TTables.

Correct me if Im wrong:
When you open TTable, you are making permanent connection with a
TTable.db file on a server side. If you use TQuery (without live result)
, you are not making permanent connection. If it is like that, and you put
UPS on the server, during power loss on a client side, you are not making
any damage on the TTable.db file.

Regards
Aleksandar

Re:10 non-concurrent users, Pdox, Cached updates:


Hi Markku!

Quote
>If your database is still going to be Paradox, then TQuery or cached
>updates won't bring any extra security against power losses etc. The
>security remains on the same level as just using TTables.

Correct me if Im wrong:
When you open TTable, you are making permanent connection with a
TTable.db file on a server side. If you use TQuery (without live result)
, you are not making permanent connection. If it is like that, and you put
UPS on the server, during power loss on a client side, you are not making
any damage on the TTable.db file.

Regards
Aleksandar

Re:10 non-concurrent users, Pdox, Cached updates:


Quote
Aleksandar Galovic wrote:

> When you open TTable, you are making permanent connection with a
> TTable.db file on a server side. If you use TQuery (without live result)
> , you are not making permanent connection. If it is like that, and you put
> UPS on the server, during power loss on a client side, you are not making
> any damage on the TTable.db file.

I'm not sure what you mean by permanent connection here. The connect is kind
of permanent during Insert/Edit phases, because these keep some records locked
on the server's hard disk.

If you get data from Paradox table without intending to update anything
there, then I would say it's exactly as safe to use TTable or TQuery for just
browsing the data.
Just browsing the data never writes any permanent or temporary data on the
server's hard disk. So, no matter if you switch off, or loose, the power from
your workstation in any phase here. The DB files and their indexes will stay
written and untouched on the server's hard disk.

The critical phase starts only when you start to Insert or Edit anything
on the server. Your code can have bad logic that corrupts your DB indexes,
or your BDE may be incorrectly configured in multi user environment, and
again you get the indexes smashed. Or you can loose the workstation power
in middle of writing the data, and the DB files on the server get only
partially written.

Roughly, the difference between A. Desktop databases (Paradox, dBase, Access
etc.) and B. Client/Server SQL databases (Interbase, Oracle etc.) is:

A. The workstation is the only part having any intelligence when reading or
  writing any data to the server's DB files. There really are no parts of the
  BDE loaded in to servers memory, nor does it have any kind of intelligent
  cache to temporarily save the Paradox updates, nothing.
  The server that keeps Paradox type databases is a 'dummy' server. Actually
  it's only a shared hard disk, having the same amount of intelligence as your
  workstations own hard disk has, and that ain't much.

  Thus, all the writing and updating to the server's DB files breaks at the same
  time as the workstation hangs, losses it's power etc.

 B. The Client/Server databases do have an active process running on the server,
  the Server part.
  When the workstation wants to get some data, it kindly passes the SQL query to
  this server process. The server process scans the SQL database, and returns the
  wanted data.

  Every update to the Client/Server database goes the same way. Client again sends
  a kind request:
   "Update Orders SET IntD="Y" Where Paydate <= DueDate"
  Server process checks that the query is reasonable, and after that starts
  to update the DB.
  And *HERE* is also one of the big strengths of C/S database, you can quite safely
  loose the power from your workstation in any phase. The Server process takes care,
  that your update will always be written correctly and completely, or it won't be
  written at all.

Quote
> Correct me if Im wrong:

Well, if I was badly wrong, someone probably will correct me:)

Markku Nevalainen

Other Threads