From: Fred T. <fr...@us...> - 2010-12-17 12:48:46
|
Your questions are covered fully in documentation and the hotToServers.html web page I pointed out. You can see in the example that the server is opening 4 different file databases. You can either connect to a server or connect in-process to a database. It's your choice. Fred On Fri, 17 Dec 2010 04:37 -0800, "BenXS" <bxs...@ya...> wrote: > > Ok, thank you very much. Some related questions: > > 1.) Does ONE (stand-alone) HSQLDB server can only access ONE database at > a > time? > > Assume I start multiple java programs which connect to a different > database > each. > > These java prgms do NOT create an embedded server but acces the external > running server. > > Is this possible Or do I have to start n external servers for n different > databases (on n different ports) ? > > Ben > > 2.) Assume I let an external stand-alone server create a new database, > then > perform some DDLs + SQL statements > and finally COMMIT them. > > Are they permanently stored into the database file? > > Thank you > Ben > > > Fred Toussi-2 wrote: > > > > An HSQLDB server can serve multiple databases. The empty database name > > is a special case, but not different in functionality to the non-empty > > ones. For example, a server can serve the following three databases. > > > > jdbc:hsqldb:hsql://localhost/mydb > > jdbc:hsqldb:hsql://localhost/demodb > > jdbc:hsqldb:hsql://localhost/ > > > > The server can be started with predefined databases (if any of these > > does not exist, it will be created). Alternatively, the server can be > > started with no active database. Upon connection to this server, the > > target database is opened or created if it does not exist. The database > > names in the URL are aliases. Each database has its own file path, or is > > a mem: database with a different internal name. The mapping between the > > aliases and the file paths / internal mem: names is defined in the > > server.properties file. > > > > You don't have to specify the default port 9001. > > > > See this new page with an example of setting up multiple server > > databases. http://hsqldb.org/web/howToServers.html > > > > Fred > > > > On Thu, 16 Dec 2010 08:56 -0800, "BenXS" <bxs...@ya...> wrote: > >> > >> I have seen different connection strings for the HSQLDB: > >> > >> jdbc:hsqldb:hsql://localhost/demodb > >> > >> and > >> > >> jdbc:hsqldb:hsql://localhost > >> > >> What is the difference? > >> > >> When a database like "demodb" does not currently exist: Will it be > >> created > >> automaically ? > >> > >> Is it require to specify the port :9001 when trying to connect from a > >> java > >> programm ? > >> > >> Ben > >> -- > >> View this message in context: > >> http://old.nabble.com/Connection-URL-with-or-without-database-postfix--tp30474386p30474386.html > >> Sent from the HSQLDB - User mailing list archive at Nabble.com. > >> > >> > >> ------------------------------------------------------------------------------ > >> Lotusphere 2011 > >> Register now for Lotusphere 2011 and learn how > >> to connect the dots, take your collaborative environment > >> to the next level, and enter the era of Social Business. > >> http://p.sf.net/sfu/lotusphere-d2d > >> _______________________________________________ > >> Hsqldb-user mailing list > >> Hsq...@li... > >> https://lists.sourceforge.net/lists/listinfo/hsqldb-user > >> > > > > ------------------------------------------------------------------------------ > > Lotusphere 2011 > > Register now for Lotusphere 2011 and learn how > > to connect the dots, take your collaborative environment > > to the next level, and enter the era of Social Business. > > http://p.sf.net/sfu/lotusphere-d2d > > _______________________________________________ > > Hsqldb-user mailing list > > Hsq...@li... > > https://lists.sourceforge.net/lists/listinfo/hsqldb-user > > > > > > -- > View this message in context: > http://old.nabble.com/Connection-URL-with-or-without-database-postfix--tp30474386p30480500.html > Sent from the HSQLDB - User mailing list archive at Nabble.com. > > > ------------------------------------------------------------------------------ > Lotusphere 2011 > Register now for Lotusphere 2011 and learn how > to connect the dots, take your collaborative environment > to the next level, and enter the era of Social Business. > http://p.sf.net/sfu/lotusphere-d2d > _______________________________________________ > Hsqldb-user mailing list > Hsq...@li... > https://lists.sourceforge.net/lists/listinfo/hsqldb-user > |