Table relationships

I have already taken an Excel spreadsheet and turned it into a mySQL table. I don’t know how to use a spreadsheet to turn it into a whole database, with relationships between tables. I created the ERM in mySQL so data will be more organized, but again I don’t know how to do the relationships.
If anyone knows or can help me, I’ll be really glad
Thks!

Hi Andreasamo,

I am not sure that I fully understand your requirements, so let me summarize it and please correct me if anything is not precise.

You have data in Excel spreadsheet in several worksheets. You have been able to transform this into tables in database. I suppose that by relationships between the table you mean foreign keys. There are two steps for implementation

  • in database tables you will need to create foreign key constraints. This can be done either directly in database or you can use CloverETL’s DBExecute component to run the respective DDL queries creating indexes.

  • you might want to check whether all foreign keys are valid before loading data into database. This can be done using CloverETL’s component CheckForeignKey

  • when loading data into database you will need to load them in correct order (the data referencing other tables can be loaded only after the referenced tables)

For performance reasons (depending on your database and data volumes), it is useful to do the steps as follows:

  • drop all foreign key constrains from the database

  • load data

  • recreate foreign key constrains.

Let me know if you need more details.

Regards,
Jan