0% found this document useful (0 votes)
3 views15 pages

CP Doc

The project report details the development of the Hinglish Schema-Aware Join Engine, an educational database management system designed to simplify data querying for beginners using a Hinglish command interface. It features file-based data storage, schema-aware processing, and supports INNER JOIN and LEFT JOIN operations while emphasizing low-level data handling and error management. The system is modular, lightweight, and primarily aimed at academic purposes, allowing users to learn about database operations without relying on complex SQL syntax.

Uploaded by

akashhedaoo26782
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views15 pages

CP Doc

The project report details the development of the Hinglish Schema-Aware Join Engine, an educational database management system designed to simplify data querying for beginners using a Hinglish command interface. It features file-based data storage, schema-aware processing, and supports INNER JOIN and LEFT JOIN operations while emphasizing low-level data handling and error management. The system is modular, lightweight, and primarily aimed at academic purposes, allowing users to learn about database operations without relying on complex SQL syntax.

Uploaded by

akashhedaoo26782
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Database Management System

Project Report

Project Title:
Hinglish Schema-Aware Join Engine

Prepared By:
 Shivam Gupta
 Harsh Detroja
 Ashik Hegde
 Akash Hedaoo
 Neeraj Jadhav

Institute:
Vishwakarma Institute of Technology, Pune
Problem Statement:

In modern database systems, querying data requires knowledge


of structured query languages like SQL, which can be difficult
for beginners and non-technical users. Additionally, most
academic DBMS projects rely on pre-built systems such as
MySQL or SQLite, which do not expose the internal working of
database operations like joins and schema handling.

There is a need for a simplified, educational system that:

 Demonstrates how relational operations like INNER JOIN and LEFT JOIN
work internally
 Uses file-based storage instead of existing database systems
 Understands user input in a more natural and intuitive format such as
Hinglish (Hindi + English mix)
 Incorporates schema awareness, including concepts like Primary Keys
and Foreign Keys

Features:

1. Hinglish Command Interface


 The system accepts queries in controlled Hinglish (Hindi +
English mix).
 Makes interaction simple and intuitive for users unfamiliar with
SQL.
 Example:
o “students aur marks ko [Link] = marks.student_id par inner
join karke dikha”
2. File-Based Data Storage
 Data is stored in separate .tbl files for each table.
 No use of external databases like MySQL or SQLite.
 Ensures understanding of low-level data handling using file I/O
in C++.

3. Schema-Aware Processing
 Each table contains a schema definition section.
 Supports:
o Column names
o Data types (INT, STRING, etc.)
o Primary Key (PK)
o Foreign Key (FK) with references

 Enables realistic simulation of relational database structure.

4. INNER JOIN Operation


 Supports execution of INNER JOIN based on explicit join
conditions.
 Returns only matching records from both tables.
 Demonstrates nested loop join logic.

5. LEFT JOIN Operation


 Supports LEFT JOIN between two tables.
 Includes all records from the left table.
 Fills unmatched rows with NULL values from the right table.
6. Explicit Join Condition Handling
 Requires user to specify join condition like:
o [Link] = marks.student_id

 Mimics real SQL join behavior.


 Improves accuracy and flexibility.

7. Schema Validation
 Before executing joins, the system:
o Verifies table existence
o Checks column validity
o Validates schema consistency

 Prevents invalid operations.

8. Modular Architecture
 Code is divided into multiple components:
o Parser
o Engine
o Table Handler

 Improves maintainability and scalability.

9. Error Handling
 Handles common errors gracefully:
o Table not found
o Column not found
o Invalid Hinglish syntax

 Provides meaningful messages instead of crashing.

10. Tabular Output Format


 Displays results in a structured table format.
 Clearly shows combined columns from both tables.
 Avoids duplication of join columns.

11. Lightweight and Portable


 Built using standard C++ only
 No external dependencies
 Can run on any system with a C++ compiler

12. Educational Value


 Helps understand:
o File-based storage systems
o Schema parsing
o Join algorithms
o Query processing

 Acts as a simplified model of real DBMS internals


Scope:

1. Educational DBMS Simulation


 The project focuses on simulating core relational database
operations, specifically JOIN operations.
 It is designed primarily for learning and academic purposes,
not for large-scale production use.

2. File-Based Data Processing


 The system operates on pre-existing .tbl files stored locally.
 It demonstrates how databases can be implemented using
basic file handling instead of full DBMS software

3. Limited Query Support


 The engine supports a restricted set of operations:
o INNER JOIN
o LEFT JOIN

 Does not include full SQL features like UPDATE, DELETE, GROUP
BY, etc.
 Focus remains on join processing and schema handling.

4. Controlled Hinglish Language Interface


 The system accepts queries in controlled Hinglish format.
 Not a full natural language processor.
 Works only with predefined patterns and keywords.
5. Schema-Aware Join Execution
 Supports structured schema with:
o Column names
o Data types
o Primary keys
o Foreign keys

 Uses this metadata to perform validated join operations.

6. Basic Join Algorithms


 Uses nested loop join approach for simplicity.
 Does not implement advanced optimizations like:
o Indexing
o Hash join
o Query optimization

7. Command-Line Based System


 Operates through a terminal interface.
 No graphical user interface (GUI) included.

8. Extensibility Scope
The project can be extended in future to include:
 Additional SQL operations (SELECT, WHERE, UPDATE)
 Support for multiple tables and complex joins
 Query optimization techniques
 GUI or web-based interface
 Integration with real NLP models

Modules:

1. Input Handling Module ([Link])


Purpose:
Acts as the entry point of the system.
Responsibilities:
 Accepts Hinglish commands from the user
 Runs in a loop until user exits (band karo)
 Passes input to the parser module
 Displays output returned by the engine

Flow:
User Input → Parser → Engine → Output

2. Parser Module (parser.h / [Link])


Purpose:
Converts Hinglish input into a structured query format.
Responsibilities:
 Converts input to lowercase
 Tokenizes the input string
 Identifies:
o Left table name
o Right table name
o Join type (INNER / LEFT)
o Join condition ([Link] = [Link])

 Validates syntax format


 Generates a query object / structured data for execution

Example:
Input:
students aur marks ko [Link] = marks.student_id par inner join
karke dikha
Output (Parsed):
Join Type: INNER
Table A: students
Table B: marks
Condition: [Link] = marks.student_id

3. Table Management Module (table.h / [Link])


Purpose:
Handles file operations and schema parsing.
Responsibilities:
 Reads .tbl files from /data folder
 Parses:
o Schema section (#schema)
o Data section (#data)

 Stores:
o Column metadata (name, type, PK, FK)
o Table rows

 Provides helper functions:


o Get column index
o Check column existence
o Return rows and schema

Example File:
#schema:
id INT PRIMARY_KEY
name STRING
#data:
1,Shivam
2,Rahul

4. Execution Engine Module (engine.h / [Link])


Purpose:
Executes join operations based on parsed input.
Responsibilities:
 Receives structured query from parser
 Loads required tables using Table module
 Validates:
o Table existence
o Column existence
o Join condition correctness

 Executes:
o INNER JOIN
o LEFT JOIN

 Merges rows based on join condition


 Handles NULL values in LEFT JOIN
 Sends final result for output

5. Join Processing Module (Inside Engine)


Purpose:
Implements the actual join algorithms.
Responsibilities:
 Performs nested loop join
 Matches rows based on condition
 Combines rows from both tables

Algorithms:
INNER JOIN:
 Only matching rows are included

LEFT JOIN:
 All rows from left table included
 Non-matching rows filled with NULL

6. Output Formatting Module


Purpose:
Displays results in a readable tabular format.
Responsibilities:
 Prints column headers
 Combines schema from both tables
 Avoids duplicate join columns
 Displays rows clearly

7. Error Handling Module


Purpose:
Ensures system stability and user-friendly feedback.
Responsibilities:
 Detects and handles:
o Table not found
o Column not found
o Invalid syntax
o Incorrect join condition

 Displays meaningful error messages


 Prevents program crashes

8. Data Storage Module (/data folder)


Purpose:
Stores table files persistently.
Responsibilities:
 Maintains .tbl files
 Keeps schema and data together
 Allows reuse of data across program runs

Overall Module Interaction


User Input

Parser Module

Execution Engine

Table Module (File Reading)

Join Processing

Output Module
Output ScreenShot:

You might also like