Name: Anonymous 2008-06-08 13:57
so if you're writing a piece of software which you want to be able to handle communication with databases on multiple sql implementations, what method would you use?
i've been thinking about two so far and not sure which one to pick, or if there are more, basically to either write ansi sql code or whatever, not use any implementation specific special features so my sql queries work with a sql function wrapper and always execute properly
the method i'm leaning more towards right now is to keep ALL sql queries stored in a file, configuration, and have different queries and database schemes for the implementations i'd like to support
i like the second method even though it's more work, because i only want support for the biggest ones, like mysql, postgres and maybe mssql, and i don't even know that much about mssql so i could prolly reuse some of the mysql queries by setting it as a default, or postgres, so if a query doesn't exist in the mssql set, it uses the corresponding mysql query
i've been thinking about two so far and not sure which one to pick, or if there are more, basically to either write ansi sql code or whatever, not use any implementation specific special features so my sql queries work with a sql function wrapper and always execute properly
the method i'm leaning more towards right now is to keep ALL sql queries stored in a file, configuration, and have different queries and database schemes for the implementations i'd like to support
i like the second method even though it's more work, because i only want support for the biggest ones, like mysql, postgres and maybe mssql, and i don't even know that much about mssql so i could prolly reuse some of the mysql queries by setting it as a default, or postgres, so if a query doesn't exist in the mssql set, it uses the corresponding mysql query