How databases are converted from SQL Server to SQLite

Source: Internet
Author: User
Tags sqlite sqlite db

I used to be SQL Server database, but the customer there think that the installation of this large database comparison card, said to lead to blue screen, hard to SQL Server, no way customer is God, give him a small point of the database it! Consider Acess, No. This still has to install the client, you must find a free installation. Finally found SQLite, do not install the client, only need a file on the line, create a new text file locally, the suffix named. db, open the. db file with SQLite Studio software. but my previous data was done with SQL Server, which required converting data from SQL Server to SQLite,

This is the time to use a SQL server to SQLite DB Convert This tool, you can go to Baidu search to find it, is an open source of the foreigner write software, very good, the conversion will be completed soon. when converting, you need to be careful: if there are often spaces behind the data in the SQL Server table, this is the time to remove the trailing spaces in SQLite studio or not to query the data.

When the conversion is complete, a. db file is generated and then opened with SQLite Studio, which is very simple. And then in the code of SQL DataAdapter This SQL prefix all to SQLite, the SQL Server database operation of the several objects, in SQLite, but the name prefix is different, from SQL to SQLite, So a very simple way to modify the previous ADO is to replace the whole project with the SQL instead of SQLite.

String connectionString = "Data Source =" + environment.currentdirectory + @ "\test.db";
conn = new sqliteconnection (connectionString);

I tested it myself, query 7 tables, combined query a total of 700多万条 data, SQLite studio only need 0.002 seconds, but SQL Server needs 2 minutes and a half time, so SQLite is a very good database.
Another thing is that data security has not been done and put locally. DB, others can directly access, seems to be, so feel very insecure, next to study the method of data file encryption.

How databases are converted from SQL Server to SQLite

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.