Learn English – order of modifiers

grammarmodifiers

A result of two tables JOIN'ed is a cartesian product of the tables to which a filter is applied which selects only those rows with joining columns matching.

In the above sentence, which word does the modifier "to which a filter is applied" modify?
a cartesian product or the tables or a cartesian product of the tables?

And again, which word does the modifier "which selects only those rows with joining columns matching" modify? a cartesian product or the tables or a cartesian product of the tables?

Best Answer

You have to look at the context to determine what nouns the modifiers are supposed to modify. In this case, the nouns and their modifiers are right next to each other:

Cartesian product of the tables --> to which a filter = filter of the tables

tables filter is applied --> which selects on those... = the filter selects...

The JOIN filter is being applied to both tables. Since "product" already implies that some operation has occurred, we can deduce that the filter was operating on the tables and that the product was the result. What is it filtering? Those rows with joining columns matching. Again, we can deduce that it is the filter that is selecting something, because that is the definition of a filter: selecting some but not all of a collection.

Admittedly, the sentence could be much clearer, e.g.,

A result of two tables JOIN'ed is a Cartesian product of the tables. The JOIN statement applies a filter to both tables and selects only those rows with joining columns matching.

Related Topic