studentcourses
, that lists student names and sid
values with course names and cno
values for courses in which they are enrolled.
CREATE VIEW studentcourses( sname, sid, cname, cno ) AS SELECT s.sname, s.sid, c.cname, c.cno FROM students s, courses c, enrollment e WHERE e.cno = c.cno AND e.sid = s.sid; |
CREATE CLASS k AS SELECT p, p.name, f FROM p IN person, f IN vehicle WHERE f.manufacturer.name = 'Ford' AND p.name = f.manufacturer.president.name; |
⇓ |
{[ p:person, name:STRING, f:vehicle ]} |
{[ p:person, name:STRING, f:{vehicle} ]} |