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-09 15:52

Don't forget Sqlite! I really like that library. Great for small apps and computers where memory is limited. mysqld is currently using 17MB on my computer. I haven't checked how much loading the Sqlite library is, but I'd wage it's much less. On the other hand, MySQL only requires one process for any number of applications, and MySQL, of course, is superior in terms of features than Sqlite. Still, the idea of needing a 17MB process running in the background on my desktop computer bothers me.

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