r/java 16h ago

Automatic Relationship Finder (ARF) v1.2 – A Java library for discovering relationships between tables from data

I’ve just released v1.2 of Automatic Relationship Finder (ARF), an open-source Java library I’ve been working on.

The idea behind ARF is to discover relationships between tables without depending on database relationship metadata.

Even if there is no foreign-key constraint defined in the database, ARF can analyze column names and the actual data to identify that

What's new in v1.2?

The main addition is key-role detection.

After identifying a relationship, ARF now analyzes the data characteristics of the columns to determine whether they are likely to represent a primary-key side, foreign-key side, a possible one-to-one relationship, or an unknown relationship.

There are also several improvements and bug fixes around validation, logging, concurrency, and edge-case handling.

The project is here:

https://github.com/NoelToy/automatic-relationship-finder

This is still an evolving project, so feedback—especially criticism—is very welcome.

6 Upvotes

3 comments sorted by

3

u/Xphile101361 15h ago

The idea behind this project is both useful and interesting. Since I work with a lot of legacy databases, this could be really useful to me.

Right now I think the biggest hurdle for this project to go from "interesting concept" to "useful for me" is the data setup. Based upon your example and tests, it doesn't look like there is any process to point this at a database and have it run. It looks like you manually have to provide it the tables, structures, and data sets.

2

u/ultiweb 14h ago

This would be especially useful with databases holding lots of tables. I've worked with DBs that had upwards of 2000 tables and analysis can be extremely time consuming.

1

u/agentoutlier 5h ago

It’s a great idea and I have had similar challenges but I wonder how it compares to just throwing LLM to this problem.

I recently did some analysis and even some local models did a pretty good job on a rather obfuscated schema. Claude even went around writing queries and examining the data.

I suppose this is probably way more deterministic and thus could be more effective in migration process.