This repository has been archived on 2025-04-11. You can view files and clone it, but cannot push or open issues or pull requests.
dmspine64backup/OUTPUT.txt

83 lines
1.4 KiB
Text
Raw Normal View History

2015-09-22 22:49:17 -05:00
---------------
Queries
---------------
2015-09-15 23:13:28 -05:00
2015-09-22 22:49:17 -05:00
Selection:
2015-09-15 23:13:28 -05:00
2015-09-22 22:49:17 -05:00
correct: select ( age == 12 ) people ;
incorrect: select ( age ))))) people ;
2015-09-15 23:21:38 -05:00
2015-09-22 22:49:17 -05:00
Projection:
2015-09-15 23:13:28 -05:00
2015-09-22 22:49:17 -05:00
correct: project ( age ) people ;
2015-09-22 23:03:50 -05:00
incorrect: project age people ;
2015-09-15 23:13:28 -05:00
2015-09-22 22:49:17 -05:00
Renaming:
2015-09-15 23:13:28 -05:00
2015-09-22 22:49:17 -05:00
correct: rename ( age, years old ) ;
2015-09-22 23:03:50 -05:00
incorrect: rename age years ;
2015-09-15 23:21:38 -05:00
2015-09-22 22:49:17 -05:00
Set Union:
2015-09-15 23:13:28 -05:00
2015-09-22 23:03:50 -05:00
correct: union ( people + animals ) ;
incorrect: union people animals ;
2015-09-15 23:13:28 -05:00
2015-09-22 22:49:17 -05:00
Set Difference:
2015-09-15 23:13:28 -05:00
2015-09-22 23:03:50 -05:00
correct: difference ( people - animals ) ;
incorrect: difference people animals ;
2015-09-15 23:21:38 -05:00
2015-09-22 22:49:17 -05:00
Cross Product:
2015-09-15 23:13:28 -05:00
2015-09-22 23:03:50 -05:00
correct: product ( people * animals ) ;
incorrect: product people animals ;
2015-09-15 23:13:28 -05:00
2015-09-22 22:49:17 -05:00
-------------------
Commands
-------------------
2015-09-15 23:13:28 -05:00
2015-09-22 22:49:17 -05:00
Open:
2015-09-15 23:13:28 -05:00
2015-09-22 22:49:17 -05:00
correct: OPEN people ;
incorrect: OPEN ;
2015-09-15 23:13:28 -05:00
2015-09-22 22:49:17 -05:00
Close:
2015-09-15 23:21:38 -05:00
2015-09-22 22:49:17 -05:00
correct: CLOSE people ;
incorrect: CLOSE ;
2015-09-15 23:13:28 -05:00
2015-09-22 22:49:17 -05:00
Save:
2015-09-15 23:13:28 -05:00
2015-09-22 22:49:17 -05:00
correct: SAVE people ;
incorrect: SAVE ;
2015-09-15 23:13:28 -05:00
2015-09-22 22:49:17 -05:00
Exit:
2015-09-15 23:13:28 -05:00
2015-09-22 22:49:17 -05:00
correct: EXIT ;
incorrect: EXIT people ;
2015-09-15 23:21:38 -05:00
2015-09-22 22:49:17 -05:00
Show:
2015-09-15 23:21:38 -05:00
2015-09-22 22:49:17 -05:00
correct: SHOW people ;
incorrect: SHOW ;
2015-09-15 23:21:38 -05:00
2015-09-22 22:49:17 -05:00
Create:
2015-09-15 23:21:38 -05:00
2015-09-22 22:49:17 -05:00
correct: CREATE TABLE people ( age INTEGER, name VARCHAR ( 20 ) ) PRIMARY KEY ( name ) ;
incorrect: CREATE TABLE people age name ;
2015-09-15 23:21:38 -05:00
2015-09-22 22:49:17 -05:00
Update:
2015-09-15 23:21:38 -05:00
2015-09-22 23:03:50 -05:00
correct: UPDATE people SET ( age = 10 ) WHERE ( name == "Bob" ) ;
incorrect: UPDATE ( age = 10 ) WHERE people ;
2015-09-17 17:14:28 -05:00
2015-09-22 22:49:17 -05:00
Insert:
2015-09-17 17:14:28 -05:00
2015-09-22 22:49:17 -05:00
correct: INSERT INTO people VALUES FROM ( 12, "Benny" ) ;
incorrect: INSERT INTO people 12 "Benny" ;
2015-09-15 23:21:38 -05:00
2015-09-22 22:49:17 -05:00
Delete:
2015-09-15 23:21:38 -05:00
2015-09-22 23:03:50 -05:00
correct: DELETE FROM people WHERE ( name == "John" ) ;
incorrect: DELETE IN people WHEN (name=John) ;