Rakotondranaivo Alain Rico
This document provides a syntax guide for operations based on a whitespace splitter. The syntax is divided into three categories:
- Data Definition Syntax (DDS) –
USE
,CREATE
,DROP
- Data Manipulation Syntax (DMS) –
ADD
,UPDATE
,DELETE
- Data Query Syntax (DQS) –
SHOW
,GET
Operations for managing databases and relations.
USE DATABASE Test
Grants access to the Test
database.
CREATE RELATION R1<<col1, col2, col3>>
Creates a relation (R1
) with specified columns.
DROP DATABASE Test
Deletes the Test
database.
RELATION
andDATABASE
names must not conflict with reserved keywords or existing objects.
Operations for modifying data within a relation.
ADD INTO R1 VALUES<<val1, val2, val3>>
or
ADD INTO R1<<col1, col3>> VALUES<<val1, val3>>
Inserts values into specified columns of R1
.
UPDATE R1 SET col1=val2, col2=val3 WHERE colX=valX_OPERATOR_colY=valY
Updates values based on the condition.
DELETE FROM R1 WHERE colX=valX_OPERATOR_colY=valY
Deletes rows matching the condition.
- The
WHERE
clause follows this convention:
WHERE colX=valX_OPERATOR_colY=valY
OPERATOR
can be AND
or OR
.
Operations for retrieving information.
SHOW ALL DATABASE
Displays a list of all databases.
GET ALL FROM R1 WHERE colX=valX_OPERATOR_colY=valY
Returns all matching rows from R1
.
GET col1, col2 FROM R1 WHERE colX=valX_OPERATOR_colY=valY
Returns only specified columns from R1
.
WHERE
syntax must follow:
WHERE colX=valX_OPERATOR_colY=valY
OPERATOR
can be AND
or OR
.
- Always ensure correct syntax and naming conventions.
- Be mindful of reserved keywords when defining names.