if you just keep track of the persistence of the model and see that it causes the conservation of your resource model
$this->_getResource()->beginTransaction();
$dataCommited = false;
try {
$this->_beforeSave();
if ($this->_dataSaveAllowed) {
$this->_getResource()->save($this);
$this->_afterSave();
this resource has a method
$this->_getWriteAdapter();
from which you can call many sql methods
source
share