I think it would be better to use ORM here. Something like Ruby ActiveRecord, Perl Class: DBI or DBIx :: Class or even java Hibernate.
Ruby ActiveRecord already offers built-in support for working with MySQL, PostgreSQL, SQLite, Oracle, SQLServer and DB2, while hibernation works with a much larger number of databases ( Databases with hibernation support )
When working with ORM, you have a single way to work with the database. Of course, queries must be written in ORM (Ruby, Perl, Python, Java, etc.), and not in SQL. But in this way you also gain confidence that equivalent operations are performed in all DB mechanisms, and you need to support only one “DDL / DML” instruction file for all databases.
Hope this helps
source share