Hi Vana,
Welcome to the forum (and the world of PI)!
Let me give you a little breakdown, not about the PI server directly but about the products/interfaces.
You have the server components (PI Server), the client components (ProcessBook, Datalink, Manual Logger...), Interfaces (PItoPI, RDBMS...) and the section of interest to you is the layered products (PISDK, AFSDK, PI OLEDB, PI JDBC Driver). In fact, if you look at the OSIsoft engineering plan you get a better idea for the breakdown.
OSIsoft Engineering PlanAs you can see OSI released the PI JDBC driver to enable PI connectivity for Java applications, I suggest you have a good look at it. Alternatively, you could use web services but it depends on how much data, how often, complexity and your application design to determine how you connect to PI.
Hope this helps.
Rhys.
Principal Consultant
Real-Time Data Management @ Wipro Technologies