Connecting Portal to Database

Hi,

I have a requirement in wM 7.1 in which the log events which are logged to the database need to be displayed in the portal.That is there should be a connection between the portal and the database.

Is there any way to do this?If yes then how do we connect the portal to any database?