Data
Reverse-engineer a schema
An ERD and a data dictionary for a database nobody documented.
Fill it in
The DDL.
Relationships the schema never declared.
What each column actually holds.
Your prompt
Reverse-engineer this schema. Find the relationships the schema never declared. Legacy databases are full of foreign keys that exist by convention: a `cust_no` column that joins to `customer.id` with no constraint. Those are the real structure, and a diagram with only the declared keys shows a dozen unconnected islands. Write what each column MEANS, not what it stores. "status varchar(2)" is the schema; "status: AC active, SU suspended, CL closed, and XX which appears in 200 rows from before 2019" is the dictionary. Name the tables that look abandoned and say what suggests it. Every legacy database has four, and knowing which is worth more than the diagram.
Use Reverse-engineer a schemaOpens with everything above already filled in.
Why this works
Legacy databases are full of foreign keys that exist by convention and not by constraint, so a diagram of only the declared ones shows a dozen unconnected islands. This infers them, and writes what each column means rather than what it stores.