• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

post address search

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
dear folks here, I am student from singapore. currently I am doing a software design project. one of the crucial parts is to identify the post address that the user keyed in. a simple example, user keys in "city hall xx club" then my java program should be able to varify wether such a place exists.

in order to achieve that, I got to build a database covers certain part of singapore with post address. however, I am not very clear how to build a such kind of database to store large amount and correlated post address.

second, any efficient search alorithm to make the search pocess smooth and fast. problem like "what if user keyed in a wrong character, how can I figure out the correct or highly possible post address?"

thanks a lot
 
(instanceof Sidekick)
Posts: 8791
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You might google "address verificatio" or "address standardization" for existing commercial solutions and see if you get any hints. We have used a couple vendors for exactly this kind of address verification. They get a database of all valid addresses from the US Post Office and build their own logic on top. Of course the USPO won't have Singapore but you might find some ideas.
 
Ranch Hand
Posts: 1608
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Here in Australia, you just download the database (I've modified it slightly for a particular application) from 'Australia Post'.

I believe in the US, you use a public API distributed by the US Postal Service.

Singapore has gotta have something similar.
 
Frank king
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
then for search alorithm, what kind of search alorithm is appropriate?
I am not very familar with those search alorithm. can you suggest me one, then I can research on that topic.


thanks
 
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Do we have any such APIs from USPS in US? If so, please let me know, I need address validation in our application too.
 
Ranch Hand
Posts: 1923
Scala Postgres Database Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The search-algorithm. would depend on the datastructure, and if you find an api, it will have a search-algo build in.
RDBMSs, i.e., have a search-algo. which you just use.
 
Ranch Hand
Posts: 1312
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


in order to achieve that, I got to build a database covers certain part of singapore with post address. however, I am not very clear how to build a such kind of database to store large amount and correlated post address.



็How many record of your data ?

IF you want to search some data in database(large amont of data), you should be created index of column to use in search algorithm.
 
somkiat puisungnoen
Ranch Hand
Posts: 1312
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

second, any efficient search alorithm to make the search pocess smooth and fast. problem like "what if user keyed in a wrong character, how can I figure out the correct or highly possible post address?"



First Solution: create index in serch column.
Second Solution : How to check wrong charactor of post address.

I think, post address have some format such as XXXXX is have values between 10000 to 99999, So you can check input data.
 
somkiat puisungnoen
Ranch Hand
Posts: 1312
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Frank king:
then for search alorithm, what kind of search alorithm is appropriate?
I am not very familar with those search alorithm. can you suggest me one, then I can research on that topic.


thanks



In most database have text-search algorithm in itself.

you chould be create your sql statement to query data and tunning performance such as create index, sql statement, upgrade database server .. etc.
 
Frank king
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am using Mysql as my database. thoe searching text alorithm also provided in this software?
 
Stefan Wagner
Ranch Hand
Posts: 1923
Scala Postgres Database Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
for example...
 
somkiat puisungnoen
Ranch Hand
Posts: 1312
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Full Test-Search Function in MySQl

or you can use Lucene
 
Nothing up my sleeve ... and ... presto! A tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic