Hi,
I'm Asterisk dCAP with more than ten (10) years of experience in the development of Asterisk solutions. I'd worked with transaccional IVR connected to MySQL, Postgress and MariaDB using PHP scripts in some health institutions and Call Centers around the world.
I usually create a flow diagram of the IVR's call flow and later begin to write the code. Give me more details of your project and I'm going to make it possible.