Installing database through RPM

Hi everyone

I have just joined a software developing team. I am new to unix. Basically
we are developing a product, the problem is when the end user will install this package we would like to install the datbase associated with our product using RPM.
Can it be done?
how secure it is?
and what are the step/logic in the shell script to install the database automatically while installing the product package at the client side.

please help me on this topic.