Hi there,
Think of we have two tables in a database. Table Sale has four columns:
---------------------------------------------
ReceiptID | SaleItem | SaleAmount | StoreID
---------------------------------------------
Table Store has two columns:
---------------------------------
StoreID | StoreName
---------------------------------
Assuming we load the data from flat text file(s). My question is how this text file(s)should be provided or is usually provided?
For example, is it in format A or B?
Format A:
FileA
StoreName, ReceiptID, SaleItem , SaleAmount
=============== =============== =============== ===
Format B:
File 1:
StoreID, StoreName
File 2:
ReceiptID | SaleItem | SaleAmount | StoreID
Certainly, there is almost no difficulty to load for files in format B. However, if we have a file in format A, it seems we have to first transform FileA into File1 and File2, and also need to determine the "StoreID". Think about if we have a lot of foreign keys in a table, the task of this transform looks very hard.
Think of we have two tables in a database. Table Sale has four columns:
---------------------------------------------
ReceiptID | SaleItem | SaleAmount | StoreID
---------------------------------------------
Table Store has two columns:
---------------------------------
StoreID | StoreName
---------------------------------
Assuming we load the data from flat text file(s). My question is how this text file(s)should be provided or is usually provided?
For example, is it in format A or B?
Format A:
FileA
StoreName, ReceiptID, SaleItem , SaleAmount
=============== =============== =============== ===
Format B:
File 1:
StoreID, StoreName
File 2:
ReceiptID | SaleItem | SaleAmount | StoreID
Certainly, there is almost no difficulty to load for files in format B. However, if we have a file in format A, it seems we have to first transform FileA into File1 and File2, and also need to determine the "StoreID". Think about if we have a lot of foreign keys in a table, the task of this transform looks very hard.
Comment