directly accessing the suitedb

  1. Is it considered safe and normal to use a db tool like SQL Developer or MySQL Workbench to directly access the database for viewing data?
  2. In certain cases is it acceptable to bypass the APIs and do direct SQL inserts into custom tables?

Direct access can be useful and is obviously safe if you’re just reading data, not writing.

Writing data is obviously very risky, especially if it’s a mass update on many records. That doesn’t mean you can’t do it, it just means you need a safety net: backups, VM snapshots, etc. And of course, proceed with great care.

If should know one thing: there are no data restrictions enforced on the database level. SuiteCRM keeps everything tidy at the application level. So in the database you will not be warned on any mistakes you do (broken relationships, orphaned records, duplicate keys, etc). So you really need to know what you’re doing… :slight_smile:

Hi,
Of course for a developper, sometimes is better to do all by SQL directly in database.
I never “insert”. Sometimes I “update” some field in a table.

But when you do so, you loose “audit” fonctionality, other like “modified date” … and so.

Regards

1 Like