ADO.NET (Sql Compact + MySQL + IBM db2 expressC) - mysql

I'm developing an app which will have a central database users can add entries to. The database will have to be on a server somewhere but I want the users to be able to add entries offline. The app will sync to the main db when connection is available. So, I supose I need 2 databases - the main one sitting on a server (preferably linux) and a small one on each client machine to use as a buffer when offline. The app will be coded in c# for windows. I'm having trouble deciding what databases to use and whether I can leverage any replication technology to make this easier. Also, I don't want to pay for anything ;) So I guess my questions are...
Will I have any trouble writing code in ADO.NET to move data from something like SQL Compact Edition to MySQL?
Are there any replication solutions which will move stuff from local to main database for me
I've recently discovered IBM's db2 expressC but I'm not sure if it's serverless as well as server installed. Does anyone know?
Firebird can be server or serverless. Can I replicate between them. Is the server mode capable of heavy use?

Firebird can be server or serverless.
Can I replicate between them.
Yes.
Is the server mode capable of heavy
use?
Define 'heavy use'. I've had production systems with 200 simultaneous users pumping 20 transactions/minute each on databases in the 10-20GB range. I'm sure there are many larger deployments out there.
Also, what you describe seem like the 'briefcase model'. You should look into it if you haven't already done so. Maybe the solution is not replication at the database level, but rather a smarter fat client.

Just answering two of your questions; I don't know about DB2 or Firebird.
Will I have any trouble writing code in ADO.NET to move data from something like SQL Compact Edition to MySQL?
That should be very trivial; install MySQL Connector/NET and you're good to go.
Are there any replication solutions which will move stuff from local to main database for me
SQL Server replication is made for this, but I don't suppose it would work with MySQL.

Related

Changing from SQL database server to hosting server's mySQL

I have made a web page which uses a local SQL database server.
Now that I want to publish the web page and place it online, I have to change everything, because the hosting server uses mySQL and presents me with his own mySQL database, and I don't know how to make that transition, I have an entity model in my solution and the Controller my database.
The specific question is - what are the steps to make that transition?
1 use SQL Tools (don't know what version you have) do a full backup.
2 from the new hosting server, restore the database.
3 change your connection strings or path (depends on programming environment) to use new MySQL.
Here is a link to what I used when I migrated in a similar way as to automate the whole process(Yes, it took a little learning but worth it). https://www.youtube.com/watch?v=rpPANKhbpDs
try to install mysql connector
https://dev.mysql.com/doc/connector-net/en/connector-net-entityframework60.html
MySQL Workbench provides you with the Migration Wizard feature. It allows you to migrate databases from various RDBMS products to MySQL.
This documentation would help you get started,... http://mysqlworkbench.org/2012/07/migrating-from-ms-sql-server-to-mysql-using-workbench-migration-wizard/
There are also several paid tools available which convert MS SQL to MySQL, but I've never used them personally. These tool come with free trial so you can actually test them before purchase. You can also refer similar threads on Stackoverflow,...
How to migrate SQL Server database to MySQL?
How to export SQL Server database to MySQL?

Database during release and developing

I am new to Database programming and there is some general questions that I would like to ask. I created the schema in my localhost using mySQL and linked to eclipse. There are some problems that I do not know how to approach.
One of my friends would like to help to develop at his personal machine, but he could not link to my database server. So one way is to copy the schema to his mySQL and change the connection string, are there any better ways?
If I would to release the project and run it on different machines, will it affect the databases operation since the schema resides in my local server.
Is there ways to just like attach the database inside the project since it is a local database and I am not accessing it from any other programs.
Sorry if my questions sound very stupid. I am really new.
Your approach of running local test MySQL instance for every developer sounds fine.
However, if your application never needs any data shared (essentially database is always local as you stated), then you should ask yourself if MySQL really an appropriate solution for your application. I think SQLite is a better choice in that situation - it is likely to work faster than MySQL for local access, and it has essentially zero setup - no database daemon to run or anything like that which greatly simplifies application install.
Granted, SQLite has its limits, but I often use SQLite for my projects, and only if they grow large, I might migrate them to MySQL or PostgreSQL if task requires it.
Typical signs that SQLite may not cut it:
Many clients (10+) need to access database for writing
Total database size is very large - more than 10GB total

SQL Server sync to MySQL program

I want to continually sync every 30 mins or less around 380000 rows of data from 11 tables from a SQL Server database to a MySQL database. How can I do this? What programs can do this?
This post, which is often used to close questions like these as a duplicate, does not work for me, for the following reasons.
The SQL Server is part of a CRM system, I'm not sure if it may be a lite version or something, but long story short I do not have access to the SQL Server Management Studio.
The MySQL database is part of my hosting package, which means I have access to it via phpmyadmin and the like, but not to the console or anything. And obviously I cannot access it via localhost.
So basically what I'm looking for is a way to connect to both databases, probably via ODBC drivers, and sync data every x minutes/hours.
I finally used a program called Omega Sync. Now called Spectral Core Replicator.
Omega Sync can compare and synchronize both database schema and table data. Schema comparison and synchronization for databases of same kind
Data comparison and synchronization even for databases of different kind
Compare and Synchronize databases of unlimited size!
Supported databases
Access
SQL Server
MySQL
Oracle
Interbase
Firebird
ODBC sources
I am not associated with this company or product in any way.
Microsoft SQL Server replication can apply the changes to generic ODBC/OleDB subscribers. You can configure MySQL as a subscriber if you follow the right steps and use the correct drivers, but is not officially supported so you are on your own if something goes wrong. Eg. see Set up replication between Microsoft SQL Server 2000 and MySQL. since the article is for SQL 2000 is already deprecated since Microsoft SQL 2008 supports OleDB subscribers, not ODBC.
You will need a very deep understanding of both Microsoft SQL Server, MySQL, ODBC/OleDB and Microsoft SQL Server replication. If you hit errors you'll have to solve them on your own, as the public information on this subject is scarce. I can only tell you that is possible and I've seen it done. Good Luck!

Local Sql express 2 way sync to remote server

i have a native windows application (software) with a local sqlexpress database. I need to bring the data from every local install (5000 in number) to central server which would be mysql.
1./ I don't think i will be able to do port forwards etc on the router at every local installation and hence wonder what's the best way to get the synchronization done.
2./ At the central server should i use ms sql instead. Is there a compelling reason to stick to ms sql at central level?
regards
Ravz
At the central server should i use ms sql instead
Yes, and not the free version.
You could then use some sort of replication.
Is there a compelling reason to stick to ms sql at central level?
You MUST be joking. Read the documentation. SQL Server has some really nice features in the non free versions for that - replication for example. The last time we tried setting this up (laptops, was ages ago) we went with transactional replication between sql servers and it worked like a charm.
Alternatively you can sit down and start writing. There is a db agnostic sync fraemwork available, or you can totally roll your own - both valid approaches. But you should really check first what you can do.
Check http://msdn.microsoft.com/en-us/library/cc645993.aspx#Replication
You can use transactional replication and use the expres editions as subscribers against a central master database.

Synchronization of postgres and mysql database server?

What's the best way to synchronize few tables of mysql server with postgreSQL server?
Currently people are executing scripts, which takes much time, is there any fast solution available from which we can map the tables and columns to synchronize the db server.
You could expose the data from one and consume it with the other. Something like a web service, linked server, open data framework, ODBC driver, etc. Postgres has a nice ODBC driver that works pretty well.