I have a really different situation while using same database file in android app and web app. Hope someone has idea about this problem.
I have a web application that has a database with full of data. After that, I am exporting the file to my PC and PC to android device in .sqlite format. At this point, Let's say the last primary key id of one table in database is 25.
Now, android app will use that database file to operate. In the same table more data will be inserted. Let's say 10 more. Now the last primary key id will be 35(25+10).
At the mean time, if I insert some more data into the database from web app, let's say 3 more. Then, the last primary key id will be 28(25+3) in the database of web app.
Now, I am pulling database file from android device and importing to the web app to keep records for future. The database file in the web has most of the data same as newly imported database from android device because it was exported to android app before.
Now I want to merge the both database files to make one single database file and show record in web app. For that, what I want to do is;
- Filter data from both databases not to keep same records.
- Manage to replace the primary key id of android app's database followed by the last primary key id of web app's database. Like 28+10 = 38 Now the newly modified database file has 38 records.
Please someone give me some technical idea because it is even hard for me to google. I am sorry if it is unclear. If it unclear, do not hesitate to ask.