hello all!!
I am a newbie to shell scripting and to learn it I took a project in which I m facing a tremendous amount
problems....I Need Your HELP!! the Details of project are as follows:
while learning shell scripting, i came up with an idea to make a 'Database/Record management system' as
my major project in this semester
with a specific query language to interact with it. what i wanted was...
as when you type like
SELECT */EMPNO,ENAME,JOB,SAL FROM EMP
in Oracle , you get the result of
desired fields..i wanted the same thing to happen when i invoke a command in terminal with
column names as arguments... it should get the output as we get in SQL Prompt.
the whole thing i wanted to create a package/utility for unix/linux that could emulate SQL.. i.e, to create
CREATE,SELECT,INSERT, etc all DML, DDL,TCL commands. I named this 'GQL'...
now the whole process should go as follows:
when you type gql in terminal you should get a restricted environment with GQL prompt,
$ gql //for entering in the package where other commands & Databases(Directories) stored
//after a while GQL prompt Should appear as
GQL>
Now use the existing database as:
GQL>use <Database_name> //choosing one of the database(Directory)
//OR
Create a Database as: // we should not be able to Create table(file) before 'use' command.
GQL>Create database <Database_name>
//Now you can execute DDL Statments as:
GQL>create table <table_name>
Fields Type Constraint(if any)
Field1:
Field2: #press ctrl+c when done
*******************************************************************************
in simple meaning ..a Database means collection of tables...so creating a database would simply mean creating
a directory and creating a table means creating file in particular directory...
all the record is in the form of text delimited by colon !!
the problem i m facing is how to implement the 'Datatype' & 'Constraints' over the fields..as they are mere the text of a file!!
i have written the 'gql' script which is mere a prompt changing $ path setting script but i wanted that when GQL prompt appears no other shell commands like 'cd', 'mkdir' etc could run it should be a separate environment. plz tell me how can i achieve this.
I have also written the 'project' script which resembles the SQL , SELECT Statement without WHERE Clause....now i want to add the Where clause functionality to it but i cudn't find any approach for it ...plz help!!
********************
i know u'd say that this is of no worth as we already have Oracle, PostgreSQl, MySql....the openoffice Databases..and hundreds of utility of this kind.... which are a thousands times better than this. but its my college project and by the end of semester i have to submit it...and I've already started!! so plz guide me!!!
I want ur reviews , comments, suggestions over the project...its feasibility that what i m thinking of is possible or not....its enhancement and scope.. other alternatives how can i make it better and significance...
I m attaching the screen sccreenschots of my work along with the scripts....
plz Do hav look over it...GUIDE me to optimize the scripts..
NOTE: plz dont
over my scripts .. as i m a newbie!!
regards,
prayush

