I'm hoping this is a simple(ish) question. I'm new to programming on a SQL-Server.
I've got a VB.Net app that is importing/formatting records from a text file.
I would like to output these records to a main table but the design of it is normalized.
For instance in the main table we have instead of a product-type, we have a foreign key to a product table. The records I want to import have the actual product type and I'm guessing can't be imported directly.
What I'm wondering is, do I have to do all the coding, ie: before importing each record, check that the product type actually exists (if not add it to the product table) then change the product type in the record to be imported to the correct foreign key THEN import?
Does that make sense? Or is there an easier way that I don't know about (and what I don't know could fill a library at this point)