Image In Model

Just wondering how you guys deal with uploading images and storing the location of the image in the database. I’m coming from a Drupal background so I am used to the way Drupal saves image.

Is there a way to set this up like Drupal via Yii?

I was looking into the image-attachment module but it doesn’t store the location in the database.

For example: