Hi @easybiker,
Mattermost is self-hosted, so the database is always under your control and your DBA has complete access to anything stored.
If you upgrade to Enterprise Edition, there's an additional benefit for compliance exports with oversight protection, which provides a user interface for running compliance reports that can be automated for integration into 3rd party compliance solutions, or running manual requests limited by date range, author, and keywords--with all requests and access recorded in an audit log to ensure oversight and prevent abuse.