i have an excel file which describe all the table structure of a database table
I would like to generate database schema diagram and database schema structure for sqlite3 database from this excel file.
Any idea how to do that ?
Thanks.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Assuming each tab is named for a table and has cells as such:
Use either Python or Java to read the workbook using python-excel or Apache POI for Excel, respectively. I’m sure other languages, particularly .NET have libraries for this purpose as well. Both languages also have drivers for sqlite3.
Iterate through each tab – use the tab name for the table CREATE statement. Iterate through each row on the tab and use that information to define the columns for the table. Defining things like primary/foreign keys and auto incrementing will require some additional cells or a naming convention + some clever algorithms.
Most likely each CREATE statement will need to passed separately over the database connection.