locked
data source abstraction RRS feed

  • Question

  • Is there an architecture that handles any data source.

    besides all types of data source  that are being supported by DTS, Biztalk...say anew type of datasource is a screen data.

    how would architecture to be defined inorder to abstract any data source.

    Friday, August 3, 2007 8:43 AM

Answers

  • Sounds an aweful lot like you need to implement the Provider Design Pattern.

    A great resource I have found on this pattern is here:

    http://msdn2.microsoft.com/en-us/library/ms972319.aspx

     

    We use this pattern in our inhouse code generator, it makes switching datasources a piece of cake if implemented properly.

     

    I hope this was helpful.

    Friday, August 3, 2007 5:52 PM
  •  

     

    Try the DBProviderFactory class, I believe that would help you,

     

    Good luck,

     

    Martin.

     

    Monday, August 6, 2007 2:00 AM
  • What if your data source is an image file?

    You would then write a custom provider to read the image file, as long as it implements the right interface you are good to go.

     

    Monday, August 6, 2007 6:10 PM

All replies

  • Sounds an aweful lot like you need to implement the Provider Design Pattern.

    A great resource I have found on this pattern is here:

    http://msdn2.microsoft.com/en-us/library/ms972319.aspx

     

    We use this pattern in our inhouse code generator, it makes switching datasources a piece of cake if implemented properly.

     

    I hope this was helpful.

    Friday, August 3, 2007 5:52 PM
  •  

     

    Try the DBProviderFactory class, I believe that would help you,

     

    Good luck,

     

    Martin.

     

    Monday, August 6, 2007 2:00 AM
  • wat if my datasource is a image file

     

    Monday, August 6, 2007 1:52 PM
  • What if your data source is an image file?

    You would then write a custom provider to read the image file, as long as it implements the right interface you are good to go.

     

    Monday, August 6, 2007 6:10 PM
  •  

    A factory object only handles the choosing of a particular provider of data.

     

    The provider model would allow you to provide whatever implementation you would like to provide.  If you consider your image data as a data source, then why not use an existing class to help you out?

     

    Good luck,

     

    Martin.

    Monday, August 6, 2007 11:44 PM
  •  

    Hi nsgashis;

    Yes, there are mutiple architectures that support any data sourceSmile. Let me name few of them...OLE DB, ODBC, JDBC, ADO .Net...etc. All of these are created to handle any data source and abstract it. All you need is to write the OLE DB Provider, ODBC driver....etc.

    All the above abstract the physical data storage and provide unified representation of data to the client applications using unified APIs. DTS for example can handle many data sources as long as they provide OLE DB or ODBC driver. DTS understands the OLE DB and ODBC architecture not specific database technology. Another example would be Enterprise Library which uses the ADO .Net architecture and provide more functionalities and ease of use on the top of it.

     

    Think of the image file on the same way. Yes, you need to create a provider for it. I cannot just imagine holding data in image file, that must be a CIA projectSmile

     

     

     

     

     

    Tuesday, August 7, 2007 6:44 AM