Alex Rivera | Logout

What design patterns should I apply in application with database access

Asked 2011-04-14T15:15:32.360
9

I will start to develop an application that has to access to database. What kind of design patterns area usually need to be implemented to make my application more flexible for example changing DB client from SQL to Oracle.

I believe to perform execution of some query I can implement Template Method Pattern. And to get connection a singleton pattern with double check would be sufficient.

Is there anything else I should know before starting?

Application will be developed in C#, so there is support for object inheritance and polymorphism.

Any help is appreciated.

Edit
Report

1 Answer

0

you should investigate the user of the data mapper pattern to keep the implementation details of how your data is stored (SQL/Oracele/Access) independent from the use of the data itself.

http://martinfowler.com/eaaCatalog/dataMapper.html

answered 2011-04-14T15:23:33.043

Your Answer