问题描述
请向我解释以下数据库代表在PHP中的区别:
Can you, please, explain me the differences between the following database representatives, say, in PHP.:
ORM
DAO
DataMapper
ActiveRecord
TableGateway
ORMDAODataMapperActiveRecordTableGateway
任何例子都会感激。
推荐答案
这将需要一个很长的答案。我不会重复他人说的更好,更详细的在我面前,我链接到一些相关的页面。我建议通过他们。也许跟随几个额外的链接。维基百科总是一个好的开始。如果你在通过链接后还有任何关于一个或另一个模式的问题,请随时回到SO并再次询问。但如果你这样做,试着把它缩小。最好问多个问题,关注某些方面,而不是期望人们为你写一篇文章。
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 Mapper
Data Access Object
DataMapper
>
Active Record
在数据库表或视图中包装行的对象封装了数据库访问,并在该数据上添加了域逻辑。
Table Data Gateway
这篇关于ORM / DAO / DataMapper / ActiveRecord / TableGateway差异?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!