SQLite: Self-Study notes (1)--Quick Start

Source: Internet
Author: User
Tags sqlite sqlite database sqlite download win32

SQLite installation and Getting started learn simple about SQLite

SQLite is a lightweight mini-relational database management system . It features the following:

    • There is no need for a separate server process or operation of the system (no server).

    • SQLite does not require configuration, which means that installation or management is not required.

    • A complete SQLite database is stored in a single cross-platform disk file.

    • SQLite is very small, is lightweight, fully configured when less than 400KiB, omit optional feature configuration when less than 250KiB.

    • SQLite is self-sufficient, which means that no external dependencies are required.

    • SQLite transactions are fully ACID-compatible and allow secure access from multiple processes or threads.

    • SQLite supports the functionality of most query languages for the SQL92 (SQL2) standard.

    • SQLite is written using ansi-c and provides a simple and easy-to-use API.

    • SQLite can be run in UNIX (Linux, Mac os-x, Android, IOS) and Windows (Win32, WinCE, WinRT).

Through SQLite we can store the database in a file, without complicated configuration, can be copied or moved at any time.

Installation installing SQLite3 on Linux

  

 Description

I am now the system when Ubuntu,window users please visit the SQLite download page to download precompiled binaries from the Windows area.

  • You need to download sqlite-shell-win32-*.zip and sqlite-dll-win32-*.zip compressed files.

  • Create the folder C:\>sqlite, and in this folder to extract the above two compressed files, you will get Sqlite3.def, Sqlite3.dll and Sqlite3.exe files.

  • Add C:\>sqlite to the PATH environment variable, and finally, at the command prompt, using the sqlite3 command, the following results are displayed.

To Install the Visual action tool

  

The main interface of the Sqlitebrowser program is as follows: SQLite visualization program on the Internet a lot, you can find a Oh!

  

creating a sample database and data tables

  

  

  Description :

For questions about the type of data here, see the summary and follow-up notes detailing the data types of SQLite!

Entry Installing the driver package

Download the SQLite driver jar package (click Connect to download: SQLITE-JDBC) and add it to classpath.

Description

  The purpose of setting up classpath is to tell the Java execution Environment which directories can be used to find the classes or packages that you need to execute the Java program . As for the different methods of setting up the integrated development environment, the author uses the idea, which should be very basic.

connecting to a database

  

Test the Insert command

  


In Sqlitebrowser we can see that the data was inserted successfully:
  

testing the Select command

  
In the console we can see the results of the query successfully!
  

testing the update command

  
In Sqlitebrowser we can see that the data update was successful:
  

Summary

Each value stored in the SQLite database has one of the following storage classes:

Storage Class Description
Null Value is a NULL value.
INTEGER The value is a signed integer that is stored in 1, 2, 3, 4, 6, or 8 bytes, depending on the size of the value.
REAL The value is a floating-point value that is stored as a 8-byte IEEE floating-point number.
TEXT The value is a text string that is stored using the database encoding (UTF-8, utf-16be, or Utf-16le).
Blob The value is a blob of data that is stored entirely according to its input.

SQLite's storage classes are slightly more common than data types. An integer storage class, for example, contains 6 different lengths of integral data types.

(part of this note is referenced from the manual web [Http://www.shouce.ren])

  



SQLite: Self-Study notes (1)--Quick Start

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.