I'm a rookie at databases but am having a problem that I can't seem to figure out. Sorry in advance if this is too long, I am trying to summarize all my efforts so you know exactly what I have done so far. I have an app has some logic in it and then does 3 queries to a database. First query checks if a value exists, second checks if another(related) value exists and third one, if does not exist, adds related value. Think of me doing a query on the number 2, and if it exists I check for 3 and add it if needed. I do this loop a large number of times(I am looking at overall queries but I suspect this program is more read heavy than write). I used to use just a hashtable in my program but as I added multiple proceses I had sync'ing issues, so I decided to use a database so multiple cores can work on this at the same time. I'm a rookie at databases but am having a probl