How to migrate the SQLite database to the ARM Development Board

Source: Internet
Author: User
Tags copy sqlite sqlite database linux

Learning database in recent time, because of their own needs, so pay attention to the point embedded SQLite database,

SQLite, a lightweight database that complies with acid's relational database management system, is designed to be embedded and is currently used in many embedded products

It takes up resources very low, in the embedded device, may only need hundreds of K of memory is enough. It can support Windows/linux/unix and so on the mainstream operating system,

At the same time can be combined with a number of programming languages, such as TCL, C #, PHP, Java, and so on, as well as ODBC interface,

It is also faster than MySQL, the PostgreSQL two Open-source world's most famous database management systems.

Self-feeling is very high ...

No, here's the bottom:

The following is the sqlite transplant to the arm Development Board on the specific steps posted down,

The first thing you need to do before porting is to build the data sharing mechanism between the PC end and the arm, and there are a lot of ways to do this, and I have done a detailed description of the specific Steps of NFS sharing in the previous article.

It's not a drag here. Second, build the cross-compiling environment;

To detect if a cross compilation environment has been installed on this computer, you can type #arm-linux-gcc-v in the terminal to view

Get the SQLite source package, the source code package can be downloaded to the Www.sqlite.org official website, I use here is sqlite-3.6.18.tar.gz

1. Extract the sqlite-3.6.18.tar.gz into the/home directory and create the Sqlite-arm-linux directory under the sqlite-3.6.18 directory

#cd/home/sqlite-3.6.18

#mkdir Sqlite-arm-linux

2. First back up configure files

#cp Configure Configure.old

3. Modify the Configure file,

#./configure--host=arm-linux--DISABLE-TCL--prefix=/home/sqlite-3.6.18/sqlite-arm-linux/

4. Modify the Makefile file

BBC = Gcc-g-o2

5. Compile and install

#make && make Install

6. In order to reduce the size of the execution file, use the strip process to remove the debug information

#cd/home/sqlite-3.6.18/sqlite-arm-linux/bin

#arm-linux-strip Sqlite3

7. Then the transplant

The-ARF option is added to the copy of the library because libsqlite3.so, libsqlite3.so.0 is linked to the libsqlite3.so.0.8.6

#cd/home/sqlite-3.6.18/sqlite-arm-linux/lib

#cp-arf libsqlite3.so, libsqlite3.so.0, Libsqlite3.so.0.8.6/usr/yang (shared directory)

#cd/home/sqlite-3.6.18/sqlite-arm-linux/bin

#cp Sqlite3/usr/yang (shared directory)

8. Copy three library files to its library in the Development Board terminal, and then use SQLite.

But the caveat is that sqlite with MySQL .... A bit different yo.

I just started to play when the first entered the show databases, the results let me very worried, so before we use SQLite or suggest to learn the use of first.

I believe you will be very high in the embedded database ....

This article is from the "Late Evening" blog, please be sure to keep this source http://yiluohuanghun.blog.51cto.com/3407300/817704

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.