Reputation: 205
This is the structure of my database. Currently, I have a BIG csv file that contains all the fields. I'm thinking of several solutions:
I'm still at a stage of learning SQL, so I want to find a naive way of importing the data. Any suggestions?
Upvotes: 2
Views: 1396
Reputation: 1270713
I would bring your giant CSV file into a staging table -- you might even want all the fields to be strings, if there might be data conversion issues.
Then, use the staging table to create the tables in your data model. If you are using Postgres, you can actually set up a single set of CTEs to load into all the tables in one expression.
Upvotes: 2