Presentation is loading. Please wait.

Presentation is loading. Please wait.

Lesson Objectives Aims You should know about: 1.3.2: (a) indexing (d) SQL – Interpret and Modify (e) Referential integrity (f) Transaction processing,

Similar presentations


Presentation on theme: "Lesson Objectives Aims You should know about: 1.3.2: (a) indexing (d) SQL – Interpret and Modify (e) Referential integrity (f) Transaction processing,"— Presentation transcript:

1 Lesson Objectives Aims You should know about: 1.3.2: (a) indexing (d) SQL – Interpret and Modify (e) Referential integrity (f) Transaction processing, ACID (Atomicity, Consistency, Isolation, Durability), record locking and redundancy.

2 Referential Integrity
In a relational database every foreign key must correspond to the primary key in another table. In other words, every link must point to a record that actually exists If it doesn’t, there’s a problem… this is called an “orphan record”

3 Transaction Processing
Transaction processing means taking multiple smaller operations and grouping them together in a single ‘transaction’ operation. If any of the smaller operations fails then the transaction as a whole must fail. The aim of transaction processing is to ensure that complex operations are not left partially complete by hardware or software failures. For example, imagine transferring £ from one bank account to another. This operation is made up of two smaller ones Removing £ from one account Adding £ to another If either of these smaller operations is not successful, the operation as a whole must fail, otherwise £12,000 just vanished…

4 ACID There are four properties of a successful transaction: atomicity, consistency, isolation, and durability (ACID): Atomicity: either every part of the transaction is successful or none is. Consistency: all parts of the transaction must be in line with the database rules; for example, they do not create duplicate keys. Isolation: ensures that even if different transactions are happening at the same time, the results are the same as if they were happening one after the other. Durability: once a transaction has been successfully completed, its actions are not undone.

5 SQL Structured Query Language This is the language used to manipulate data in a database It is incredibly powerful and can retrieve data based on rules from many tables at once

6 You are expected to know…
SELECT FROM (* wildcard) WHERE LIKE (% wildcard) AND OR DELETE INSERT DROP JOIN

7 Example SELECT * FROM People WHERE Surname = “Chunder” Results:
ID Surname Forename Age Height 1 Jones Jack 67 167 2 Chunder Captain 83 178 3 Mandela Nelson 42 175 SELECT * FROM People WHERE Surname = “Chunder” Results: 2 Chunder Captain 83 178 SELECT Surname, Age FROM People WHERE Surname = “Chunder” Results: Chunder 83

8 Your turn The best way to learn any language is to practise it: Complete the lessons!

9 Review/Success Criteria
You should know: How to read/write simple SQL statements


Download ppt "Lesson Objectives Aims You should know about: 1.3.2: (a) indexing (d) SQL – Interpret and Modify (e) Referential integrity (f) Transaction processing,"

Similar presentations


Ads by Google