Presentation is loading. Please wait.

Presentation is loading. Please wait.

Do it now – PAGE 8 You will find your do it now task in your workbook – look for the start button! Sunday, 12 May 2019.

Similar presentations


Presentation on theme: "Do it now – PAGE 8 You will find your do it now task in your workbook – look for the start button! Sunday, 12 May 2019."— Presentation transcript:

1 Do it now – PAGE 8 You will find your do it now task in your workbook – look for the start button! Sunday, 12 May 2019

2 Home learning This term we will be creating a database for a burger bar which uses smart phones for taking orders. Think of a DIFFERENT scenario that a database could be used for and write a functional specification for it – this is all the things the database will need to do. DUE:

3 Updating and deleting data

4 “Investigate how and why databases must be kept up to date”
Learning Objective “Investigate how and why databases must be kept up to date” You will find differentiated outcomes for this lesson on the front of your workbook. Sunday, 12 May 2019

5 New learning To change existing data the update SQL statement is used. An example of an update statement would be: UPDATE Product SET Name=‘?’, Price=? WHERE ProductID=? A database very rarely stays the same once it been created - data is added, deleted and sometime changed. This statement would enable you to alter the name and price of an existing product. Notice the string needs sing quote marks whereas numerical values do not

6 New learning Adapt the following SQL statement to change one of your burger names and prices UPDATE Product SET Name=‘?’, Price=? WHERE ProductID=?

7 Learning Development To delete existing data the delete from SQL statement is used. An example of a delete statement would be: DELETE FROM Product WHERE ProductID=? Being able to delete data from the database is another important function that must be learned. To delete existing data the delete from SQL statement is used. This statement would remove all data associated with the ProductID, including its name and price

8 Independent Task DELETE FROM Product WHERE ProductID=? Adapt the SQL statement above to delete one of your burgers

9 Learning Development Why is it important that you can update and delete data when creating a database? Research the data protection act and write a paragraph explaining why in your book There are lots of different pieces of data that we could store about each product but we will keep it simple for now. The product name and price are obvious pieces of data to store about each product but why product id? This provides us with an obvious unique identifier for each product, making it easy to locate a particular product. This is called the Primary Key. In an entity description this is underlined to set it apart from the other fields in the table.

10 Talk Task What act states that data must be kept up to date?
What is meant by an update query? Explain a situation where an update query would need to be used? What other queries can be used? Why is using a database more suitable for updating and deleting data than a spreadsheet? Based on what you know explain how a website would update the records of their customers

11 What law states that data cannot be kept for longer than necessary?
Exit ticket What law states that data cannot be kept for longer than necessary? R A G


Download ppt "Do it now – PAGE 8 You will find your do it now task in your workbook – look for the start button! Sunday, 12 May 2019."

Similar presentations


Ads by Google