Aktuelle Änderungen Printable View Änderungen Bearbeiten
NedBatchelder > NodeJs > Normalisierung > ODBC > OLEDB > OOP > ObjectOrientedProgramming > ORM > ObjectRelationalMapping > ORMapping > ObjectRelationalMapping > ObjectFunctional > ObjectOriented > ObjectOrientedness > ObjectOrientedness > ObjectOrientedProgramming > ObjectRelationalMappingClear TrailThe principle of object-relational mapping is to delegate to tools the management of persistence, and to work at code-level with objects representing a domain model, and not with data structures in the same format as the relational database (.NET's DataSet class). Object-relational mapping tools establish a bidirectional link with data in a relational database and objects in code, based on a configuration and by executing SQL queries (dynamic most of the time) on the database.[1]
The core of relational calculus operates on relations, aka tables. There are three main operators, all of which work on relations/tables: join, which takes two relations and creates a third relation which consists of all possible pairings of the rows of the two original relations; selection, which takes a relation and creates a new relation with only a subset of rows of the original relation; and projection, which takes a relation and creates a new relation with a subset of the columns of the old relation.
These three operations are the core, the heart and soul, of relational calculus—which is the core of SQL. To faithfully model SQL we must, on some level, faithfully model the relational calculus. And this is where I think the Object Oriented programmers go astray in trying to interface to SQL. In their hurry to make things into objects, they immediately (and without fail) declare the rows to be objects—and thus miss the fact that relational calculus and thus SQL is about relations, not rows.
They’re abstracting at the wrong level. [2]