Hello, Our program needs to import/export data from/to different programs, each from specific independant proprieties. Most of these companies would send 2 text files: the first consisting of the data content along with a second one holding descriptions. Suppose this example:
content file: TheArtofDeceptionKevin11.53
Description file: offset[0..16] -> Book name
offset[17..21] -> Author
offset[22..27] -> Price
In order to deal with this problem, I used an Jason based configuration file for each company and in order to extract data I would parse the jason, extract offset informations and import... But recently I was thinking of using a database for this, let's say definning a table with primary key as (company, docType, fieldname) and as columns as (start, end)
What do you think of that last design ? I wish someone has already run through this and help me come up with a good solution.
Thank you,
well I actually meant by using a database, the fact of parsing those configuration files for each company and store description in the DB. This way I think, I won't be needing to parse the config file each time I wanna import data from a specific known company. So all the exchange files are parsed only once and stored into the database, and whenever I need to import data from a new content file I will just query the db and extract the offsets.