•First, the database will get
a Cartesian
Product of all the rows in Order_Types and all the rows returned by the query you want (the query in black).
•Then, the database will perform a sort-unique
operation to discard all the duplicates generated by that
Cartesian product.
SELECT DISTINCT O.Order_ID, O.Order_Date,
C.Name, L.Line_ID, L.Quantity, I.Name
FROM Orders O, Order_Types T, Order_Lines L, Items I,
Customers C
WHERE O.Customer_ID =
:B1
AND L.Order_ID =
O.Order_ID
AND I.Item_ID =
L.Item_ID
AND C.Customer_ID =
O.Customer_ID;