3 ms·
to try to be a little clearer - I meant swap amongst MySql/Oracle/SQLServer/whatever. It seems that this was (still is?) one of the purported advantages of an
by bflbfl 13y ago
to try to be a little clearer - I meant swap amongst MySql/Oracle/SQLServer/whatever. It seems that this was (still is?) one of the purported advantages of an ORM in general, and I was just curious how often it really even comes into play.
- sherril8 13y agoThe benefit of using an ORM is that if you did want to change the type of database, most of your code would be able to go unchanged (theoretically). If you did switch, you should be able to just change a config file to let the ORM know which database you are now using. The ORM will then run the correct underlying queries. This usually comes with a hit to performance though. Raw queries are generally quite a bit faster. So if you dont plan on changing databases on a project, it might be beneficial to skip the ORM where possible. The ORM also doesnt help you with migrating the records from one database type to another. So if you already have established records that is a separate issue.
- jeff303 13y agoI've "swapped" H2 and Sybase in a Java/JPA/Hibernate project. I use quotes because H2 was an in-memory DB for the unit tests, but it has the same table structure in both cases. And it wasn't really swapped so much as built at the same time, but the same code did work on both.
- deleted 13y ago[deleted]