I have a database of all countries and cities, I would like to use ajax to use it to give suggesstions in the country cities fields in forms, I have a lot of tables in my db related to the inner workings of the site. Is it ok if I put this in a different database (just this world map database)? I rather put it in a different db so it’s more organized and I wouldnt really be connecting to it on the same pages that I connect to the main database. basically a small php page that will suggest strings with json. I was wondering if a seperate db means sharing the db pooll and decrease of performance!??
I should add that these new tables are and sql script on geobytes.com and I don’t know how good they are or if I am gonna use them down the path! I hope to find something better with a uptodate list of ip tables! like ip2location
There’s nothing particularly wrong with that. I dont know if its necessary – if its just a table or two I cant see why it’d matter much performance or security wise, either way. If you are concerned about the script accessing those additional tables, you can use a different database user name for your json script and set that to read only so that if it does get exploited somehow, it cant alter your other tables.
Honestly I think your best bet is to keep it in one db for now, but write your script flexible enough that you can point it at a separate database should the need ever arise.