ORM/DAO/DataMapper/ActiveRecord/TableGateway 差异?
请您解释一下以下数据库代表(例如 PHP 中的数据库代表)之间的差异:
ORM DAO 数据映射器 活动记录 TableGateway
任何示例将不胜感激。
Can you, please, explain me the differences between the following database representatives, say, in PHP.:
ORM
DAO
DataMapper
ActiveRecord
TableGateway
Any examples would be appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这需要一个相当长的答案。我不会重复其他人在我之前说过的更好、更详细的内容,而是将您链接到一些相关页面。我建议仔细查看它们。也许可以点击一些额外的链接。维基百科总是一个好的开始。如果您在浏览链接后仍然对其中一种模式有任何疑问,请随时返回 SO 并再次询问。但如果你这样做,请尝试缩小范围。提出多个问题并专注于特定方面比期望人们为您写一篇文章更好。
对象关系映射器
数据访问对象
DataMapper
活动记录
表数据网关
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