vendredi 9 octobre 2020

Compare two database using java. Which design pattern is preferred in java [closed]

I'm new to java. I have a requirement to automate comparison of source and target database. My source DB contains multiple csv files with each file containing different user records.1 user record in a csv file. The target db has transformed values from source and stored in db.

The number of queries to fetch the data from source can different based on the test case. E.g 1 test case will have only 1 buying source(online or offline store) details of user. Some files has multiple source details.

File

fname,lname,mobilenumber,lastupdatedate,address,postcode,source

xyz,abc,9898979763,10-05-2020,71st-old road,A8GEWR,online ->query 1 fetches all records xyz,abc,9812312312,08-10-2020,71st-old road,A8GEWR,in store ->query 2 searches for latest mobile update date xyz,abc,9812312312,07-10-2020,72st-old road,A8OIRE,in store ->query 3 searches for latest address update date

File 2

xyz,abc,9898979763,10-05-2020,81st-old,A8GEWR,online ->query 1 fetches all records

Each query will be fetching few fields from different rows. My final object should be built on the data retrieved based on each query. File can contain 1 or more queries. Target DB has all the source fields(with few tranformed data) and few additional fields. I have to compare if all the latest details are survived in target DB.

Which design pattern in java is to be followed if I have to create a framework to compare contents of the two table.

Aucun commentaire:

Enregistrer un commentaire