You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-user@db.apache.org by Juan Ignacio Villa <ji...@yahoo.es> on 2005/09/27 12:17:37 UTC

Zip Distribution.

I have to distribute an DB (and actualization or
deinstallation). I have the problem than i cant delete
other files that i had installed.


I have proven to compress the directories of the data
base in zip and to thus accede to the data base. But
the data stored in the cache was not readen.

URL:
jdbc:derby:jar:(C:/Iva2005/com/aeat/iva2005/datos/CloudScape/Red.zip)Red
Driver: org.apache.derby.jdbc.EmbeddedDriver


I need group the files of the DB in order to erase and
actualize versions withot danger of erase files that
an crazy user can laid in.
¿there is an log of the files created by derby?
¿Can be grouped/compressed?

Very Thanks


		
______________________________________________ 
Renovamos el Correo Yahoo! 
Nuevos servicios, más seguridad 
http://correo.yahoo.es

Re: Zip Distribution.

Posted by "Jean T. Anderson" <jt...@bristowhill.com>.
Juan Ignacio Villa wrote:
> ... 
> B.- There is an moral problem. 
> I can delete all the data base, but if an user laid an
> archive into the directories of derby and we erase
> it... I work for the goverment and the application
> will be used for millons. We want minimize problems.
> We think that if the DB would be compressed in only
> one file (.jar .zip .tar ...) the problem dissappear.
> ¿There is another form?

By "delete all the data base", I assume you mean delete the directory 
that was created when the database was created with the "create=true" 
flag. For example, given this connection URL:

   connect 'jdbc:derby:test;create=true'

Derby creates a "test" directory with all the Derby database files. 
Deleting the database is as simple as removing that "test" directory.

Could you tell users to not store their own files under the Derby 
database directory? that it is only intended for use by the Derby 
datbase itself? Instead they should choose another location.

> ... 
> C.- I tell you the prove we made to cache:
> We insert data into DB. Then we erase cache files. The
> DB don't have the inserted data.

When you say that you erase the cache files, which specific files are 
you removing?

> ... 
> Oh, sorry for my english. :)

Please don't worry -- it might just mean that we need to ask more 
questions to make sure we understand what you mean.

regards,

-jean

Re: Zip Distribution.

Posted by Juan Ignacio Villa <ji...@yahoo.es>.
Thanks Stanley.

 --- Stanley Bradbury <St...@gmail.com>
escribió:


> Hi Juan -
> I am not clear on what your needs are, there seems
> to be a couple of 
> issues and I will need more information to make a
> helpful response.  Can 
> you respond to the following?:
> 
> a) what do you mean by: "  ...distribute an DB (and
> actualization or 
> deinstallation)".  You can copy the database
> directory tree to any new 
> location.  The system needs to be shutdown when the
> copy is made.

A.- Copy the directory is easy.
The main problem is the next.

> b) In regards to:"i cant delete other files"  what
> are the names of the 
> files you are attempting to delete? - how are you
> attempting the delete? 
> and what is the error/messages returned by the
> attempt?  Is the database 
> shutdown when the delete is attempted?
> 

B.- There is an moral problem. 
I can delete all the data base, but if an user laid an
archive into the directories of derby and we erase
it... I work for the goverment and the application
will be used for millons. We want minimize problems.
We think that if the DB would be compressed in only
one file (.jar .zip .tar ...) the problem dissappear.
¿There is another form?

> c) In regards to "But the data stored in the cache
> was not readen."  
> derby provides no way to monitor the cache - how
> were you determining 
> what happened to the cache?  If by 'readen' you mean
> 'written' (that is: 
> saved to disk) you will need to unjar the database
> first.  When placed 
> in a jarfile the database is read-only so you will
> not be able to write 
> to the database.  The database files will need to be
> unjarred to create 
> a full read-write system.

C.- I tell you the prove we made to cache:
We insert data into DB. Then we erase cache files. The
DB don't have the inserted data.
We use the autoCommit(false) and commit() methods to
fill data, but the result is equal, we loose the
inserted data.
We use the SYSCS_UTIL.SYSCS_CHECKPOINT_DATABASE
command of derby, but the result is equal, we loose
the inserted data.
There is no matter of fill the cache, to write it
permanently into data base and clear cache.

Was one prove we did for another question.


You says that is imposible the DB files and
directories will be in a .jar or another only file or 
I will can not edit the DB. 
An DB in a .jar dont have write permission. Ouch :(

  
> d) In regards to: "¿there is an log of the files
> created by derby?" No, 
> there is not list of filenames that are created by
> Derby.  All the files 
> contained in the database directory tree are what is
> created - for more 
> info see the FAQ: section "What are the basic
> components of a 
> Derby/Cloudscape deployment?"
> at: 
>
http://www-128.ibm.com/developerworks/db2/library/techarticle/dm-0408bradbury/
>

D.- Thanks.

> e) In regards to: "¿Can be grouped/compressed?"
> Derby can access a 
> database stored in a jarfile - such a database is
> read-only until it is 
> uncompressed.

E.- Thanks. Can not be.


Oh, sorry for my english. :)

Very Thanks

> Juan Ignacio Villa wrote:
> 
> >I have to distribute an DB (and actualization or
> >deinstallation). I have the problem than i cant
> delete
> >other files that i had installed.
> >
> >
> >I have proven to compress the directories of the
> data
> >base in zip and to thus accede to the data base.
> But
> >the data stored in the cache was not readen.
> >
> >URL:
>
>jdbc:derby:jar:(C:/Iva2005/com/aeat/iva2005/datos/CloudScape/Red.zip)Red
> >Driver: org.apache.derby.jdbc.EmbeddedDriver
> >
> >
> >I need group the files of the DB in order to erase
> and
> >actualize versions withot danger of erase files
> that
> >an crazy user can laid in.
> >¿there is an log of the files created by derby?
> >¿Can be grouped/compressed?
> >
> >Very Thanks
> >



		
______________________________________________ 
Renovamos el Correo Yahoo! 
Nuevos servicios, más seguridad 
http://correo.yahoo.es

Re: Zip Distribution.

Posted by Stanley Bradbury <St...@gmail.com>.
Juan Ignacio Villa wrote:

>I have to distribute an DB (and actualization or
>deinstallation). I have the problem than i cant delete
>other files that i had installed.
>
>
>I have proven to compress the directories of the data
>base in zip and to thus accede to the data base. But
>the data stored in the cache was not readen.
>
>URL:
>jdbc:derby:jar:(C:/Iva2005/com/aeat/iva2005/datos/CloudScape/Red.zip)Red
>Driver: org.apache.derby.jdbc.EmbeddedDriver
>
>
>I need group the files of the DB in order to erase and
>actualize versions withot danger of erase files that
>an crazy user can laid in.
>¿there is an log of the files created by derby?
>¿Can be grouped/compressed?
>
>Very Thanks
>
>
>		
>______________________________________________ 
>Renovamos el Correo Yahoo! 
>Nuevos servicios, más seguridad 
>http://correo.yahoo.es
>
>  
>
Hi Juan -
I am not clear on what your needs are, there seems to be a couple of 
issues and I will need more information to make a helpful response.  Can 
you respond to the following?:

a) what do you mean by: "  ...distribute an DB (and actualization or 
deinstallation)".  You can copy the database directory tree to any new 
location.  The system needs to be shutdown when the copy is made.

b) In regards to:"i cant delete other files"  what are the names of the 
files you are attempting to delete? - how are you attempting the delete? 
and what is the error/messages returned by the attempt?  Is the database 
shutdown when the delete is attempted?

c) In regards to "But the data stored in the cache was not readen."  
derby provides no way to monitor the cache - how were you determining 
what happened to the cache?  If by 'readen' you mean 'written' (that is: 
saved to disk) you will need to unjar the database first.  When placed 
in a jarfile the database is read-only so you will not be able to write 
to the database.  The database files will need to be unjarred to create 
a full read-write system.
 
d) In regards to: "¿there is an log of the files created by derby?" No, 
there is not list of filenames that are created by Derby.  All the files 
contained in the database directory tree are what is created - for more 
info see the FAQ: section "What are the basic components of a 
Derby/Cloudscape deployment?"
at: 
http://www-128.ibm.com/developerworks/db2/library/techarticle/dm-0408bradbury/

e) In regards to: "¿Can be grouped/compressed?" Derby can access a 
database stored in a jarfile - such a database is read-only until it is 
uncompressed.