0

I have two applications that have clients, the clients on application A may have different names than the application B. I'm receiving an Excel with data from application B that comes with the client name on one of the columns. This Excel can have hundreds of thousands of lines...

I need to check if the client B exists on A, and if not, i have to create it. Now, on B were identified several clients that should represent the same client on A (I can´t change B, if I could I would remove "duplicates") but not always the name that client B has, should be the same in A. With this in mind, there's Excel to map Client A to client B (even if client A is not in A).

Example:

| Client A Name | Client B Name 1 | Client B Name 2 | Etc

| Client 1      | Client asd      |                 |    

| Client 2      |                 |                 |

| Client 3      | Client fgh      | Client 123      |

This mapping is supposed to grow, I would say it is not supposed to changed the existing data, but I can never be sure, and so far it has 6234 lines, 12095 cells with data.

I would like to know the best way to deal with this amount of data in order to process the client.

Ideas i have:

1) Load the Excel into a BD table

Good Things:

  • BD are the best way to save data (right?)
  • Easy way to load the saved data with one select
  • Easy to implement CRUD

Bad Things:

  • My company has very bureaucratic stuff... to install in QA and PRD i have to go through 2 teams and sometimes wait more than a week per environment and since this development can still change its requirements and business logic i'm trying to escape this...
  • No matter what gui i make people will always use excel to change the mapping and they prefer to keep it that way...

2) Load the mapping to memory everytime i need to run this process

Good things:

  • No connections to the BD asking for the data and to save, so no need for CRUD
  • One less layer involved

Bad Things:

  • Slower
  • not dry, since I would repeat a somewhat unnecessary load process every run

3) Load the data from the excel to pc once and everytime the excel changes

  • Not sure how this would work out... would it be like creating a local txt/csv file?

I saw some examples like:

JSON: Best way to store data locally in .NET (C#) LocalDB: What is the best way to store data in c# application

XML/Binary serialization

Others?

Notes

For now it is only planned to load the program one time per week, but this can change to once per day, so i would say option 2 is out.

I intend on having the mapping data in c# dictionaries so search can be faster. My idea would be to a a first dictionary for every letter in the alphabet and the insert another dictionary for each client map.

Example

dictionary1

| Key | Value       |

| A   | dictionaryA |

| B   | dictionaryB |

etc

On each dictionary[LETTER] (depending of the first letter of the client B name)

| Key        | Value    |

| Client asd | Client 1 |

| Client fgh | Client 3 |

| Client 123 | Client 3 |
Community
  • 1
  • 1
FEST
  • 813
  • 2
  • 14
  • 37
  • 2
    Epic. Instead I'd start thinking how to get rid of that mess for good. – Mikko Viitala Aug 11 '14 at 16:40
  • Is all this going in one direction or does it need to go back and forth? – Kaizen Programmer Aug 11 '14 at 16:44
  • Hi @MikkoViitala, You are more than right. For me, the ideal would be to integrate application A with B, but no one is going to work on behalf of B and I have no access to it or its data to create the the integration, so I don't any other way right now. – FEST Aug 11 '14 at 21:04
  • @Michael_B, what do you mean by "back and forth"? The direction is Excel (that has B's application data)-> Apliccation A – FEST Aug 11 '14 at 21:05
  • Does the data from Application A need to be known by Application B? and vise versa...If it's one way I'd approach it in the way you mentioned, but this is a difficult problem. It does not sit well with me to have such a 'fuzzy' connection, you'll spend a lot of time policing it and worrying about if it's working like it should. – Kaizen Programmer Aug 11 '14 at 21:10
  • Hi @Michael_B. Application B does not need to know about A. I understand your concern... it has been mine too for quite some time :(. What i'll do is validate everything I can and pass the "hot potato" to the right people. Thx everyone, i guess there is no good solution for this... – FEST Aug 12 '14 at 14:53

0 Answers0