使用数据访问对象 (DAO) 来抽象和封装对数据源的所有访问.DAO 管理与数据源的连接以获取和存储数据.DataMapper一层映射器 (473),用于在对象和数据库之间移动数据,同时保持它们彼此独立以及映射器本身.活动记录在数据库表或视图中包装一行、封装数据库访问并在该数据上添加域逻辑的对象.表数据网关充当数据库表网关 (466) 的对象.一个实例处理表中的所有行.Can you, please, explain me the differences between the following database representatives, say, in PHP.:ORMDAODataMapperActiveRecordTableGatewayAny examples would be appreciated. 解决方案 That would require a pretty long answer. Instead of repeating what others have said better and in more detail before me, I link you to some relevant pages. I suggest to look through them. Maybe follow a few additional links. Wikipedia is always a good start. If you still have any questions about one or the other pattern after going through the links, feel free to come back to SO and ask again. But if you do, try to narrow it down. It's better to ask multiple questions and focus on particular aspects than expecting people to write an essay for you.Object Relational MapperData Access ObjectDataMapperActive RecordTable Data Gateway 这篇关于ORM/DAO/DataMapper/ActiveRecord/TableGateway 的区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
05-18 22:40