Page 1 of 1

Converting imports between databases

Posted: Wed Jul 19, 2017 5:04 am
by subroc2
Im just putting my thought here if someone more skilled in coding would say "This is easy, give me a couple of days and ill fix it for you..." [:D]

I have been thinking about how a conversiontools for .inst files could be done at least for Facilities. Right now i manually edit the files to change between databases but this should from a logical perspective be easy to automate. The problem is dont code (except from peek and poke on a C64 a couple of hundred years ago.

The pseudocode for the operation would be:

Code: Select all

 read .inst
 check which "DB_ID" it uses
 analyze what "Member_DBID" is present in the file
 match "Member_DBID" to a "MemberName"
 present the found "Member_DBID", "MemberName" and occurrences for all in a "left column"
 present a drop-down list of which database it should be converted to (db3k/cwdb)
 present a drop-down list in the right column for each instance 
 The drop-down list would include all facilites for the selected "convert-to database"
 Then some sort och search and replace to edit the .inst
 A Convert button to Save as a new .inst
 

I will try to achieve this, but as house, wife, kids, work take a lot of my time and i need to learn to code again my project plan expand in to 2030 :) Will update this post when (or rather if) any progress is made

RE: Converting imports between databases

Posted: Wed Jul 19, 2017 11:20 am
by mikmykWS
Yeah it's definitely a project. You'd use regular expressions to convert a couple fields from one ID to the other. The issue is modern structures that didn't exist in the really early years. I ran across this when doing Cuban CWDB.

Mike

RE: Converting imports between databases

Posted: Thu Jul 20, 2017 7:58 am
by Zaslon
Great idea.
It's a pain in the a** create infrastructures in CWDB that already exist in DB3K.

RE: Converting imports between databases

Posted: Fri Jul 21, 2017 7:57 am
by subroc2
As the import file seems to be some sort of JSÓN format, i think i will need to learn Java. The coding seems pretty straightforward but i think the gui side of this will take some time to master.