CS157b
Chris Pollett
Mar 8, 2023
<Query> ::= <SFW> <Query> ::= (<Query>) // '::=' should be read as 'can be expressed as' <SFW> ::= SELECT <SelList> FROM <FromList> WHERE <Condition> <SelList> ::= <Attribute>, <SelList> <SelList> ::= <Attribute> <FromList> ::= <Relation>, <FromList> <FromList> ::= <Relation> <Condition> ::= <Condition> AND <Condition> <Condition> ::= <Tuple> IN <Query> <Condition> ::= <Attribute> = <Attribute> <Condition> ::= <Attribute> LIKE <Pattern> //etc....
SELECT name FROM MovieStar WHERE birthdate LIKE '%1960'
Might yield parse tree:
SELECT LNAME FROM EMPLOYEE E, WORK_ON W WHERE E.ID=W.EID AND W.PID=37