udacity android 學習筆記: lesson 4 part a

來源:互聯網
上載者:User

標籤:android   udacity   

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 database3.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

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.