6 Replies - 389 Views - Last Post: 11 July 2019 - 11:53 AM Rate Topic: -----

#1 ik3   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 12
  • Joined: 28-May 19

Java application with H2Base

Posted 10 July 2019 - 03:42 PM

Hi, I'm creating a Java GUI application that will use the H2base database. Is there anyway that each download or instance of this program could have its own unique database? Would I have to create the database table in a java file that will be added to the other files and exported as a jar?
Is This A Good Question/Topic? 0
  • +

Replies To: Java application with H2Base

#2 modi123_1   User is online

  • Suitor #2
  • member icon



Reputation: 15160
  • View blog
  • Posts: 60,694
  • Joined: 12-June 08

Re: Java application with H2Base

Posted 10 July 2019 - 03:59 PM

Something like Sqlite?
Was This Post Helpful? 0
  • +
  • -

#3 ik3   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 12
  • Joined: 28-May 19

Re: Java application with H2Base

Posted 10 July 2019 - 04:11 PM

View Postmodi123_1, on 10 July 2019 - 03:59 PM, said:

Something like Sqlite?


I haven't worked with SQLite before. Is this not possible with H2base?
Was This Post Helpful? 0
  • +
  • -

#4 modi123_1   User is online

  • Suitor #2
  • member icon



Reputation: 15160
  • View blog
  • Posts: 60,694
  • Joined: 12-June 08

Re: Java application with H2Base

Posted 10 July 2019 - 04:18 PM

H2base looks to be a full on server.. Sqlite is just a file.
Was This Post Helpful? 0
  • +
  • -

#5 g00se   User is offline

  • D.I.C Lover
  • member icon

Reputation: 3639
  • View blog
  • Posts: 16,716
  • Joined: 20-September 08

Re: Java application with H2Base

Posted 11 July 2019 - 04:49 AM

Quote

Is there anyway that each download or instance of this program could have its own unique database?

Yes, that's normal with an embedded DB. It works both embedded and C/S

Quote

Would I have to create the database table in a java file that will be added to the other files and exported as a jar?

afaik yes. Check the docs
Was This Post Helpful? 0
  • +
  • -

#6 baavgai   User is offline

  • Dreaming Coder
  • member icon


Reputation: 7463
  • View blog
  • Posts: 15,469
  • Joined: 16-October 07

Re: Java application with H2Base

Posted 11 July 2019 - 06:43 AM

View Postmodi123_1, on 10 July 2019 - 06:18 PM, said:

H2base looks to be a full on server..

Hmm, I've never used this beasty before, either, but it looks like they're trying to be everything to everyone:

Quote

Embedded and server modes; in-memory databases
-- https://www.h2databa.../html/main.html

The database URL for connecting to a local database is jdbc:h2:[file:][<path>]<databaseName>


What they seem weak on is any decent example code to speak of, unless this silliness counts: https://www.h2databa...cheatSheet.html
Was This Post Helpful? 0
  • +
  • -

#7 g00se   User is offline

  • D.I.C Lover
  • member icon

Reputation: 3639
  • View blog
  • Posts: 16,716
  • Joined: 20-September 08

Re: Java application with H2Base

Posted 11 July 2019 - 11:53 AM

Yes, that looks a pretty poor level of documentation
Apache Derby otoh is well documented and capable of running embedded
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1