Udacity android Study Notes: lesson 4 part a, udacityandroid

Source: Internet
Author: User

Udacity android Study Notes: lesson 4 part a, udacityandroid
Udacity android Study Notes: lesson 4 part

Prepared by: Taobao stores/titer1/Archimedes
Source: https://code.csdn.net/titer1
Contact: September 1307316
Statement: This article uses the following agreement for authorization: Free Reprint-non commercial-Non derivative-keep the signature | Creative Commons BY-NC-ND 3.0, reprint please indicate the author and the source.
Tips: https://code.csdn.net/titer1/pat_aha/blob/master/Markdown/android/

SQL lesson
Started from class 4a-15, mainly the basic activity life cycle


The SQL table looks like this.

  • Select * from weather where data = blalla
  • Select * from weather order by max desc limit 1 // have a try

  • More SQL operation

    • Delete rows
    • Update rows
    • Insert rows
    • Add columns
  • More SQL API in android
    Get simple use effect similar to urlbuilder

  • More about data stroage
Overview arch repetition
lesson 4a 18

Intro to weather contract

See also solution weather table colums solutions

Inner join 2 tables

Rest Time

Don ask new scholars to learn more about the key points of foreign key and joins (in lesson 4a-23)

Our weather contact

Practice .. Code time weatherContract. java


Don details the key/foreign key

Define constants in contract

LocationEntry

Chapter 2 sqllite open helper and sunshine database

WeatherDbHelper code


-Database Name

-Database-related statements
-Create table
-Specify a foreign key

Database Test


The result is not passed.
The general reason is that only weather. db has been created and locatin. db has not been created.

Next to modify

The following is to make up for the remaining db,

Create sunshine location DB solution

Sqlite open helper on Upgrade

Database upgraded

-Must I manually change the database version number?
-Database changes
-Row changes
-Column change
-Overall Structure Change

  • When will it be executed?
Chapter 3 readwrite from a database3.1 overview

3.2 plan

3.3 difficult query


3.4 code practices
The code in Chapter 3 is concentrated here

The key is to execute the previous checklist and write testLocationTable.

The same principle is used to test weathertable. OK, let go

End

It took two hours. Thank you, don.
-Data storage dimo-overview
-Activity lifecycle: changes when the screen is rotated (pause... restart ?)
-Database test

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.