数据分析入门阶段,在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日