What does it mean that "OOP languages ​​are organized around schedules"?

In Studying SQL Hard Way , the author says:

OOP languages ​​are organized around graphs, but SQL only wants return tables

What does it mean that the OOP language is organized around the schedule? Does this mean that data is stored in specific memory addresses?

+5
source share
2 answers

As Nick.McDermaid notes above, the corresponding graph value is an abstract data type .

In an object-oriented language, an “object graph” consists of objects and a has-a relationship between them. For example, a Person object may have a field of type Collection<Address> , in which case the graph of the object should include a relationship from the person to all his / her addresses.

A sentence immediately after your quote: "If SQL returned a nested data structure, then that would not be a problem." If you select Person from the table, you will not automatically receive all the relevant rows from ADDRESS . Of course, you can make a JOIN , but then the result set will contain one copy of the Person row for each of the corresponding ADDRESS rows. Therefore, you must do some translation work after receiving the query results in order to create a graph of objects that you would like to work with.

+6
source

The relationships between the object represent graph .

+2
source

Source: https://habr.com/ru/post/1203914/


All Articles