H2 and its database URL for files: about extensions

30 views
Skip to first unread message

Paluee

unread,
Dec 11, 2009, 4:36:48 PM12/11/09
to H2 Database
Hi there,

On the tutorial for URL format I see this.
*****************************************************************************
Topic URL Format and Examples
Embedded (local) connection jdbc:h2:[file:][<path>]<databaseName>
jdbc:h2:~/test
jdbc:h2:file:/data/sample
jdbc:h2:file:C:/data/sample (Windows only)
******************************************************************************

I am interested in the embeded and this URL:

jdbc:h2:file:C:/data/sample (Windows only)

I am a little confused about what the extension is for the file based
database.
In the example above is the name of the single file on disk "sample".
If there is no extension for this H2 database, can one created a
database file name like
"sample.hdb"

So hence my URL would now be :
"jdbc:h2:file:C:/data/sample.hdb"

Please let me know if it does or it doesn't have some required
extension.
And if not can I name it with one.

Sincerely,

Paul





Thomas Mueller

unread,
Dec 14, 2009, 3:15:41 PM12/14/09
to h2-da...@googlegroups.com
Hi,

> I am a little confused about what the extension is for the file based
> database.

See http://www.h2database.com/html/features.html#database_file_layout

Where the .h2.db are for versions 1.2.x, and
.index.db, .data.db, .log.db are for version 1.1.x.

Regards,
Thomas
Reply all
Reply to author
Forward
0 new messages