How to make an Comercial Aplicaction database independant (refrase)

  • Thread starter Gustavo De la Espriella
  • Start date
G

Gustavo De la Espriella

I'm refrasing a question I posted earlier because I didn't explain myself.

I need an efficient way to make an especific comercial application able to
use whatever database the
client prefers a main database, even after the initial installation.
It's a Balanced Scorecard System. And though the structure remains the same,
the client should be able to choose its database (MySQL, SQLServer, Acces,
etc).

Thanks,
Gustavo De la Espriella
 
G

Gopal \(FMS, Inc.\)

If you know your application is always only going to use SQL Server as its
persistent storage format, you can safely go ahead and program using the
SQLClient objects - SQLConnection, SQlDataAdapter, SqlCommand and so forth.
However it can be beneficial to write code more generically so that it
utilitizes the underlying base classes rather than the specific derived
child classes. For example you can write a generic handler that would work
with either a SQLConnection object or an OLEDbConnection object. Simply
write the code in your common handler so that it refers only to the
underlying base classes. Then you can pass specific derived objects to the
common handler, and the same code will work with both types.

BTW, the FMS Total .NET Sourcebook has code to do this, and much, much,
more. Please visit: http://www.fmsinc.com/dotnet/SourceBook/

Hope this helps you.
 
O

Oleg Ogurok

..NET framework 2.0 will support pluggable data access drivers.
With 1.1, it's still pretty messy.

-Oleg.
 
B

bruce barker

you should implement the database factory model. while this pattern is easy
to develop, supporting multiple databases requires some hard decisions. not
all databases support the same features or sql syntax, so you will need to
decide on how to handle - lowest common code, specialized code for each
database, etc.

-- bruce (sqlwork.com)



| I'm refrasing a question I posted earlier because I didn't explain myself.
|
| I need an efficient way to make an especific comercial application able to
| use whatever database the
| client prefers a main database, even after the initial installation.
| It's a Balanced Scorecard System. And though the structure remains the
same,
| the client should be able to choose its database (MySQL, SQLServer, Acces,
| etc).
|
| Thanks,
| Gustavo De la Espriella
|
|
 
M

Matt Berther

Hello Gustavo De la Espriella,

See my response to your original post. I describe an implementation using
AbstractFactory and DataMapper to acheive this.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top