问题描述
你能,请解释一下我下面的数据库重新presentatives,可以说,在PHP之间的区别:
Can you, please, explain me the differences between the following database representatives, say, in PHP.:
ORMDAODataMapper的ActiveRecord的TableGateway
ORMDAODataMapperActiveRecordTableGateway
任何例子是AP preciated。
Any examples would be appreciated.
推荐答案
这将需要pretty的长的答案。不是重复别人怎么说我以前更好,更详细的,我连你的一些相关的网页。我建议仔细看看他们。也许遵循一些额外的链接。维基百科始终是一个良好的开端。如果您仍然有大约一或有任何疑问经过联系后,对方的模式,随时回来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
对象 - 关系映射(ORM,O / RM和O / R映射)的计算机软件是一种编程技术在关系型数据库和面向对象的编程语言不兼容的类型系统之间转换数据。
Data Access Object
使用一个数据访问对象(DAO)来抽象和封装所有访问数据源。在DAO管理与数据源,以获得和存储数据的连接。
DataMapper
一个层映射器(473)的,虽然他们保持相互独立,并映射器本身的对象和数据库之间移动数据。
Active Record
这包装在一个数据库表或视图的行的目的,封装了数据库的访问,并增加了域逻辑上的数据。
Table Data Gateway
这充当网关(466)到数据库表的对象。一个实例句柄表中的所有行。
这篇关于ORM / DAO /的DataMapper / ActiveRecord的/ TableGateway区别在哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!