There are any number of dbf indexes around; just no standard one I can think of 
(I think ndx was the origional?)
As an example ArcGIS 8 has a atx file which is an attribute index[1].

If you would like to write an attribute index; or even hold an attribute index 
in memory; we would welcome the code contribution.

Jody


[1] http://en.wikipedia.org/wiki/Shapefile
On 29/09/2010, at 10:13 PM, Andrea Aime wrote:

> On Wed, Sep 29, 2010 at 9:08 AM, LSA <[email protected]> wrote:
> Hi all!
> 
> I need to perform quick search on dbf, i.e. find specific record by some 
> attribute. I am thinking about using ODBC via JDBC, because 
> 1) it can be used like this:
> Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
> String url = “jdbc:odbc:Driver={Microsoft dBase Driver 
> (*.dbf)};DBQ=d:/shapefiles”;
> Connection con = DriverManager.getConnection(url);
> Statement st = con.createStatement();
> ResultSet rs = st.executeQuery(“SELECT * FROM countries where name='Homeland' 
> ”);
> st.executeUpdate(“CREATE TABLE NEWTABLE (NAME CHAR(32), PASSWD CHAR(32))”);
> con.close(); 2) I don`t know, by I believe it can create index on specific 
> field, so search will be about log2(n) time (n is recordCount).
> 
> That would be news to me. DBF does not define a standard attribute indexing 
> scheme. Maybe some drivers add custom indexes.
>  
> 3) Default geotools data access is slow, unfortunately. Besides, it cannot 
> use attribute index on dbf, as far as I know.
> 
> 
> Not supported as far as I know. 
>  
> So, the question: Does anybody ever performed fast searches on DBFs? 
> What did you used, if so?
> 
> I'd suggest to load the data in to a fast embedded database such as H2 or 
> HSQL, if you have to do many repeated searches that will quickly pay off.
>  
> If ODBC is a good choice? In future we will port our app to unixes, will we 
> have dbf odbc there?
> 
> Unlikely, but I may be wrong.
> 
> Cheers
> Andrea
> 
> -----------------------------------------------------
> Ing. Andrea Aime
> Senior Software Engineer
> 
> GeoSolutions S.A.S.
> Via Poggio alle Viti 1187
> 55054  Massarosa (LU)
> Italy
> 
> phone: +39 0584962313
> fax:     +39 0584962313
> 
> http://www.geo-solutions.it
> http://geo-solutions.blogspot.com/
> http://www.linkedin.com/in/andreaaime
> http://twitter.com/geowolf
> 
> -----------------------------------------------------
> ------------------------------------------------------------------------------
> Start uncovering the many advantages of virtual appliances
> and start using them to simplify application deployment and
> accelerate your shift to cloud computing.
> http://p.sf.net/sfu/novell-sfdev2dev_______________________________________________
> Geotools-gt2-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to