Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Support for multiple SQL implementations

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

Name: Anonymous 2008-06-08 15:14

Why are we being so helpful?
Anyway, you need to localize the SQL queries, right? And what do we use for localizating language strings? That's right, gettext.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List