On loading the servlet , a login page is displayed .

If the username entered is not "root" then it's a login by a normal user else it's login by administrator.

User login :
***********

The userid and date of login are inserted into a table "username" in the database. 
There is no formal authentication of a normal user.
The page displayed to user provides him ways to query the database.
The user can use simple search techiques to search for given set of keywords by specifying the catalogue.
The user can also use advanced search techniques to search for a given set of keywords by specifying the catalogue and also the choice of whether the keywords are and-exclusive, or-exclusive or not-exclusive.
To make it easier for the user to provide keywords during search , user is provided an option by which he can find list of keywords in every catalogue present in the database.
Starting from the top-level hierarchy , user can view the hierarchy of any catalogue and on reaching a leaf catalogue (one which has no other child catalogues) , all products with description same as that keyword are displayed.
User also has an option to login as a differet user.

RootLogin :
***********

The password entered by root is matched with the password present in "register" table and authentication is done accordingly.
The page displayed to root provides him ways to query and update the database.
Root is provided with all facilities available with a normal user except that of login as a different user.
Apart from these, root has many other options to update the database.
Root has the option of inserting a catalogue by specifying the parent catalogue. For this root is provided option to view the entire hierarchy of catalogues.
Root can also delete a catalogue by specifying the catalogue name and deletes are cascaded.
Root can delete a product by specifying the productid and deletes are cascaded.
Root can insert a new product by specifying price , catalogues and various attributes which can viewed by using the option of viewing the list of keywords.
Root can make a dynamic refresh on the ranks assigned to the various products. 
Root can also do password change by specifying the old password and new password (specifying 2 times) .
Root can logout at any time.

