Originally posted by Andrew Monkhouse:
Having a single or multiple RAF instances
At the end of the day, there is only one physical file on disk.
Some operating systems ...
The way I see it is that the magic cookie confirms that the file is in the correct format to be read by the Data class, regardless of what the file contains. So the meta-data will be in the same format and the schema will be in the same format for a given magic cookie.
I was searching for all magic-cookie-related threads, and read them all, found that many guys are hard-coding the value of the magic cookie in the Data class source.
Therefore it will not be possible to use the same Data class for interpreting other database files without touching the source code first (to change the hard-coded magic cookie value).
If this is the case (source code will be modified anyway) then I don't see another reason not to make the Data class singleton.
But then, what's the point of locking a record, I might
just as well lock the whole table :-)