06.02.2013 Views

European Journal of Scientific Research - EuroJournals

European Journal of Scientific Research - EuroJournals

European Journal of Scientific Research - EuroJournals

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Database Interfacing using Natural Language Processing 847<br />

Table 02: Generating INSERT Query from text<br />

Lexicons Phase-I Phase –II<br />

I Noun -----------<br />

want Verb -----------<br />

to Preposition -----------<br />

insert Verb Action<br />

a article -----------<br />

student Noun Table Name<br />

whose Conjunction -----------<br />

Roll No Noun Attribute<br />

is Helping Verb ------------<br />

5 Noun Value<br />

and Conjunction ------------<br />

Name Noun Attribute<br />

is Helping Verb ------------<br />

Ali Noun Value<br />

In this example the ‘Required Set’ field is filled by the ‘Filed Name’ attribute and the ‘Table<br />

Name’ filed is filled by the ‘Table Name’ attribute. Here the table Name is searched from the array <strong>of</strong><br />

available all table sin the database. From all available tables, the nearest table name is picked that<br />

‘students’ in this example.<br />

3.3. DELETE Query<br />

Same like ‘SELECT’ and ‘INSERT’ queries ‘DELETE’ query can also be easily processed. ‘DELETE’<br />

query has five parts as following:<br />

DELETE FROM Students WHERE Age > 25<br />

Keyword Keyword Table Name Keyword Condition<br />

The ‘DELETE’ query typically consists <strong>of</strong> three keywords as ‘DELETE’, ‘FROM’ and<br />

‘WHERE’. Other two required values are ‘Table Name’ and ‘Condition’. To find ‘Table Name’ and<br />

‘Condition’ parameters the English language defined grammatical rule are used as in the following<br />

example:<br />

“I want to delete the students more than 25 years age.”<br />

Following is the complete analysis <strong>of</strong> this simple sentence.<br />

Table 03: Generating DELETE Query from text<br />

Lexicons Phase-I Phase –II<br />

I Noun ---------<br />

want Verb ---------<br />

to preposition ---------<br />

delete verb Action<br />

the article ---------<br />

students Noun Table Name<br />

more preposition Condition<br />

than Noun ----------<br />

25 Noun Value<br />

years Noun -----------<br />

age Noun Parameter<br />

For ‘DELETE’ query, first the condition is defined. In this example Parameter and Value are<br />

combined with Condition parameters. In this example table Name is also retrieved from the array <strong>of</strong><br />

available all tables in the database.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!