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 Paulo Jesus <pa...@gmail.com> on 2007/10/26 18:36:44 UTC

crate and drop databases.

I have two questions on create an drop databases.
Do I have a command to drop a database?  Or do I need to "gently"
remove the directory of the database? I didn't find references to
this.

There is other way to create a database  than the
'.../newDatabase;create=true' at the connection string.?

Thanks
PJ

Re: crate and drop databases.

Posted by Paulo Jesus <pa...@gmail.com>.
2007/10/30, Stanley Bradbury <St...@gmail.com>:
> Paulo Jesus wrote:
> > 2007/10/26, Stanley Bradbury <St...@gmail.com>:
> >
> >> Paulo Jesus wrote:
> >>
> >>> I have two questions on create an drop databases.
> >>> Do I have a command to drop a database?  Or do I need to "gently"
> >>> remove the directory of the database? I didn't find references to
> >>> this.
> >>>
> >>> There is other way to create a database  than the
> >>> '.../newDatabase;create=true' at the connection string.?
> >>>
> >>> Thanks
> >>> PJ
> >>>
> >>>
> >>>
> >> Hi Paulo -
> >> You are correct on both counts.  ;create=true will cause an empty (no
> >> user tables) database to be created if it does not already exist.
> >> Removing the directory structure deletes the database and returns the
> >> disk space to the filesystem.
> >>
> >> If you are familiar with databases where you connect to the engine and
> >> have multiple database to access you should consider using SCHEMAS.  You
> >> can create and drop schemas using standard SQL commands.
> >>
> >>
> >
> > Ok.
> > If the scripts to start and stop the NetworkServer are called from the
> > host machine than the administrator has also access to database files.
> > But if i can remotely  configure a new database (at connection string)
> > then, i think, it should be also possible to drop it..  with the
> > required validations first.
> >
> > Thanks
> > PJ
> >
> >
> Hi PJ -
> You have a good point.  Derby was designed to be a zero administration
> system hence such validation was not available in earlier versions
> within the SQL layer.  The Administrator account is new with version
> 10.3 and now that one exists (when sqlAuthorization=true administration
> is required) then there is a validation that can be used to as you
> suggest.  Would you please file a feature request in JIRA so this will
> be considered for inclusion in a future release?
>
> Info on filing defects and feature requests can be found at:
>   http://db.apache.org/derby/DerbyBugGuidelines.html

I can see if there isn't already a request or post a new.
But i need to read the guidelines first..
I will look to this, later.

PJ
(Paulo Jesus)

Re: crate and drop databases.

Posted by Stanley Bradbury <St...@gmail.com>.
Paulo Jesus wrote:
> 2007/10/26, Stanley Bradbury <St...@gmail.com>:
>   
>> Paulo Jesus wrote:
>>     
>>> I have two questions on create an drop databases.
>>> Do I have a command to drop a database?  Or do I need to "gently"
>>> remove the directory of the database? I didn't find references to
>>> this.
>>>
>>> There is other way to create a database  than the
>>> '.../newDatabase;create=true' at the connection string.?
>>>
>>> Thanks
>>> PJ
>>>
>>>
>>>       
>> Hi Paulo -
>> You are correct on both counts.  ;create=true will cause an empty (no
>> user tables) database to be created if it does not already exist.
>> Removing the directory structure deletes the database and returns the
>> disk space to the filesystem.
>>
>> If you are familiar with databases where you connect to the engine and
>> have multiple database to access you should consider using SCHEMAS.  You
>> can create and drop schemas using standard SQL commands.
>>
>>     
>
> Ok.
> If the scripts to start and stop the NetworkServer are called from the
> host machine than the administrator has also access to database files.
> But if i can remotely  configure a new database (at connection string)
> then, i think, it should be also possible to drop it..  with the
> required validations first.
>
> Thanks
> PJ
>
>   
Hi PJ -
You have a good point.  Derby was designed to be a zero administration 
system hence such validation was not available in earlier versions 
within the SQL layer.  The Administrator account is new with version 
10.3 and now that one exists (when sqlAuthorization=true administration 
is required) then there is a validation that can be used to as you 
suggest.  Would you please file a feature request in JIRA so this will 
be considered for inclusion in a future release?

Info on filing defects and feature requests can be found at:
  http://db.apache.org/derby/DerbyBugGuidelines.html



Re: crate and drop databases.

Posted by Paulo Jesus <pa...@gmail.com>.
2007/10/26, Stanley Bradbury <St...@gmail.com>:
> Paulo Jesus wrote:
> > I have two questions on create an drop databases.
> > Do I have a command to drop a database?  Or do I need to "gently"
> > remove the directory of the database? I didn't find references to
> > this.
> >
> > There is other way to create a database  than the
> > '.../newDatabase;create=true' at the connection string.?
> >
> > Thanks
> > PJ
> >
> >
> Hi Paulo -
> You are correct on both counts.  ;create=true will cause an empty (no
> user tables) database to be created if it does not already exist.
> Removing the directory structure deletes the database and returns the
> disk space to the filesystem.
>
> If you are familiar with databases where you connect to the engine and
> have multiple database to access you should consider using SCHEMAS.  You
> can create and drop schemas using standard SQL commands.
>

Ok.
If the scripts to start and stop the NetworkServer are called from the
host machine than the administrator has also access to database files.
But if i can remotely  configure a new database (at connection string)
then, i think, it should be also possible to drop it..  with the
required validations first.

Thanks
PJ

Re: crate and drop databases.

Posted by Stanley Bradbury <St...@gmail.com>.
Paulo Jesus wrote:
> I have two questions on create an drop databases.
> Do I have a command to drop a database?  Or do I need to "gently"
> remove the directory of the database? I didn't find references to
> this.
>
> There is other way to create a database  than the
> '.../newDatabase;create=true' at the connection string.?
>
> Thanks
> PJ
>
>   
Hi Paulo -
You are correct on both counts.  ;create=true will cause an empty (no 
user tables) database to be created if it does not already exist.  
Removing the directory structure deletes the database and returns the 
disk space to the filesystem.

If you are familiar with databases where you connect to the engine and 
have multiple database to access you should consider using SCHEMAS.  You 
can create and drop schemas using standard SQL commands.




Re: crate and drop databases.

Posted by Paulo Jesus <pa...@gmail.com>.
Thanks Francois
I didn't see that part.

PJ


2007/10/26, Francois Orsini <fr...@gmail.com>:
> Hi Paulo,
>
> You'll find the information you need in the developers' guide,
> See 'Creating, Dropping, and Backing Up Databases' section:
> http://db.apache.org/derby/manuals/develop/develop13.html#HDRSII-DEVELOP-42173
>
> Cheers,
>
> --francois
>
>
> On 10/26/07, Paulo Jesus < paulschein@gmail.com> wrote:
> > I have two questions on create an drop databases.
> > Do I have a command to drop a database?  Or do I need to "gently"
> > remove the directory of the database? I didn't find references to
> > this.
> >
> > There is other way to create a database  than the
> > '.../newDatabase;create=true' at the connection string.?
> >
> > Thanks
> > PJ
> >
>
>

Re: crate and drop databases.

Posted by Francois Orsini <fr...@gmail.com>.
Hi Paulo,

You'll find the information you need in the developers' guide,
See 'Creating, Dropping, and Backing Up Databases' section:
http://db.apache.org/derby/manuals/develop/develop13.html#HDRSII-DEVELOP-42173

Cheers,

--francois

On 10/26/07, Paulo Jesus <pa...@gmail.com> wrote:
>
> I have two questions on create an drop databases.
> Do I have a command to drop a database?  Or do I need to "gently"
> remove the directory of the database? I didn't find references to
> this.
>
> There is other way to create a database  than the
> '.../newDatabase;create=true' at the connection string.?
>
> Thanks
> PJ
>