If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > General > Database Concepts & Design > customizing Query

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-08-06, 01:47
srinivas_puppala srinivas_puppala is offline
Registered User
 
Join Date: May 2006
Posts: 1
customizing Query

Hi,

This is srinivas,i need an info regarding customizing query irrespective of any database i.e the backend may be anything like MYSQL,SQLServer,Oracle ,MS Access etc there should be one common query for all these databases to retrieve and insert the values.
I hope my Question is clear.Once Again we don't know which database client will use.we should customize our query in a way that it sould work with different databases.

Eagerly Awaiting Your answers


regards
sreenivasu puppala
Reply With Quote
  #2 (permalink)  
Old 05-08-06, 07:16
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,524
what you want to do (one sql query for any database backend) is not possible
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
  #3 (permalink)  
Old 05-08-06, 07:43
healdem healdem is offline
Jaded Developer
 
Join Date: Nov 2004
Location: out on a limb
Posts: 9,246
the best thing to do in this case is to abstract the database interface into a separate class, then sub class each SQL / database from that abstraction class. it will mean writing databse specific access within each sub class.

although there have been several attempts to define standard SQL, via ISO, no one supplier produces a database that matches that standard, they all come close, but no one is standards compliant. therefore there will always be a need to wrtie database specific SQL. (well untill tow or more database vendors produce a standards complaint database - but I'm not holding my breath.
__________________
I'd rather be riding my Versys or my Tiger 800 let alone the Norton
Reply With Quote
  #4 (permalink)  
Old 05-08-06, 08:34
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,524
actually, mimer database is supposedly completely compliant
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On