Bi-directional database synchronization - database

Anyone can give some advice on C# frameworks/opensource projects for bi-drectional database synchronisation?
I have an application that will be used by multiple users. Normally, the user will interact with the application's local database (MS ACCESS) as we assume the network is not available on-site most of the time. When the user has network connectivity, the local database is to be synchronised with the centralised remote database (MS SQL). In the end, all users are able to read/write/commit each others' data. It very much like a SVN repository, i think.
Has anyone tried http://msdn.microsoft.com/en-us/library/bb629326.aspx? how does it fare? I have not really look into it, i am trying to look for more options first before evaluating each.
Thank you.

Have you looked at the Microsoft Sync Framework?
It was designed with scenarios like yours in mind.
Introduction to Microsoft Sync Framework
Sync Framework Samples
Walkthrough: Creating a Sync service
Walkthrough: Creating a Sync Service in Windows Azure

Related

What method is best for creating a online web accessible database?

I have been looking for a way to put a database like an microsoft access relational database shared among many people. You used to be able to create a web app but that's no longer supported.
I've heard powerapps is a solution but it looks like it is to be used only by phones or tablets?
I already have a office 365 account with access to multiple applications. Is there anything that can be used to create what I am asking using those services?
Or do I need to look into SQL databases?
You are correct that classic Microsoft Access is not web/browser based (after an attempt was stopped by Microsoft).
A browser based web database requires a back end database that supports the front end web server. In the Microsoft family that would be SQL Server behind IIS. This is all mainstream stuff - but an order of magnitude more complicated than classic Access. There are of course competing brands besides Microsoft - the most well known being the LAMP stack.
There exists a group of web database services, as an alternative: Knack, QuickBase, Zoho, etc. With these one must live with the User Interface and feature set they offer.
For a windows application (i.e. Access) with geographically separated users one would rely on the terminal services technology by deploying a Remote Desktop Server. This is primarily oriented towards internal users - not public facing.

Modern Sync Strategy for Occasionally Connected Winforms App

I am tasked with writing a Winforms point-of-service app for a small company that has about 10 locations. It has a fairly simple database structure with tables for customers, invoices, transactions, stores, vehicles, etc. I'm thinking of using Azure SQL Database for the "master" database, but the app is mission critical for each location and needs to have an "occasionally connected" architecture to insure that it can run if and when an Internet connection is not available, and then sync when the connection is back.
I have researched the Microsoft Sync Framework, which seems like the best option, but all the documentation seems several years old and out of date.
Azure Data Sync looked promising, but that seems like more of an Azure Management type tool, whereas I want the sync functionality to be built into the client application.
Some of the mobile solutions sound interesting, but it seems to me that I need essentially identical SQL Server databases on the client and cloud server, and most, if not all of the tables need to stay synchronized. I'm thinking the easiest way to do this would be to use GUID IDs for each entity and either Sync Framework, or rolling my own code for synchronization.
So, I guess my questions are:
What is the generally recommended, up-to-date approach for creating an occasionally connected Winforms app?
Is the MS Sync Framework still relevant?
Is my idea of having identical databases on client and server, using GUID IDs for entities, and either using MS Sync Framework, or rolling my own synchronization code plausible or insane?
Thanks.

C# How to Synch Data Between Database Instances Over the Internet

We have an application that requires our customers to have a SQL server instance on site. At their request, the application needs to synchronize the data in their database with a copy in our datacenter.
We're using .Net 3.5 SP1. We need to synchronize the data exactly, including IDENTITY columns.
We'd prefer to use something like LINQ to SQL that would let us make some simple select and insert/update calls against mapped entities. However, the IDENTITY columns seem to be a problem with LINQ and similar approaches.
We can do this all with built-up SQL statements and turn IDENTITY INSERT on / off as needed, but I'd prefer a more elegant solution.
Thanks!
** Edit - We DO need to write our own solution, and we do need to use .Net 3.5 SP1 to do it. I won't spend your time explaining all the reasons why, but please limit suggestions to options within the .Net playground.
Microsoft Sync Framework can be your solution. This is framework description from Microsoft:
Microsoft Sync Framework is a data synchronization platform from Microsoft that can be used to synchronize data across multiple data stores. Sync Framework includes a transport-agnostic architecture, into which data store-specific synchronization providers, modelled on the ADO.NET data provider API, can be plugged in.
Sync Framework is a comprehensive data synchronization solution that enables developers to build solutions that support synchronization of any database, on any data protocol over any network topology. msdn.microsoft.com
For your convinience providing link to good tutorial on the subject
If it is just a couple of tables that need to be synchronized and there is not a lot of data in the tables (now and future) you could develop some sort of bulk copy from your servers and bulk insert routine on the customer's server.
Since you said you can't use SQL Server replication services or SSIS, then perhaps a backup/restore procedure could be written. You could take a scheduled backup of your database and make it available to calling applications which could then copy the backup, restore it to another instance on the customers server, then pull all data you need via any number of methods and it would exist locally on the customers servers.
Beyond that, I think you may be asking for a maintenance and synchronization nightmare if you can't base your solution on tools that are made to do this sort of thing.

Hosting an Access DB

So I'm inexperienced in hosting DB's and I've always had the luxury of someone else getting the db setup.
I was going to help a friend out with getting a webpage setup, I've got experience in Asp.Net MVC so I'm going with that. They want to setup a search page to query a db and display the results. My question I have is in getting the DB setup and hosted. They currently just have the Access DB on a local computer. There is basically only one table that would need to be queried for the search.
What is the best approach to getting this table/db accessible? They would like to keep the main copy of the db on the local machine, so copying the entire db over to the hosted site would be time consuming, could the lone table needed be solely copied to the host? Should I try to convince them to make changes on the hosted db and just make copies of that for their local machines? Any suggestions are welcome, Again I'm a total noob when it comes to hosting databases.
Thanks
Added: They are using a MS Access 2000, and the page will have access restrictions. Thanks for the responses.
How about SQL Server Express? I think you can do a remote connect from Access and just push the data over from Access.
I wouldn't use Access on a web server in any case.
I would strongly recommend against access from web work, its just not designed for it and given that SQL server express is free there is no reason not to give it a go.
You can migrate the data over by using the SQL server upsizing wizard, here is a link for help on using that feature
http://support.microsoft.com/kb/237980
It depends on what you mean by web work? Access 2010 can build scalable browser neutral web applications. They can scale to 1000's to users. In fact, you can even park the web sites on Microsoft's new cloud hosting options, and scale out to as many users as you need.
Here is a video of an application I wrote in access 2010. Note how at the half way I run the same application including the Access forms in a standard web browser. This application was built 100% inside of the Access client. The end result needs no ActiveX or Silverlight to run.
http://www.youtube.com/watch?v=AU4mH0jPntI
So, the above shows that access can now be used to build scale web sites (you can ignore the confusing answers by the other two posters here they are not quite up to speed on how access works or functions).
However, for your case, I would continue to have the access database on the desktop. You can simply link to tables that are hosted on the web server. Those tables can exist in MySql, or sql server. As long as the web site supports external ODBC connections (many do), then you can thus have the desktop application use the live data from the web server. If connections to the live data at all times is a issue, then you could certainly setup something to send up new records (or the whole table) on some kind of interval or perhaps the reverse, and pull down new records on a interval from the web site (depends which way you need to go). So, connecting to MySql or sql server is quite easy as long as the web hosting and site permits external ODBC connections. I do this all the time, and it works quite well.
As mentioned, new for access 2010 is web site building ability but that does requite Access Web services running on SharePoint.
You don't need to upgrade to Access 2010. One option is to use the EQL Data plugin to sync the database up to the server. Then you can write an asp.net, php, or whatever application that queries the table using the EQL API and prints the results however you want. This kb article describes how to use the EQL API from a web app.
The nice thing is that the database is still totally usable (and at full speed) even when you're not online, and then you can sync the new data up to the web occasionally. It only uploads the changes, not the entire database every time, so it's fast.
Disclaimer: I work at EQL Data so I'm a bit biased. But this kind of use case is the whole reason the company exists.

How to make a WPF Application access online database?

I am developing a simple WPF Application that requires a database. My question is, can I use an online database to run with my application. That is, can my WPF application access an online database? If yes, then how do I do it? Will the conventional way of accessing the SQL Server work? Also, is there any free online database website available that I can use. I do not need a lot of space. Just need to store 9-10 tables, and about 15-20 stored procedures.
Take a look at "SQL AZURE". The call it Database as Service: http://msdn.microsoft.com/en-us/sqlserver/dataservices/default.aspx
Additionally you could look at Amazon SimpleDB http://aws.amazon.com/simpledb/.

Resources