Skip to content

A relational database management system based on file data storage, Java socket implemeted

Notifications You must be signed in to change notification settings

w41k4z/Socket-SGBD

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Syntax Check Documentation

Author

Rakotondranaivo Alain Rico

Overview

This document provides a syntax guide for operations based on a whitespace splitter. The syntax is divided into three categories:

  1. Data Definition Syntax (DDS)USE, CREATE, DROP
  2. Data Manipulation Syntax (DMS)ADD, UPDATE, DELETE
  3. Data Query Syntax (DQS)SHOW, GET

1. Data Definition Syntax (DDS) – USE, CREATE, DROP

Operations for managing databases and relations.

Examples:

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.

Notes:

  • RELATION and DATABASE names must not conflict with reserved keywords or existing objects.

2. Data Manipulation Syntax (DMS) – ADD, UPDATE, DELETE

Operations for modifying data within a relation.

Examples:

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.

Notes:

  • The WHERE clause follows this convention:
WHERE colX=valX_OPERATOR_colY=valY

OPERATOR can be AND or OR.


3. Data Query Syntax (DQS) – SHOW, GET

Operations for retrieving information.

Examples:

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.

Notes:

  • WHERE syntax must follow:
WHERE colX=valX_OPERATOR_colY=valY

OPERATOR can be AND or OR.


Final Notes

  • Always ensure correct syntax and naming conventions.
  • Be mindful of reserved keywords when defining names.

About

A relational database management system based on file data storage, Java socket implemeted

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages