Object–relational mapping: Difference between revisions

Content deleted Content added
main article of a category should get sorted with a space as key so that it appear at the very top of the category per WP:SORTKEY
Removed database management systems (DBMS) from the third paragraph. The "constraints" are in place because of the nature of the database itself and NOT because of the system in place to manage that database.
Line 7:
In [[object-oriented programming]], [[data management|data-management]] tasks act on [[object (computer science)|object]]s that are almost always non-[[scalar (computing)|scalar]] values. For example, consider an address book entry that represents a single person along with zero or more phone numbers and zero or more addresses. This could be modeled in an object-oriented implementation by a "Person [[Object (computer science)|object]]" with an [[attribute (computing)|attribute/field]] to hold each data item that the entry comprises: the person's name, a list of phone numbers, and a list of addresses. The list of phone numbers would itself contain "PhoneNumber objects" and so on. Each such address-book entry is treated as a single object by the programming language (it can be referenced by a single variable containing a pointer to the object, for instance). Various [[Method (computer programming)|methods]] can be associated with the object, such as methods to return the preferred phone number, the home address, and so on.
 
By contrast, many popular database products, such as [[SQL]] [[database management system]]s (DBMS), are not object-oriented and can only store and manipulate [[Scalar (computing)|scalar]] values such as integers and strings organized within [[Table (database)|tables]]. The programmer must either convert the object values into groups of simpler values for storage in the database (and convert them back upon retrieval), or only use simple scalar values within the program. Object–relational mapping implements the first approach.<ref name=hibernate-orm-overview>
{{cite web
|title= What is Object/Relational Mapping?