DAO structure with factory