开发者

android database issue

I am new to android.

I have an application where i am calculating the loan amount based on salary. For that I have a database of salary,Tax and medicare column. The tax and medicare depends upon the salary bracket. I want to know how to create the database and acce开发者_StackOverflow中文版ss it through the coding.

If any good sample code example is there please give the link.

Thanks in advance.


Here you can find a simple and straight forward tutorial from anddev.

Summarize from the tutorial:

Description: We'll need to to the following things:

  1. Create a DataBase (generally this is done just once)
  2. Open the DataBase
  3. Create a Table (generally this is done just once)
  4. Insert some Datasets
  5. Query for some Datasets
  6. Close the Database


Android uses the SQLITE database Read up on it here: http://www.screaming-penguin.com/node/7742


I assume you have read the official Android developer guide. If not, there is a wealth of information about doing anything and everything you'd want on an Android device.

Since Android uses SQLite as it's internal database, I'd suggest reading documentation about it + the data storage part of Android guide.

These would be good starting points.


You may try this simple tutorial with nice graphics illustration.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜