Author: Yurii Palaida
Mathesar is a tool that helps non-technical users to utilize the capabilities of a PostgreSQL database with an intuitive and user-friendly interface.
Like most other databases, PostgreSQL cares a lot about data integrity. So, it’s almost impossible to accidentally delete some object (table, view, constraint, etc.). If you’re deleting any referenced object, a database will restrict this operation with a warning that’ll be clear only to the developer.
My project during this Google Summer of Code was to construct this warning manually for the end user so that they could read it: the so-called dependency graph. It includes two parts:
At the project finale, there were three new endpoints for getting dependents graphs for schema, table and table column objects, and a bunch of unit and integration tests to validate the query behavior.
A separate specifications page describes both the technical intricacies of implementation and the high-level overview of the project. With it, it’ll be easy to add this graph to other resources in the project.
The main challenges while working on the project were:
Next steps for improving the project:
Special thanks to Mukesh Murali for constant support and help during our weekly meetings and the Mathesar team for being an excellent place for open-source newcomers.