First you have to detect the engine and then have the needed interface that works same on top but works differently for different database connectivity.