I want to create a j2ee application creating data base on local machine. this application should be useful for some 10-15 people. I cant use oracle because no dedicated database will be there. i want to use java as the intermediate platform. So can you please help in how to go about this work. what to use as database which can use sql queries etc etc.
Install the Netbeans 6.1 bundle with the JDK. It will make J2EE apps easy. If you really need j2EE, which I expect you don't. You can do what you want with JSP and beans, and skip all the J2EE over head.
Go to mysql.com and download their community MySql. Use JDBC to connect your application to mysql, and you are set to go.
Deploy it on Tomcat when you are done with the development.
These are good responses to the question however they assume quite a bit. ansh, your question is quite broad and its impossible to answer questions that cover so much in a single thread.
I would advise that you tackle this problem in small chunks. For example, forget about the database for now. There is plenty you need to do and understand before a database even comes into the picture. For starters, your background in developing JEE applications is what? Never done it? Done some small servlet/jsp apps?