Hi Cristian,
I don't know all of the related SQL queries to access this data directly from the database but if you are interested in constructing SQL queries for data extraction, you might find the following resources useful.
First, please see this slide deck:
These slides include further information and sample queries that should help you learn how archival descriptions are represented in the database. Essentially, from what I understand, data is spread across multiple tables.
Note as well that one of the first slides recommends that you try setting up a front-end tool to help you explore the database in a visual way - I recommend looking into either
MySQL Workbench or
PHPMyAdmin.
We also have Entity Relation Diagrams from the AtoM database on the wiki, to help you learn how the database is constructed. See:
In terms of extracting the entire database, you can easily create a SQLdump of the database contents. We use this as part of the upgrade process, for example. See:
If you can use the data in other forms (such as a CSV file), you might consider simply performing a CSV export of your data. See:
Take a look around the documentation, there are other ways to get the data out as well, such as CSV export from the user interface, EAD XML exports (both command-line and user interface), and AtoM even has an API that can serve json.
Regards,