Android directly reads the sqlite database in the project, androidsqlite
To read sqlite database files for android in a recent project, here is an example of an English-Chinese dictionary. It is mainly used to input English to the database to query the corresponding Chinese
1. Features
Compared with other data types. It can store any type, except the primary key. If the primary key is Integer primary key, only 64-bit integers can be stored.
1) the following statement can be used to create table:
Create Table person (personid integer primary key autocrement, name varchar (20 ))
We recommend that you write varchar (20) later.
2) Get the id value after auto-increment: Select last_insert_rowid ()
Case:
1. Create a database
When an application is installed in Android, we generate a lot of data in the process of using the app, and the app has its own data, so how do we store the data?How data is storedThere are 5 ways to store your Android data: 1. Sharedpreferences Storage Data sharedpreferences data storage, also known as XML storage.This is the data stored under the "data/data/Package name/share_prefs" path to the XML file.
How to import an external database file larger than 1 MB for Android? pm I want to comment (0) font size: T | T
Android imports an existing external database file larger than 1 MB.
AD:
1. If the database file is larger than 1 MB, use the filesplit tool to cut. Fir
The SQLite database is a built-in database of Android, small and powerful enough to work with most SQL statements, while SQLite databases are just files. Although SQLite is a bit much, but not as powerful as the PC-side MySQL, and the Android system is not allowed to operate the remote
Android-display database data to the screen
MainActivity. java
This code retrieves data from the database and displays the data on the interface.
Import java. util. arrayList; import java. util. list; import com. itheima. showdata. domain. person; import android. OS. bundle; import
Reprint Please specify source: http://blog.csdn.net/guolin_blog/article/details/11952409As we all know, the Android system has a built-in SQLite database and provides a full set of APIs for the database to be used for pruning and checking operations. Database storage is a kind of storage that we often use, I believe mo
First draw a map to understand the next Android database operation of the simple process:
1. First, write a help class for your own database operations, which inherits from the Android Sqliteopenhelper.
2. Some methods of using your own helper to write database operation
Today, let's summarize the application of SQLite database in Android system. First look at some of the database introduction:The SQLite database is an untyped database, which means that you can save any type of data to any column in any table, no matter what type the column
I. Use an embedded relational SQLite database to store data
The Android platform integrates an embedded relational database named SQLite. SQLite3 supports NULL, INTEGER, REAL (floating point number), TEXT (string TEXT), and BLOB (binary object) data types, although it supports only five types, sqlite3 actually accepts data types such as varchar (n), char (n), dec
1. Create a data help class that inherits SQLiteOpenHelper. The MyDBOpenHelper code is as follows: packagecn. sg. mydb; importandroid. content. Context; importandroid. database. sqlite. SQLiteDatabase; importandroid. database. sqlite. SQLiteDatabase. CursorFactory; im
1. Create a data help class that inherits SQLiteOpenHelper. The MyDBOpenHelper code is as follows: package cn. sg. mydb; import
1. Create a data help class that inherits SQLiteOpenHelper.
MyDBOpenHelper
The Code is as follows:
Package cn. sg. mydb;
Import android. content. Context;
Import android. database. sqlite. SQLiteDatabase;
Import android. database. sqlite. SQLiteDatabase. CursorFactory;
Impo
In Android development, packaging all operations into one transaction and ensuring transaction consistency can greatly improve the efficiency of Android database operations.During Android Application Development, database operations are often required.
Use the existing SQLite database and androidsqlite In the Android Program
In the Chinese search, I did not find a good article about how to use the database I created in advance in the Android Application. So I found this English article on Google and followed its steps, test successful, decided to give this article a
Reprint Please specify source: Minsan Android
There are different ways to store and manage application data (Sharedperferences,file,sqlitedatabase, networked storage) under the Android platform, and the choice of methods depends on the type of data you need to store and how it is structured. SQLite database can solve the problem of storage of structured
/*************************************** **************************************** ************** Author: conowen @ Dazhong* E-mail: conowen@hotmail.com* Http://blog.csdn.net/conowen* Note: This article is original and only used for learning and communication. For more information, indicate the author and its source.
**************************************** **************************************** ************/
1. How to communicate with the server database
Create an SQLite database in Android, androidsqlite
Database: SQLite (lightweight, embedded database)
Store large amounts of data with similar structures and perform quick queries. Special files (generated in a certain format)
Database creation
Create a file
1. Declare the o
This article will not be practical. Some resources are quite good. Let's share a link with you. The online cool predecessors can always create benefits for our elders !!! Young !!! Haha! I have found a good website on the Internet, which is better than the textbooks. I would like to share it with everyone. PS: Thank you !!
SQL Tutorial: W3School
At the same time, I attached a note photo which I started learning SQL statements in the Early Learning Mode (ps: I was not born in a computer science c
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.