Содержание
- 2. Lesson objectives: Understand what is SQL and how it’s used. Understand what the syntax commands do.
- 3. Success criteria Be able to use the SELECT, UPDATE, INSERT, DELETE Be able to create queries
- 4. Lesson 1 Discussed question «what is a query in the database?»
- 5. Research work. Students research “Data dictionary” Activity. Pair work. From the table, students define a data
- 6. Group work. Students create a data dictionary for the database, create poster automobile salon tourist company
- 8. lesson 2 What is SQL?
- 11. SQL stands for Structured Query Language (Structured Query Language). SQL allows you to work with the
- 12. SQL statements are divided into: Operators of data definition (Data Definition Language, DDL): CREATE creates a
- 13. Data Manipulation Language, DML: SELECT field_name FROM table_name WHERE condition SELECT - defines the fields that
- 14. Data Manipulation Language, DML Example: SELECT * FROM Customers; Output all fields and records the Customers
- 15. Example: SELECT CustomerName, Country FROM Customers; Shows records CustomerName , Country fields from Customers table Data
- 16. Example: SELECT CustomerName, City FROM Customers WHERE City=‘Berlin'; Shows records CustomerName, City fields, from Customers table
- 17. Activity Go to this link http://sqlzoo.net/wiki/SELECT_from_Nobel_Tutorial perform the task of 1, 2, 5, 8, 12 Show
- 18. Data Manipulation Language, DML To change the values in one or more columns of the table
- 19. Data Manipulation Language, DML Example: UPDATE Customers SET ContactName=‘Student’, City=‘Taraz’ WHERE CustomerID=2; After UPDATE statements, records
- 20. Activity Go to this link http://www.w3schools.com/sql/trysql.asp?filename=trysql_select_all Update London to Berlin for CustomerID = 4 Perform the
- 21. Data Manipulation Language, DML To add records to the table, use the INSERT statement INSERT INTO
- 22. Data Manipulation Language, DML: Example: INSERT INTO Customers (CustomerName, ContactName, Address, City, PostalCode, Country) VALUES (‘Student',
- 23. Activity Go to this link http://www.w3schools.com/sql/trysql.asp?filename=trysql_select_all INSERT VALUES ('Bala', 'Askar Nagay', 'Abai 1', 'Taraz', '200000', 'Kazakhstan');
- 24. Data Manipulation Language, DML: To delete rows from a table, use a DELETE statement DELETE FROM
- 25. Data Manipulation Language, DML Example: DELETE FROM Customers WHERE CustomerID=3; After the proposal DELETE FROM, the
- 26. Activity Go to this link http://www.w3schools.com/sql/trysql.asp?filename=trysql_select_all Delete row where CustomerID=12 Perform the task. Show your answers
- 27. Practical work Table: actor_info
- 28. INSERT Query INSERT INTO actor_info VALUES (1, ’Leonardo’ , ’DiCaprio’ ,35), (2, ’Matt’ , ’Damon’ ,61),
- 29. SELECT Query SELECT * FROM actor_info;
- 30. SELECT Query SELECT actor_id, total_films FROM actor_info;
- 31. UPDATE Query UPDATE actor_info SET total_films = 36 WHERE actor_id = 1;
- 32. DELETE Query DELETE FROM actor_info WHERE total_films > 70
- 33. DELETE Query DELETE FROM actor_info
- 34. Did you learn useful information for yourself? Where did you have difficulties? What would like to
- 36. Скачать презентацию