Take any source page of web site, it will be in html or xml form. Retrieve data using XSLT and getElementById then store in a database. Now online database is ready for use and the operations performed are also on real tme data.
if you talk about existing database
You can use either Weka tool or R Graphs.
In Weka tool you can use existing database or you can upload your own database and analyze it as per your requirements.
If you use R graphs, you can use or uploaded database of your own, derive statistical methods for querying, now you can analyze data after each andank every equation derived.
Both are free to download. Weka tool has got some limitations, you can go with other dataming tools after having acquaintance with Weka,Clementile ...