Sure.
Usually in MODX, you need a schema for your custom database table.
Maybe take a look at the linked thread. There is a video that explains how you can create a schema with the extra ExtraBuilder that simplifies this step.
With MODX you usually use xPDO to interact with the database. Take a look at the documentation to see how you can query/update the data.
If you want to use AJAX-requests on the frontend to manipulate the data, then maybe take a look at the extra QuickApi.