84 lines
1.1 KiB
Text
Executable file
84 lines
1.1 KiB
Text
Executable file
show incorrect/correct example for each cmd/query
|
|
|
|
---------------
|
|
Queries
|
|
---------------
|
|
|
|
Selection:
|
|
|
|
correct: select ( age == 12 ) people ;
|
|
incorrect: select ( age ))))) people ;
|
|
|
|
Projection:
|
|
|
|
correct: project ( age ) people ;
|
|
incorrect: x
|
|
|
|
Renaming:
|
|
|
|
correct: rename ( age, years old ) ;
|
|
incorrect: x
|
|
|
|
Set Union:
|
|
|
|
correct: x
|
|
incorrect: x
|
|
|
|
Set Difference:
|
|
|
|
correct: x
|
|
incorrect: x
|
|
|
|
Cross Product:
|
|
|
|
correct: x
|
|
incorrect: x
|
|
|
|
-------------------
|
|
Commands
|
|
-------------------
|
|
|
|
Open:
|
|
|
|
correct: OPEN people ;
|
|
incorrect: OPEN ;
|
|
|
|
Close:
|
|
|
|
correct: CLOSE people ;
|
|
incorrect: CLOSE ;
|
|
|
|
Save:
|
|
|
|
correct: SAVE people ;
|
|
incorrect: SAVE ;
|
|
|
|
Exit:
|
|
|
|
correct: EXIT ;
|
|
incorrect: EXIT people ;
|
|
|
|
Show:
|
|
|
|
correct: SHOW people ;
|
|
incorrect: SHOW ;
|
|
|
|
Create:
|
|
|
|
correct: CREATE TABLE people ( age INTEGER, name VARCHAR ( 20 ) ) PRIMARY KEY ( name ) ;
|
|
incorrect: CREATE TABLE people age name ;
|
|
|
|
Update:
|
|
|
|
correct: x
|
|
incorrect: x
|
|
|
|
Insert:
|
|
|
|
correct: INSERT INTO people VALUES FROM ( 12, "Benny" ) ;
|
|
incorrect: INSERT INTO people 12 "Benny" ;
|
|
|
|
Delete:
|
|
|
|
correct: x
|
|
incorrect: x
|