Address standarization using C# dictionary data or table sql server data? -


i'm developing application address standardization in c# using form (desktop application) , sql server 2005. work follow:

my model in sql:

---------------------|    table correctaddress |  ---------------------|  correctaddressid pk  |  correctaddress       |  ---------------------|   -------------------| table wrongaddress | -------------------| wrongaddressid pk  | wrongaddress       | correctaddressid fk| -------------------|  -------------------------| table standardizeaddress | -------------------------| standardizeaddressid  pk | streetname               | -------------------------| 

correctaddress: 70.000 records
wrongaddress: 900.000 records
standardizeaddress: maybe 1 or 1.000.000 records.

and query , change "streetname" "correctaddress" is:

select s.standardizeaddressid, s.streetname, c.correctaddress   correctaddress  c         inner join wrongaddress        w on c.correctaddressid = w.correctaddressid         inner join standardizeaddress  s on w.wrongaddress = s.streetname 

this query work, when i've million or thounsand of standardizeaddress records, take time (20 minutes).

so, looking best solution, saw c# dictionary data structure. question if same work using c# dictionary? putting correctaddress , wrongaddress in c# dictionary correctaddress?

it work better? or there best option? i'm thinking using dictionary:

public correctaddress dictionary(of string, string) = new dictionary(of string, string)  public sub new()         directionals             .add("riverside drive", "rvrsid drve")             .add("union street", "unon strt")             .add("grand avenue", "grnd avene") -- , on until 900.000 records! end 

tanks comments!

despite fact hard actual bottleneck in case, reading post, if think handling data in memory, can use dataset (a collection of datatable). can query them sql in memory well.


Comments

Popular posts from this blog

java - Custom OutputStreamAppender not run: LOGBACK: No context given for <MYAPPENDER> -

java - UML - How would you draw a try catch in a sequence diagram? -

c++ - No viable overloaded operator for references a map -