2
Yes, they are both references to the same database object.
Usually, when calling the database in a handler class, the database object is referenced in a class variable $db - which is used with $this->db->functionName()
In functions and browser-called files, the $xoopsDB variable is usually used with the similar $xoopsDB->functionName().
$this->db is usually set in the handler class constructor (or its parent's constructor)
For more information on $this->something, please refer to the PHP manual on class variables.
"When you can flatten entire cities at a whim, a tendency towards quiet reflection and seeing-things-from-the-other-fellow's-point-of-view is seldom necessary."
Cusix Software