It seems you are lacking in the knowledge of basic database concepts. I certainly am not the person to explain it, but I know there are plenty of useful books on how relational databases work, and the theory behind it. For sure, SQL is not the most sophisticated query mechanism, but most relational databases do offer ways to consolidate information and get you what you need. Generally if you have a table of states, and another table of cities with some sort of mapping, you would create a state capitals view that returned the information you need. If this isn't your cup of tea, hire a DBA, who lives for this kind of excitement. The rules of how to efficiently organize data in a relational database have to do with data integrity and consistency.