I am having trouble with a concept. I am writing a c# quiz application, with the questions, answers and user profiles being stored in a sqlCE db, which is installed with the app. Users run the application, answering the questions in the database. However, they can also write their own questions, which should be available to other users of the same application after some sort of daily update.
What I cannot work out how to approach is the import and export of new question and answer data. I am a LAMP developer and am used to working with web MySQL databases, but have never worked with the db bundled in like this. The best I can think of is that users export a dump (csv perhaps) of their new question&answer set whihc gets uploaded to a master database in the cloud. To update their local database, they import a csv of the entire cloud-based db and empty their local database and insert the contents of the csv.
It doesn’t feel quite right this way. It’s a small-time hobby app, not commercial; I’m really just trying to appreciate the process. Should I be looking at ‘check for updates’?
Any pointers much appreciated, apologies for the non-specific nature of this question.
It depends on how and where your “master database” is located.
In this answer I assume you have a windows machine as server where you can install your own services as well as the database.
I would wrap the master database (probably a SQL Server Express Edition) behind a web service (WCF). The clients ask the web service for updates and sends new questions to the web service.
The web service would have at least two methods:
Those methods on the server would handle the saving of new questions and retrieving of new/updated questions in the master database. The client handles stores all questions in the local Compact SQL database.
Don’t let the users handle extra tools and files to sync databases. Let the application do the job.