Re: Is file is being used



<Eran.Yasso@xxxxxxxxx> wrote in message
news:1166041591.215975.197100@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Peter, nice to see pepole with the ammount of experience like you who
reading posts of noobs like me.

We were all "noobs" at one time. For that matter, even the most experienced
of us are *still* "noobs" in any variety of topics.

On to the subject...
Why wouldn't access let more then one user access the file in the same
time?

You'd have to ask the Access folks to get the exact details. But the
general issue is that you can't safely have more than one arbitrary process
writing to a file at the same time. There's no way to resolve how to
coordinate the processes, and so the resulting file is non-deterministic.

For example, imagine two processes writing the strings "ABCDE" and "abcde"
respectively, one byte at a time, to a file they both have open for writing
at the same time. The file could wind up looking like any of the following:

* "ABCDEabcde"
* "AaBbCcDdEe"
* "ABaCDbEcde"
* "ABCabcdDEe"

or any other possible interleaving of the two strings. There's no way to
allow both processes simultaneous access to the file and still have a
well-defined consequence to them both writing to the file simultaneously.

The easiest, most straight-forward solution is to ensure that only one
process can write to the file at a time. Once a process has closed a file,
there's nothing it can do to ensure that no other process will change the
file. But at least it knows while it has the file open, it can write to the
file and leave the file in a well-defined state.

mdb file is not an ordinary file. think of it as multi file. it
has tables. one can edit table while other edit other table. it
shouldn't affect each other. Unless they edit the same table.

The file system doesn't know anything about the content of the .mdb file.
It has no way to ensure that one process only makes changes to the file that
affect one table, while another process only makes changes to the same file
that affect a different table.

That said, most database do support multiple users, and they do so by
providing an actual database server through which the database can be
accessed. This adds a robust layer on top of the file itself that *does*
define how different processes can modify the file at the same time, and
which *does* understand the higher-level structure of the file (independent
tables, for example).

Note that even in the case of a database server supporting multiple
processes, it still enforces one-at-a-time access to any single part of the
database, and there are still possible conflicts between different
processes. Having the database server doesn't make the problems go
away...it just abstracts them into a more usable scenario, where the manner
in which processes cooperate is better-defined.

Pete


.



Relevant Pages

  • Re: Is file is being used
    ... We were all "noobs" at one time. ... one can edit table while other edit other table. ... The file system doesn't know anything about the content of the .mdb file. ... Note that even in the case of a database server supporting multiple ...
    (microsoft.public.dotnet.languages.csharp)
  • Datalogging storage question
    ... I am currently writing a datalogging application and am now wondering ... I want the application to be a single install so using a database server ... like SQL Server, MySQL, etc is out of the question. ... I could roll my own data storage file format, ...
    (borland.public.delphi.thirdpartytools.general)
  • How do I send an email?
    ... the middle of writing a small web application that communicates to a ... database server and sends out email confirmations. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: new oracle user
    ... You edit the source code locally in a file you store on disk, ... submit the file via a program like SQL*Plus to the database server. ...
    (comp.databases.oracle.server)
  • Re: how to encrypt db files
    ... Since a database server never quits reading or writing to ... Actually SQL2005 seems to close the file if no active query is running... ...
    (microsoft.public.sqlserver.security)