ORM / DAO /的DataMapper / ActiveRecord的/ TableGateway区别在哪里? [英] ORM/DAO/DataMapper/ActiveRecord/TableGateway differences?

查看:1255
本文介绍了ORM / DAO /的DataMapper / ActiveRecord的/ TableGateway区别在哪里?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你能,请解释一下我下面的数据库重新presentatives,可以说,在PHP之间的区别:

Can you, please, explain me the differences between the following database representatives, say, in PHP.:

ORM DAO DataMapper的 ActiveRecord的 TableGateway

ORM DAO DataMapper ActiveRecord TableGateway

任何例子是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映射)的计算机软件是一种编程技术在关系型数据库和面向对象的编程语言不兼容的类型系统之间转换数据。

Object-relational mapping (ORM, O/RM, and O/R mapping) in computer software is a programming technique for converting data between incompatible type systems in relational databases and object-oriented programming languages.

数据访问对象

Data Access Object

使用一个数据访问对象(DAO)来抽象和封装所有访问数据源。在DAO管理与数据源,以获得和存储数据的连接。

Use a Data Access Object (DAO) to abstract and encapsulate all access to the data source. The DAO manages the connection with the data source to obtain and store data.

DataMapper的

DataMapper

一个层映射器(473)的,虽然他们保持相互独立,并映射器本身的对象和数据库之间移动数据。

A layer of Mappers (473) that moves data between objects and a database while keeping them independent of each other and the mapper itself.

活动记录

Active Record

这包装在一个数据库表或视图的行的目的,封装了数据库的访问,并增加了域逻辑上的数据。

An object that wraps a row in a database table or view, encapsulates the database access, and adds domain logic on that data.

表数据网关

Table Data Gateway

这充当网关(466)到数据库表的对象。一个实例句柄表中的所有行。

An object that acts as a Gateway (466) to a database table. One instance handles all the rows in the table.

这篇关于ORM / DAO /的DataMapper / ActiveRecord的/ TableGateway区别在哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆