[GeoNetwork-devel] [GeoNetwork opensource Developer website] #312: Easier database setup

#312: Easier database setup
-------------------------+--------------------------------------------------
Reporter: osjonathan | Owner: geonetwork-devel@…
     Type: enhancement | Status: new
Priority: minor | Milestone: v2.6.0
Component: General | Version: v2.6.0RC2
Keywords: |
-------------------------+--------------------------------------------------
Something I posted to the geonet-users mailing list but doesn't seem to
have been picked up.

My I suggest more consistency and clarity in the config.xml file where it
comes to the jdbc <url>? At present the various default <url> lines look
like this:

                 <url>jdbc:mckoi://localhost:9157/</url>

                 <url>jdbc:mysql://$WEBSERVER_HOST/geonetwork</url>

                 <url>jdbc:oracle:thin:@IP:1521:fs</url>

                 <url>jdbc:postgresql:geonetwork</url>

At present the various default <url> lines look like this:

                 <url>jdbc:mckoi://localhost:9157/</url>

                 <url>jdbc:mysql://$WEBSERVER_HOST/geonetwork</url>

                 <url>jdbc:oracle:thin:@IP:1521:fs</url>

                 <url>jdbc:postgresql:geonetwork</url>

i.e. They all specify the IP address and port in a different manner and to
someone new to jdbc (i.e. myself) it's hard to know what part is what,
especially for postgre which isn't showing any connection details.
May I suggest the following instead:

<url>jdbc:mysql://localhost:3306/$DATABASE_NAME</url>

<url>jdbc:oracle:thin:localhost:1521:$SID</url>

<url>jdbc:postgresql:localhost:5432/$DATABASE_NAME</url>

This way all four database connection types are consistent in their
default setup, allowing the user to easily configure them.

(Hint: if you are going to use the above, check them for accuracy; as
noted I am new to JDBC).

--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/312&gt;
GeoNetwork opensource Developer website <http://trac.osgeo.org/geonetwork&gt;
GeoNetwork opensource is a standards based, Free and Open Source catalog application to manage spatially referenced resources through the web. It provides powerful metadata editing and search functions as well as an embedded interactive web map viewer. This website contains information related to the development of the software.

#312: Easier database setup
-------------------------+--------------------------------------------------
Reporter: osjonathan | Owner: geonetwork-devel@…
     Type: enhancement | Status: new
Priority: minor | Milestone: v2.6.0
Component: General | Version: v2.6.0RC2
Keywords: |
-------------------------+--------------------------------------------------

Comment(by osjonathan):

Whoops, messed up the copying and pasting there. The middle set of URL's
shouldn't be there obviously.

--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/312#comment:1&gt;
GeoNetwork opensource Developer website <http://trac.osgeo.org/geonetwork&gt;
GeoNetwork opensource is a standards based, Free and Open Source catalog application to manage spatially referenced resources through the web. It provides powerful metadata editing and search functions as well as an embedded interactive web map viewer. This website contains information related to the development of the software.

#312: Easier database setup
-------------------------+--------------------------------------------------
Reporter: osjonathan | Owner: geonetwork-devel@…
     Type: enhancement | Status: new
Priority: minor | Milestone: v2.6.0
Component: General | Version: v2.6.0RC2
Keywords: |
-------------------------+--------------------------------------------------

Comment(by heikki):

All JDBC drivers have different connection strings -- some include
hostname, some include portname, other ones only use a database schema
name, and so on. For a list of thise see for example
http://www.java2s.com/Tutorial/Java/0340__Database/AListofJDBCDriversconnectionstringdrivername.htm.

Conceivable we could create a kind of façade to this, as you are
suggesting, so one could enter the necessary information for each driver
in the same format, but in my opinion this is not desired, for the
following reasons:

1. it is normal amongst JDBC applications to put the connection string
just like GeoNetwork does it; this is what everybody expects

2. because of the variety in information needed to be provided to build
the connection string for various drivers, any façade necessarily will be
full of parts that should not carry any information for any particular
driver; this will be only more confusing, I think

Just my 2¢ ..

--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/312#comment:2&gt;
GeoNetwork opensource Developer website <http://trac.osgeo.org/geonetwork&gt;
GeoNetwork opensource is a standards based, Free and Open Source catalog application to manage spatially referenced resources through the web. It provides powerful metadata editing and search functions as well as an embedded interactive web map viewer. This website contains information related to the development of the software.

#312: Easier database setup
-------------------------+--------------------------------------------------
Reporter: osjonathan | Owner: geonetwork-devel@…
     Type: enhancement | Status: new
Priority: minor | Milestone: v2.6.0
Component: General | Version: v2.6.0RC2
Keywords: |
-------------------------+--------------------------------------------------

Comment(by osjonathan):

Hi Heikki,
I think you mis-understand me.
My suggestion is purely a aesthetic one really. Basically, the current
strings all use different syntax to say the same thing in the default
config. Instead I'm suggesting something very like your link shows with
its use of <HOST> and <PORT> to consistently show the parameters across
different strings.

I'm not suggesting GeoNetwork changes the way the strings are use or
processed, only that the default values in the config.xml be changed to
something clearer.

I.e. At present in the default config.xml one says "$WEBSERVER_HOST", one
says "@IP", and another says "geonetwork", yet all of these are supposed
to be representing the <HOSTNAME>.

Hope that clears it up.

--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/312#comment:3&gt;
GeoNetwork opensource Developer website <http://trac.osgeo.org/geonetwork&gt;
GeoNetwork opensource is a standards based, Free and Open Source catalog application to manage spatially referenced resources through the web. It provides powerful metadata editing and search functions as well as an embedded interactive web map viewer. This website contains information related to the development of the software.

#312: Easier database setup
-------------------------+--------------------------------------------------
Reporter: osjonathan | Owner: geonetwork-devel@…
     Type: enhancement | Status: new
Priority: minor | Milestone: v2.6.0
Component: General | Version: v2.6.0RC2
Keywords: |
-------------------------+--------------------------------------------------

Comment(by heikki):

OK, so I had indeed misunderstood you there.

In this case, sure.

I'd suggest we follow the connection string representations as they are
listed in
http://www.java2s.com/Tutorial/Java/0340__Database/AListofJDBCDriversconnectionstringdrivername.htm.

And why not put in a few more, while at it ? With Oracle we already have
non-Open Source in there anyway.

--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/312#comment:4&gt;
GeoNetwork opensource Developer website <http://trac.osgeo.org/geonetwork&gt;
GeoNetwork opensource is a standards based, Free and Open Source catalog application to manage spatially referenced resources through the web. It provides powerful metadata editing and search functions as well as an embedded interactive web map viewer. This website contains information related to the development of the software.

#312: Easier database setup
-------------------------+--------------------------------------------------
Reporter: osjonathan | Owner: geonetwork-devel@…
     Type: enhancement | Status: new
Priority: minor | Milestone: v2.6.0
Component: General | Version: v2.6.0RC2
Keywords: |
-------------------------+--------------------------------------------------

Comment(by osjonathan):

No Problem.
Yes, using the representation methods from that page should be good (i.e.
the Angle brackets<> ), though the Oracle ones on there don't seem to
include <host>.

As to other strings - If Geonetwork can use those databases then it'd be a
good thing though probably a different ticket.

--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/312#comment:5&gt;
GeoNetwork opensource Developer website <http://trac.osgeo.org/geonetwork&gt;
GeoNetwork opensource is a standards based, Free and Open Source catalog application to manage spatially referenced resources through the web. It provides powerful metadata editing and search functions as well as an embedded interactive web map viewer. This website contains information related to the development of the software.

#312: Easier database setup
-------------------------+--------------------------------------------------
Reporter: osjonathan | Owner: geonetwork-devel@…
     Type: enhancement | Status: new
Priority: minor | Milestone: v2.6.1
Component: General | Version: v2.6.0RC2
Keywords: |
-------------------------+--------------------------------------------------
Changes (by ticheler):

  * milestone: v2.6.0 => v2.6.1

--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/312#comment:6&gt;
GeoNetwork opensource Developer website <http://trac.osgeo.org/geonetwork&gt;
GeoNetwork opensource is a standards based, Free and Open Source catalog application to manage spatially referenced resources through the web. It provides powerful metadata editing and search functions as well as an embedded interactive web map viewer. This website contains information related to the development of the software.

#312: Easier database setup
-------------------------+--------------------------------------------------
Reporter: osjonathan | Owner: geonetwork-devel@…
     Type: enhancement | Status: new
Priority: minor | Milestone: v2.6.2
Component: General | Version: v2.6.0RC2
Keywords: |
-------------------------+--------------------------------------------------
Changes (by heikki):

  * milestone: v2.6.1 => v2.6.2

--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/312#comment:7&gt;
GeoNetwork opensource Developer website <http://trac.osgeo.org/geonetwork&gt;
GeoNetwork opensource is a standards based, Free and Open Source catalog application to manage spatially referenced resources through the web. It provides powerful metadata editing and search functions as well as an embedded interactive web map viewer. This website contains information related to the development of the software.