I have a set of 30 odd sql files. I don’t know their structures. At the same time, I would like to generate DDLs out of these structures with primary and foreign key relationships. For an example, if I have a Product CSV and an Order CSV files, I would like to:
Read their schema automatically in Python and generate a DDL (any database will work).
Let’s say once DDLs are generated for both files, I can see Product ID, which is a primary key in Product table, is also a foreign key in Order table. I would like to detect/suggest this relationship automatically by scanning metadata of schemas gathered in step 1.
Both steps must be automated in Python if possible.
Any help would be much appreciated.