As long as you have the correct access to the database, you could. The Moodle database is a database, like any other, it should be a black box as it is only the interface, the GUI, that defines Moodle.
Be interesting to see if this works, though, trying to structure data via a different data extraction tool can be a serious headache. If the data is encrypted, then you will need the correct encryption key. From discussions about Moodle v2.0, long ago, so I am relying on memory here, there was a lot of discussion about the way in which data values would be encrypted seriously enhancing the internal security of the database. Also, I seem vaguely to recall that you will need to get the correct sesskey value as well, without it, you may not get anything useful. Having said that, phpMyAdmin and similar tools will access the database and produce the majority of data. It is not always in a useful form, but the GUI does allow you to construct SQL statements to extract useful data for reports and such.