Technologies like LINQ do a good job of describing relational data queries with types such as IQueryable
, IGrouping
and IOrderedQueryable
modeling, selection, aggregation, sorting, etc. These concepts from relational algebra allow us to transfer a rather arbitrary query in one language on one computer and execute it in another language (~ sql) on another machine.
It would be nice to do the same for even more complex multi-part queries, and even for data management commands including INSERT
s, UPDATE
s and DELETE
that can describe a complete operation without the overhead of the first extraction / wetting of data at the application level, which is typical for object-oriented relational-mappers or orm.
In the application, we could describe an operation, such as Delete all Customers (and their Orders ), the last Order older than 2 years (and, in addition, it is assumed that cascading deletions are not included for this relationship). This is certainly effective, say, ADO with a t-sql script, but cannot be done in ORM without the cost of selecting, transferring, humidifying, and tracking data at the application level and possibly issuing separate delete commands. (Maybe there are some optimizations available for ORM that can do this more efficiently in some cases, but usually AFAIK they cannot). The problem with the release of the t-sql script, of course, is that there are no type checks or any parameters or returned data in the statement.
The advantage of destroying the ground, the ability to simulate these arbitrary commands for remote execution, in addition to reducing execution time and network costs, is that invariants in the domain can be encoded and registered at the application level, which can then be automatically emitted along with any special command.
A
, $10,000,000.00, whoa 1 B
, " , lastName ( , , , ). , Order , , A
, B
, , A
. script ( , ), , , . , , , , / - .
, , ( SELECT
), INSERT, UPDATE DELETE ( DML) , , t-sql.
, DML - . Tutorial-D jOOq, , - - , . ?
, , , , :
, ? , , , . ?
- plalx
, ddd , . . , , . // / .
. , , -, . " , " () " , ".
- uosɐs
, , . " , , , / , . , , , . , , . Inventory, , " ", .
- plalx
ddd, . , , ddd. , (, , ). , .
- uosɐs
, "", . , .
- plalx
, , , , , Orders. , , $10,000,000.00 Limit Customer (, , ), - : . , . , , , ? ddd ( 1000 ), .
- uosɐs