udacity android 學習筆記: lesson 4 part a
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