數據分析入門階段,在W3school上已過完一遍SQL教程。現在記錄下在codecademy上的學習過程,督促自己好好學習,天天向上→_→。
1、學習途徑
網站(中文):W3school?文檔查找方便,中文說明閱讀更輕松。
網站(全英文):Learn SQL | Codecademy?交互型學習,循序漸進外加總結,更適合初學者,有一定的英文基礎即可。
2、學習記錄?Learn SQL| Codecademy 第一節總結(原文是網站上的總結,翻譯是作為英語渣渣自己強行翻譯的,注釋是自己擴展的知識)
·原文:SQLis a programming language designed to manipulate and manage data stored in relational databases. Arelational databaseis a database that organizes information into one or more tables. Atableis a collection of data organized into rows and columns.
·翻譯:SQL是一種編程語言,用來操作處理、管理存儲在關系數據庫中的數據。關系數據庫將信息組織在一個或多個表格中。表是由行和列組成的數據集合。
·注釋:【關系數據庫】 | 是指采用了關系模型來組織數據的數據庫(看完依舊不懂系列)→【關系模型】 | 指二維表格模型,一個關系型數據庫就是由二維表及其之間的聯系所組成的一個數據組織(看完好像懂了)→關系數據庫的優缺點等自行了解。
·原文:Astatementis a string of characters that the database recognizes as a valid command.
·翻譯:語句是被數據庫識別為有效指令的字符串。
·原文:①CREATE TABLE creates a new table. ②INSERT INTO adds a new row to a table. ③SELECT queries data from a table. ④ UPDATE edits a row in a table. ⑤ALTER TABLE changes an existing table. ⑥DELETE FROM deletes rows from a table.
·翻譯:①CREATE TABLE 建立一個新的表。②INSERT INTO 在表格中新增一行。③SELECT 從表中查詢數據。④UPDATE 編輯表中的行數據。⑤ALTER TABLE 改變一個已存在的表。⑥DELETE FROM 刪除表中的行。
3、測試題(Quiz Scorecard 100%)
·What clause is used with the ALTER TABLE statement?(ADD COLUMN)
·What would be correct syntax for a CREATE TABLE statement?(CREATE TABLE meals (id INTEGER, name TEXT, rating INTEGER);)
·What is a NULL value?(A value that represents missing or unknown data.)
·What is a relational database?(A relational database is a database that organizes information into one or more tables)
·Which of the following statements is correct?(DELETE FROM icecreams WHERE flavor IS NULL;)
·What is the purpose of the * character? SELECT*FROM celebs; (It selects every column in a table.)
·What are common data types in SQL?(Integer, Text, Date, and Real)
·What does the INSERT statement do?(Insert new rows into a table.)
·What is SQL?(Structured Query Language)
·What would you need to complete the associated UPDATE statement?UPDATE...SETheight=6WHEREid=1;(A table name)
—— END ——
2017年09月22日