can I eliminate the data.fs file in favor of an relational database?
I just installed Zope (on NT) and would like to have reasonable backup/recovery options. One way to do this is to just make a copy of the data.fs file in the var directory, but I'm concerned that this file may not be in a consistent state when it gets copied somewhere. Should I worry about this? I'm thinking it would be better to eliminate this file in favor of an Oracle or Sybase database (I have access to both). Can I do this? If it is possible, would I want to do it? If I should want to do it, how do I do it? I've spent a few hours searching the documentation, but this has only convinced me that it may be possible -- I've been unable to find a definitive answer. Ron_Dagostino@SSGA.Com
----- Original Message ----- From: <Ron_Dagostino@SSGA.COM> To: <zope@zope.org> Sent: Wednesday, March 08, 2000 12:59 PM Subject: [Zope] can I eliminate the data.fs file in favor of an relational database?
I just installed Zope (on NT) and would like to have reasonable backup/recovery options. One way to do this is to just make a copy of the data.fs file in the var directory, but I'm concerned that this file may not be in a consistent state when it gets copied somewhere. Should I worry about this?
Nope. The Data.fs file is simply appended to when things change, and it is quite safe to just copy the file over.
I'm thinking it would be better to eliminate this file in favor of an Oracle or Sybase database (I have access to both). Can I do this? If it is possible, would I want to do it? If I should want to do it, how do I do it? I've spent a few hours searching the documentation, but this has only convinced me that it may be possible -- I've been unable to find a definitive answer.
It *can* be done, but you would need to write your own ZODB Storage mechanism for it. Right now, there are a few Storages available. FileStorage is the most common (the one that works with Data.fs). There is also CompressedStorage and BerkeleyStorage. No one has written a storage for an RDBMS yet, but it should be possible. Would you want to do it? Probably not. The FileSystem storage is pretty solid. About the only thing you'll get from the RDBMS storage is that you wouldn't have a file that keeps growing with every transaction and needs to be packed from time to time. Kevin
Ron_Dagostino@SSGA.COM wrote:
I just installed Zope (on NT) and would like to have reasonable backup/recovery options. One way to do this is to just make a copy of the data.fs file in the var directory, but I'm concerned that this file may not be in a consistent state when it gets copied somewhere. Should I worry about this?
Nope.
I'm thinking it would be better to eliminate this file in favor of an Oracle or Sybase database (I have access to both). Can I do this?
Yes.
If it is possible, would I want to do it?
Sure.
If I should want to do it, how do I do it?
Create an new kind of Storage module that stuffs database records into table rows, instead of a file. We've hypothisized on this, and it is very possible (the 'fs' in Data.fs means 'FileStorage', which is the kind of storage used by default on Zope. Other storages include DemoStorage, BerkeleyStorage etc. There is no saying you couldn't have a RelationalStorage). Butdo you REALLY want this? Consider: 1) Relational databases do not store previous revisions of record information. You will have no Undo capability. I guess with some extremely fancy SQL or if you engineered the Storage to do some kind of mapping, you could emulate the storage of previous revisions. 2) One of the benefits of RDBMS is that they can be used by outside applications. The data Zope stores however will be record objects, basicly python pickles, information which is useless to other apps. However, it's really not a bad idea, except for the no Undo part. -Michel
participants (3)
-
Kevin Dangoor -
Michel Pelletier -
Ron_Dagostino@SSGA.COM