title: DAO/Abstract Factory Pattern - multiple data sources
body: <p>I currently have some DAOs set up using the abstract factory pattern.  It looks something like this:</p>
  
  <pre><code>public abstract class DaoFactory
      public static GetDaoFactory()
      public abstract IPersonDao GetPersonDao()
      // etc.
  </code></pre>
  
  <p>the static <code>GetDaoFactory()</code> returns an underlying <code>SqlDaoFactory</code>.  Until today, all Daos have worked with the same SQL database.  Now, I would like to add another DAO to this factory, however the DAO will interact with an external service instead of the SQL database (Let's say this is <code>GetCompanyDao()</code>).  I would essentially like just to add this <code>GetCompanyDao()</code> method to the abstract <code>DaoFactory</code> class so the public interface is completely decoupled from the underlying implementation (no need/way to tell if the particular dao is using SQL or the external service).</p>
  
  <p>Should I simply rename the <code>SqlDaoFactory</code> to something more appropriate and include the <code>GetCompanyDao()</code> method there, so that this DAO Facotry now uses SQL for some DAOs and an external service for the other?  Or is there a different way to accomplish this?</p>