jdbc:derby:myDatabase;create=true
what does create=true
mean? Should all connetionurls hould have this create=true or just user and psw?
Advanced thanks
create=true
in this context means that database will be created if it does not exist. You can avoid using that parameter if you don't need it.
From the documentation:
Creates the standard database specified within the database connection URL Derby system and then connects to it. If the database cannot be created, the error appears in the error log and the connection attempt fails with an SQLException indicating that the database cannot be found.
If the database already exists, creates a connection to the existing database and an SQLWarning is issued.
According to http://db.apache.org/derby/docs/10.4/ref/rrefattrib26867.html it:
Creates the standard database specified within the database connection URL Derby system and then connects to it.
So I'd say that no, you shouldn't have that in all your connection urls; only when you specifically want the db to be created if it doesn't exist.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With