HighTechTalks DotNet Forums  

Best Practices for Data Access

Dotnet Framework (ADO.net) microsoft.public.dotnet.framework.adonet


Discuss Best Practices for Data Access in the Dotnet Framework (ADO.net) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
KA Kueh
 
Posts: n/a

Default Best Practices for Data Access - 12-25-2007 , 09:12 PM






Dear all,

I need to design an smart client application that can run on mulitple and
plugable backend like MS SQL, Oracle or MySQL. Also the smart client is
accessing the database from the internet. What is the best approach?
Thanks.

Regards,
Kueh.



Reply With Quote
  #2  
Old   
Cor Ligthert[MVP]
 
Posts: n/a

Default Re: Best Practices for Data Access - 12-26-2007 , 03:00 AM






Hi kueh,

Quote:
I need to design an smart client application that can run on mulitple and
plugable backend like MS SQL, Oracle or MySQL. Also the smart client is
accessing the database from the internet. What is the best approach?
Maybe you can hire a consultant, however don't expect to get a cheap answer
on this in a newsgroup message and for sure you won't get the overal Best
Practice. That simply does not exist.

Cor



Reply With Quote
  #3  
Old   
msdngroup
 
Posts: n/a

Default Re: Best Practices for Data Access - 12-26-2007 , 11:37 AM



You may see the site http://www.udaparts.com/document/articles/dialupdb.htm


"KA Kueh" <kka (AT) ksm (DOT) com.my> wrote

Quote:
Dear all,

I need to design an smart client application that can run on mulitple and
plugable backend like MS SQL, Oracle or MySQL. Also the smart client is
accessing the database from the internet. What is the best approach?
Thanks.

Regards,
Kueh.




Reply With Quote
  #4  
Old   
Scott M.
 
Posts: n/a

Default Re: Best Practices for Data Access - 12-26-2007 , 11:38 AM



I don't know if there is a "best" approach, but I'd look at using a
DBProviderFactory in a separated data layer to keep the data layer as
independent of the data as possible.


"KA Kueh" <kka (AT) ksm (DOT) com.my> wrote

Quote:
Dear all,

I need to design an smart client application that can run on mulitple and
plugable backend like MS SQL, Oracle or MySQL. Also the smart client is
accessing the database from the internet. What is the best approach?
Thanks.

Regards,
Kueh.




Reply With Quote
  #5  
Old   
Cowboy \(Gregory A. Beamer\)
 
Posts: n/a

Default Re: Best Practices for Data Access - 12-26-2007 , 12:15 PM



Since you want multiple backends, you will want to set up a factory pattern
over the actual data access, so you can use configuration to set the
database. If you want to simplify things, you can use sprocs with the same
name in each "product" of your factory method, but this will not work for
all databi you may try (yes, I know databi is not a real word), as some do
not support sprocs.

As for how to design it, it can depend on the nature of the application. For
maintainability and extensibility, dofactory.com has a reference
architecture with their framework (pretty inexpensive). There are cases
where you might alter the pattern, however.

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

*************************************************
Quote:
Think outside the box!

*************************************************
"KA Kueh" <kka (AT) ksm (DOT) com.my> wrote

Quote:
Dear all,

I need to design an smart client application that can run on mulitple and
plugable backend like MS SQL, Oracle or MySQL. Also the smart client is
accessing the database from the internet. What is the best approach?
Thanks.

Regards,
Kueh.




Reply With Quote
  #6  
Old   
KA Kueh
 
Posts: n/a

Default Re: Best Practices for Data Access - 12-26-2007 , 07:53 PM



Dear all,

Thanks for all the replies. I will take a look at all the suggestions.


"KA Kueh" <kka (AT) ksm (DOT) com.my> wrote

Quote:
Dear all,

I need to design an smart client application that can run on mulitple and
plugable backend like MS SQL, Oracle or MySQL. Also the smart client is
accessing the database from the internet. What is the best approach?
Thanks.

Regards,
Kueh.




Reply With Quote
  #7  
Old   
William Vaughn
 
Posts: n/a

Default Re: Best Practices for Data Access - 12-29-2007 , 04:32 PM



While Greg is right, IMHO this is a tough nut to crack. Any attempt at this
will yield a VERY complex application and programming regimens. Frankly, I
have not seen many (very few in fact) sucessful implementations of this
approach. Most end in failure--overcome by the differences between the
various backends. Consider that you would have to write your applications to
be totally DBMS agnostic--ignoring the features that make one better/more
useful than another. This approach also means you would have N backup
strategies, N management strategies, N sets of stored procedures that cannot
leverage the features of the backend--assuming the backend even supported
SPs. While Oracle and SQL Server both support SPs, they work very
differently. While both are "ANSI-compliant" there are significant
differences. Yes, it's theoretically possible to implement but IMHO probably
N squared more complex to implement than similar but separate applications.

--
__________________________________________________ ________________________
William R. Vaughn
President and Founder Beta V Corporation
Author, Mentor, Dad, Grandpa
Microsoft MVP
(425) 556-9205 (Pacific time)
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
__________________________________________________ __________________________________________
"KA Kueh" <kka (AT) ksm (DOT) com.my> wrote

Quote:
Dear all,

I need to design an smart client application that can run on mulitple and
plugable backend like MS SQL, Oracle or MySQL. Also the smart client is
accessing the database from the internet. What is the best approach?
Thanks.

Regards,
Kueh.



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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.