SELECT v.manufacturer.president.name FROM v IN vehicle WHERE v.color = 'blue'; |
SELECT manufacturer.president.name FROM vehicle WHERE color = 'blue'; |
SELECT president.name FROM company WHERE headoffice.location = 'Detroit'; |
SELECT * FROM vehicle WHERE manufacturer.name = manufacturer.president.name; |
SELECT emplno FROM company, subsidiary, subsempl, employee WHERE company.name = 'Ford' AND company.companyID = subsidiary.companyID AND subsidiary.location = 'Detroit' AND subsidiary.companyID = subsempl.companyID AND subsidiary.namesubs = subsempl.namesubs AND subsempl.empl = employee.emplno AND employee.name = 'Brown'; |
⇓ from relational SQL to object-oriented SQL |
SELECT e FROM e IN employee, c IN company, s IN subsidiary WHERE c.name = 'Ford' AND s IN c.subsidiary AND s.office.location = 'Detroit' AND e IN s.employee AND e.name = 'Brown'; |