hash - Comparing Data Graphs Using C# GetHashCode() -


i have graph of data i'm pulling oauth source using several rest calls , storing relationally in database. data structure ends having 5-10 tables several one-to-many relationships. i'd periodically go re-retrieve information see if updates necessary in database.

since i'm going doing many users , data not change often, goal minimize load on database unnecessarily. strategy query data oauth provider hash results , compare last hash generated same dataset. if hashes don't match, start transaction in database, blow away data user, re-write data, , close transaction. saves me time of reading in data database , doing compare work see what's changed, rows added, deleted changed etc.

so question: if glue data in memory big string , use c# gethascode(), reliable mechanism check if data has changed? or, there better techniques skinning cat?

thanks

yes, that's reliable mechanism detect changes. not know probabilty of collisions in gethashcode() method, i'd assume safe.

better methods: can't data have version-stamp or timestamp set everytime changes?


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -