1. 程式人生 > >udacity android 學習筆記: lesson 4 part a

udacity android 學習筆記: lesson 4 part a

odi todo col 數據庫版本 pretty define all 大致 lec

udacity android 學習筆記: lesson 4 part a


作者:幹貨店打雜的 /titer1 /Archimedes
出處:https://code.csdn.net/titer1
聯系:1307316一九六八
聲明:本文採用以下協議進行授權: 自由轉載-非商用-非衍生-保持署名|Creative Commons BY-NC-ND 3.0 ,轉載請註明作者及出處。
tips:https://code.csdn.net/titer1/pat_aha/blob/master/Markdown/android/


sql lesson

4a-15課開始,之前主要是基礎 activity life cycle

技術分享
sql表長得像這樣
技術分享

  • 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
    得到相似urlbuilder的簡單使用效果

    技術分享

  • more about data stroage

overview arch 重復

lesson 4a 18

技術分享

intro to weather contract

技術分享

又見solution weather table colums solutions

技術分享

inner join 2 tables

技術分享

歇息時間

don 請新學者 深入學習下 foreign key 和joins的要點(in lesson 4a-23 )
技術分享

our weather contact

技術分享

實踐..代碼時間 weatherContract.java

技術分享
don具體展示了key/foreign key

define constants in contract

技術分享

locationEntry

技術分享

第二章節 sqllite open helper and sunshine database 重復

下一站 地圖 開始移動啦

技術分享

weatherDbHelper 代碼

技術分享
- 數據庫名字
技術分享
- 數據庫的相關語句
- create table
- 指定外鍵

數據庫測試

技術分享
結果是沒有通過。
大致原因是 僅僅創建了 weather.db,還沒有創建 locatin.db

next to modify

技術分享

以下就是來彌補剩下的一個 db了,

create sunshine location DB solution

技術分享

sqlite open helper on Upgrade

數據庫升級啦
技術分享
- 必須手動改變數據庫版本?
- 數據庫變化
- 行變化
- 列變化
- 總體結構變化

  • 什麽時候運行?

第三章節 readwrite from a database

3.1 overview

技術分享

3.2 plan

技術分享

技術分享

技術分享

3.3 難點 query

技術分享
技術分享

技術分享

3.4 代碼實踐 重復

第三章節的代碼 集中於此

關鍵就是運行之前的checklist,寫出 testLocationTable.
技術分享

相同的原理用於測試 weathertable.ok ,let go

end

用了2小時,謝謝don的陪伴
- data storage diagram overview
- activity lifecycle ,旋轉屏幕時的變化(pause..restart?)
- database test

udacity android 學習筆記: lesson 4 part a