Content deleted Content added
m Article Class improved from stub using AWB |
Tag: |
||
(15 intermediate revisions by 8 users not shown) | |||
Line 1:
{{WikiProject
{{WikiProject Computing|importance=}}
}}
==Introduction==
"This creates, in effect, a "virtual object database" that can be used from within the programming language." I don't think this is the only way for ORM mechanisms/frameworks/tools. Instead, I will say that this is a common implementation for ORM solutions. "Mapping" as relating objects to rows could be solved by creating "hybrid" objects (objects with PK or FK attributes), but also with a real external mapping without changing or mixing ___domain classes with records. [[Special:Contributions/63.128.77.30|63.128.77.30]] ([[User talk:63.128.77.30|talk]]) 17:00, 16 March 2015 (UTC)
"technique for converting data between incompatible type systems" sounds like a contradiction in terms. Compatible means two types are able to be converted between, so if they're incompatible, you can't convert between them. <!-- Template:Unsigned IP --><small class="autosigned">— Preceding [[Wikipedia:Signatures|unsigned]] comment added by [[Special:Contributions/2601:283:4A80:5300:A40A:B4F:1584:3532|2601:283:4A80:5300:A40A:B4F:1584:3532]] ([[User talk:2601:283:4A80:5300:A40A:B4F:1584:3532#top|talk]]) 20:19, 5 April 2022 (UTC)</small> <!--Autosigned by SineBot-->
I updated the summary today to try and address some of these concerns. I think the name of the technique gives a solid foundation for an encyclopedic article to explain what these tools do: they map objects to relations. Also, while the title doesn't imply this, in practice with "ORM" people mean that the objects are in a heap, and the relations are in a database. So for a first layer of definition, ORM is automated mapping of objects in a heap, to relations in a database. Then, as a second layer of detail, I listed out the common things that a framework will map at all (lifecycle management, foreign keys, inheritance, contention). I'm sure I missed a few, in that list, but it's a start. I didn't do anything about it, but I think those four things would make excellent subsections of the "Challenges" section later on the page. [[User:Lexspoon|Lexspoon]] ([[User talk:Lexspoon|talk]]) 14:00, 9 January 2023 (UTC)
==Relational vs. Non-Relational==
SQL isn't relational, and most of the mentions of 'relational' here aren't correct but refer to SQL actually. So I am correcting the article and will move it. [[User:Leandrod|Leandrod]] 19:58, 21 September 2005 (UTC)
: I am sure there is an interesting hair being split here, but in general, "SQL" is the industry standard for accessing "relational" databases, and "ORM" is what this kind of tool is called. I don't know what more to say about the subject without understanding what hair is being split exactly. Is the issue that SQL is a pragmatic real-world language rather than an idealized relational formalism? But ORM tools are also pragmatic real-world tools. Suffice to say I agree with other editors who have changed it all back to "object-relational mapping". [[User:Lexspoon|Lexspoon]] ([[User talk:Lexspoon|talk]]) 13:57, 9 January 2023 (UTC)
I don't know what you mean by "SQL isn't relational" SQL is a language designed to act create, modify and select data from relational databases. In any case the whole rest of the world refers to what you've decided to call "Object-SQL mapping" by the term "Object-Relational Mapping" I refer you to the google score of 248 result for "object sql mapping" and 380,000 for "object relational mapping" with similar results with and without a dash. If the article needs to be clarified and improved please do so, but unless I hear back from you or others, I will move this article back to object-relational mapping, which, I strongly believe is where the vast majority of people expect to find it. [[User:Kznf|Charles (Kznf)]] 01:16, 15 October 2005 (UTC)
Line 90 ⟶ 100:
"But in general, the pros outweigh the cons when using this paradigm." This statement is a judgment by the author. Pros and cons should be listed, but it's up to the reader to decide whether the pros outweigh cons. <span style="font-size: smaller;" class="autosigned">—Preceding [[Wikipedia:Signatures|unsigned]] comment added by [[Special:Contributions/150.228.40.142|150.228.40.142]] ([[User talk:150.228.40.142|talk]]) 18:34, 9 April 2009 (UTC)</span><!-- Template:UnsignedIP --> <!--Autosigned by SineBot-->
I agree that Wikipedia shouldn't have bald opinions of individual authors. That said, there's a lot of potential encyclopedic content around referring to standard critiques and defenses of ORM. I'll say this non-neutrally on the talk page: having worked for years with ORM tools, I find that they make an easy problem even easier (tedious code to map columns to fields), but then add their own problems that are often really hard and time-consuming to solve (loss of control around locking, reading way more data than you need before making a small edit, reading back data after a save that you usually just throw away anyway, way more complex update commands than if you wrote the SQL by hand), plus the experience of pervasive mystery about what your program is doing. That's on the critique side. I am sure it depends on context, though, and that there are people with good experiences that could provide a defense of these tools. For example, some databases are just used by a single user at a time, in which case a lot of the cons won't really be an issue. [[User:Lexspoon|Lexspoon]] ([[User talk:Lexspoon|talk]]) 14:16, 9 January 2023 (UTC)
== New Proposed Article ==
Line 141 ⟶ 153:
I'm not sure if this is true across all ORM technologies. If it is then should this be made clearer in the article as an advantage to ORM? <span style="font-size: smaller;" class="autosigned">— Preceding [[Wikipedia:Signatures|unsigned]] comment added by [[Special:Contributions/87.237.64.150|87.237.64.150]] ([[User talk:87.237.64.150|talk]]) 09:34, 12 April 2012 (UTC)</span><!-- Template:Unsigned IP --> <!--Autosigned by SineBot-->
Just an observation, but how much of an actual real world advantage is the ability to switch RDBMS without re-coding? Every significant (non-dysfunctional) project I have worked on has defined a single RDBMS at the beginning of the project; either by selecting one or having an incumbent that would take more money to migrate from than the total cost of the planned development. So, in an enterprise development environment (as opposed to an Open source project that may want to support MySQL and PostgreSQL and...) all an ORM gives you is a convenient syntactic sugar to instantiate objects. The cost of this sugar is having the mappings to maintain (instead of the hand-coded object loading code) and being abstracted away from the database. The last thing is a huge hidden cost as in my experience, it encourages developers to not learn how to optimize SQL in their RDBMS. For example, here's a blog post [http://zeroturnaround.com/blog/hibernate-jpa-and-xrebel-continued-understanding-eager-lazy-and-join-fetch-queries-with-an-interactive-profiler/] which describes how to improve Hibernate performance. If the developer had hand-coded the SQL they wouldn't have to spend time digging into why Hibernate was hitting the database 24 times instead of once. Also, when you know a particular dialect of SQL e.g. Oracle you learn more efficient ways of writing SQL that takes advantage of features unique to Oracle. Yes that's vendor lock-in, but in reality most companies do not change RDBMS unless they have a really compelling reason because it is so costly for so little business benefit. Just my 5c <span style="font-size: smaller;" class="autosigned">— Preceding [[Wikipedia:Signatures|unsigned]] comment added by [[Special:Contributions/203.161.88.62|203.161.88.62]] ([[User talk:203.161.88.62|talk]]) 05:39, 20 August 2014 (UTC)</span><!-- Template:Unsigned IP --> <!--Autosigned by SineBot-->
== What about Micro OR/Ms? ==
Would be nice to see some information about those so-called "Micro OR/Ms" that came up within the last 1-2 years, namely Dapper, Massive, PetaPoco and others. <span style="font-size: smaller;" class="autosigned">— Preceding [[Wikipedia:Signatures|unsigned]] comment added by [[Special:Contributions/81.14.229.174|81.14.229.174]] ([[User talk:81.14.229.174|talk]]) 17:05, 20 November 2012 (UTC)</span><!-- Template:Unsigned IP --> <!--Autosigned by SineBot-->
== Data Mappers ==
I've added some information today about Object-Document Mappers and Data Mappers as a general term. These subjects are only related to ORMs and I was unsure if they belonged here - but there is no Data Mapper page on Wikipedia, but perhaps there should be?
== Incorrect C# code? ==
This example C# line is given as a way to find the person with ID 10:
: var person = Person.Get(Person.Properties.Id == 10);
However, it looks wrong to me. (Person.Properties.Id == 10) would yield a bool: either true or false. It isn't a lambda or closure or a method that can run to perform a search. [[User:Equinox|Equinox]] [[User_talk:Equinox|◑]] 15:36, 7 March 2023 (UTC)
: (Weeks later: I have removed the incorrect code.) [[User:Equinox|Equinox]] [[User_talk:Equinox|◑]] 05:51, 23 March 2023 (UTC)
|