Order Tray | Contact Us | Home | SIG Lists

[aprssig] Oracle connection ?

scott at opentrac.org scott at opentrac.org
Wed Jun 29 13:56:09 UTC 2005


Andrew, what version of Oracle is it?  If you can get the Spatial extension,
it's pretty cool for APRS use.  You can import shapefiles and run spatial
queries.  For example, I imported shapefiles of all the country borders in
the world and all the states and counties in the US, plus the national
transportation atlas database.  Once that's done you can easily do a query
to, for example, select all stations in New Zealand.  Or all stations within
10 miles of Interstate 40 in Oklahoma.  Or all stations within 5 miles of an
airport.

Scott
N1VG

> -----Original Message-----
> From: aprssig-bounces at lists.tapr.org 
> [mailto:aprssig-bounces at lists.tapr.org] On Behalf Of Andrew Rich
> Sent: Wednesday, June 29, 2005 3:24 AM
> To: TAPR APRS Mailing List
> Subject: RE: [aprssig] Oracle connection ?
> 
> Sorted
> 
> 1) Installed the Oracle Client for LINUX
> 2) Installed DBD::Oracle using cpan
> 3) Define some env variables
> 
> Cheers and thanks guys !
> 
> 
> 
> -----Original Message-----
> From: scott at opentrac.org [mailto:scott at opentrac.org]
> Sent: Friday, 24 June 2005 12:56 AM
> To: 'TAPR APRS Mailing List'
> Subject: RE: [aprssig] Oracle connection ?
> 
> 
> I'd also suggest using bind variables if possible.  
> Generating a SQL statement dynamically (e.g. sql = "select * 
> from table where x = '" & xyz &
> "'") can be a security risk if not done right, and even if 
> you're executing the same query a million times with 
> different values it's still got to parse the statement every 
> time.  If you can use bind variables (e.g. xyz = "foo"; sql = 
> "select * from table where x = &xyz") then Oracle will be 
> able to cache the parsed statement and can process it faster.
> 
> The exact details of how to do it vary depending on the 
> language and interface mechanism you're using.  I'd imagine 
> it's possible in JDBC, but I don't do much Java myself.
> 
> If you want a starting point, I'll see if I can find the 
> source code for my Windows service.
> 
> Scott
> N1VG
> 
> > -----Original Message-----
> > From: aprssig-bounces at lists.tapr.org
> > [mailto:aprssig-bounces at lists.tapr.org] On Behalf Of Gregg Wonderly
> > Sent: Thursday, June 23, 2005 7:43 AM
> > To: TAPR APRS Mailing List
> > Subject: Re: [aprssig] Oracle connection ?
> >
> > >I have the opportunity to place aprs data on an oracle database.
> > >
> > >anyone had experience developing access mechanisms to
> > connect to oracle
> > >?
> >
> > >3) Java
> >
> > Andy, the JDBC interface in Java is straight forward to use.
> > If you need some help, I can give you some code, and make some 
> > suggestions.  The place to start is
> >
> > Connection c = java.sql.DriverManager.getConnection( ...
> > connection parms ... ); Statement stmt = c.getStatement(); try {
> > 	int val = stmt.executeUpdate( "insert into <table>
> > (...) values (...)"); } finally {
> > 	stmt.close();
> > }
> >
> > and for queries,
> >
> > try {
> > 	ResultSet rs = stmt.executeQuery( "select f1,f2,f3 from 
> <table> where 
> > ...");
> > 	try {
> > 		while( rs.next() ) {
> > 			String f1 = rs.getString("f1");
> > 			double f2 = rs.getDouble("f2");
> > 			... do something with the queried data ...
> > 		}
> > 	} finally {
> > 		rs.close();
> > 	}
> > } finally {
> > 	stmt.close();
> > }
> >
> > Gregg Wonderly
> >
> > _______________________________________________
> > aprssig mailing list
> > aprssig at lists.tapr.org
> > https://lists.tapr.org/cgi-bin/mailman/listinfo/aprssig
> >
> >
> 
> 
> 
> _______________________________________________
> aprssig mailing list
> aprssig at lists.tapr.org
> https://lists.tapr.org/cgi-bin/mailman/listinfo/aprssig
> 
> 
> 
> _______________________________________________
> aprssig mailing list
> aprssig at lists.tapr.org
> https://lists.tapr.org/cgi-bin/mailman/listinfo/aprssig
> 
> 






More information about the aprssig mailing list