In: Computer Science
Give an example of an Internet search or database search that utilizes both “and” and “or” operators. Also consider other operators as appropriate for the search. Explain how the search ensures that the desired information is located. Explain how it prevents extraneous information from being included in the results.
Example for database search that utilizes AND and OR operators:
select * from employee where sal<1000 AND age>60.
This conditions check if both the conditions are satisfied and returns the searches that satisfies both the condition.
selevct * from employee where sal>100 OR age>78.
This condition checks any of the two conditions are satisfied and returns result accordingly.
Other operators used for such searches are NOT.
boolean operators commanly used worls accordinlgy as:
AND, for example , indicate that Web page in the result must contain both the word or phrase preceding it and the word following it. OR indicate that page in search results should include any terms on either side in the query than pages that contain both or all terms.
There are various other operators makes it easy to search like "near "operator indicate that the searches words youy have entered must appear whithin number of words of each other. "*" operator can replace one and more letter at the end of a word