About database,I can install SQL 2005/mySQL/postGRE etc which is recommnded for archival kind of thing?It means it should not cause too much overhead.
What kind of overhead are you talking about? All DBs need to be administered.
AJAX and servlets? that means I need Tomcat or other servlet engine also right?I can go for that.which combination PHP/AJAX or servle/AJAX in terms of efficiency?Recently I used PHP and found that code is difficult to maintain.
It's hard to advise on what language to use without knowing more about the team that'd be doing the development, the existing infrastructure etc. If you don't want to use PHP, and there are no other considerations, then don't use it.
Both PHP and servlets/JSP can access databases - the web layer implementation language (and whether or not AJAX is used) really has nothing to do with how you might archive and access database data.