vault backup: 2024-02-13 17:29:09
21
.obsidian/workspace.json
vendored
@@ -6,7 +6,7 @@
|
|||||||
{
|
{
|
||||||
"id": "7b5e68cfd661dd0d",
|
"id": "7b5e68cfd661dd0d",
|
||||||
"type": "tabs",
|
"type": "tabs",
|
||||||
"dimension": 49.11924119241192,
|
"dimension": 59.34959349593496,
|
||||||
"children": [
|
"children": [
|
||||||
{
|
{
|
||||||
"id": "505b4bbc8a7e15f6",
|
"id": "505b4bbc8a7e15f6",
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
{
|
{
|
||||||
"id": "0df2a38b58c879ff",
|
"id": "0df2a38b58c879ff",
|
||||||
"type": "tabs",
|
"type": "tabs",
|
||||||
"dimension": 50.88075880758808,
|
"dimension": 40.65040650406504,
|
||||||
"children": [
|
"children": [
|
||||||
{
|
{
|
||||||
"id": "a9b5c2a99473859a",
|
"id": "a9b5c2a99473859a",
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
"state": {
|
"state": {
|
||||||
"type": "pdf",
|
"type": "pdf",
|
||||||
"state": {
|
"state": {
|
||||||
"file": "Semester 2/Database Systems/Booklet of Lecture Slides for Semester Two (2).pdf"
|
"file": "Semester 2/Database Systems/Exercise Booklet.pdf"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -186,14 +186,21 @@
|
|||||||
},
|
},
|
||||||
"active": "505b4bbc8a7e15f6",
|
"active": "505b4bbc8a7e15f6",
|
||||||
"lastOpenFiles": [
|
"lastOpenFiles": [
|
||||||
|
"images/Pasted image 20240213172702.png",
|
||||||
|
"images/Pasted image 20240213172509.png",
|
||||||
|
"images/Pasted image 20240213172304.png",
|
||||||
|
"Semester 2/Database Systems/Exercise Booklet.pdf",
|
||||||
"Semester 2/Database Systems/Booklet of Lecture Slides for Semester Two (2).pdf",
|
"Semester 2/Database Systems/Booklet of Lecture Slides for Semester Two (2).pdf",
|
||||||
"Semester 2/Database Systems/Week 5/Week 5 Database Systems.md",
|
"Semester 2/Database Systems/Week 5/Week 5 Database Systems.md",
|
||||||
|
"images/Pasted image 20240213161136.png",
|
||||||
|
"images/Pasted image 20240213133455.png",
|
||||||
|
"images/Pasted image 20240213132603.png",
|
||||||
|
"images/Pasted image 20240213132227.png",
|
||||||
"images/Pasted image 20240213131815.png",
|
"images/Pasted image 20240213131815.png",
|
||||||
"images/Pasted image 20240213131802.png",
|
"images/Pasted image 20240213131802.png",
|
||||||
"images/Pasted image 20240213131718.png",
|
"images/Pasted image 20240213131718.png",
|
||||||
"Semester 2/Database Systems/Week 4/Week 4 Database Systems.md",
|
"Semester 2/Database Systems/Week 4/Week 4 Database Systems.md",
|
||||||
"Semester 2/Database Systems/Week 5",
|
"Semester 2/Database Systems/Week 5",
|
||||||
"Semester 2/Database Systems/Exercise Booklet.pdf",
|
|
||||||
"Semester 2/Database Systems/Week 4",
|
"Semester 2/Database Systems/Week 4",
|
||||||
"Semester 2/Programming 2/Project/Part 1/__SHELL78.class",
|
"Semester 2/Programming 2/Project/Part 1/__SHELL78.class",
|
||||||
"Semester 2/Programming 2/Project/Part 1/__SHELL78.java",
|
"Semester 2/Programming 2/Project/Part 1/__SHELL78.java",
|
||||||
@@ -216,13 +223,7 @@
|
|||||||
"Semester 2/Database Systems/Week 3/Week 3 Database Systems.md",
|
"Semester 2/Database Systems/Week 3/Week 3 Database Systems.md",
|
||||||
"Semester 2/Database Systems/Week 2/Week 2 Database Systems.md",
|
"Semester 2/Database Systems/Week 2/Week 2 Database Systems.md",
|
||||||
"images/Pasted image 20240126103004.png",
|
"images/Pasted image 20240126103004.png",
|
||||||
"images/Pasted image 20240126102902.png",
|
|
||||||
"images/Pasted image 20240126101454.png",
|
|
||||||
"images/Pasted image 20240126101407.png",
|
|
||||||
"images/Pasted image 20240126101329.png",
|
|
||||||
"images/Pasted image 20240126101118.png",
|
|
||||||
"CCNA/1 - Networking Today/1.2 - Network Components.md",
|
"CCNA/1 - Networking Today/1.2 - Network Components.md",
|
||||||
"images/Pasted image 20240125163704.png",
|
|
||||||
"CCNA/1 - Networking Today/1.1 - Networks Affect our Lives.md",
|
"CCNA/1 - Networking Today/1.1 - Networks Affect our Lives.md",
|
||||||
"CCNA/Module Information.md",
|
"CCNA/Module Information.md",
|
||||||
"Semester 2/Database Systems/Week 1/Week 1 Database Systems.md",
|
"Semester 2/Database Systems/Week 1/Week 1 Database Systems.md",
|
||||||
|
@@ -1,10 +1,68 @@
|
|||||||
# Conflict Serialisability
|
# Conflict Serialisability
|
||||||
|
|
||||||
If a concurrent schedule organises conflicting operations in the same way as a serial schedule, the results are the same.
|
If a concurrent schedule organises conflicting operations in the same way as a serial schedule, the results are the same.
|
||||||
This is called conflict serialisability, which can be tested using precedence graphs.
|
This is called conflict serialisability, which can be tested using precedence graphs.
|
||||||
|
|
||||||
## Directed Graph
|
## Directed Graph
|
||||||
|
|
||||||
- 
|
- 
|
||||||
- 
|
- 
|
||||||
- 
|
- 
|
||||||
|
|
||||||
# Precedence Graph
|
# Precedence Graph
|
||||||
|
|
||||||
|
- Used to determine if a schedule is serialisable.
|
||||||
|
- It is serialisable if the graph has no cycles.
|
||||||
|
|
||||||
|
## Example Using Serial Schedule
|
||||||
|
|
||||||
|
- 
|
||||||
|
- This schedule is serialisable because the graph is acyclic. ex. No directed cycle.
|
||||||
|
|
||||||
|
## Example Using Non-Serial Schedule
|
||||||
|
|
||||||
|
- 
|
||||||
|
- This schedule is serialisable due to being acyclic.
|
||||||
|
- It is equivalent due to
|
||||||
|
- T2 reading the written value of X from T1
|
||||||
|
- T1 reading the value of X from the database
|
||||||
|
- T1 is the last transaction to write Y
|
||||||
|
- T2 is the last transaction to write X
|
||||||
|
|
||||||
|
## Example Using Non-Serialisable Schedule
|
||||||
|
|
||||||
|
- 
|
||||||
|
- This schedule is non-serialisable since the graph is cyclic.
|
||||||
|
|
||||||
|
## Example 4
|
||||||
|
|
||||||
|
- 
|
||||||
|
- Cyclic graph, non serialisable.
|
||||||
|
|
||||||
|
# Tutorial Questions: Chapter 28
|
||||||
|
|
||||||
|
1. What is a serial schedule?
|
||||||
|
A serial schedule is an order of operations where each is complete before a new operation starts. Ex. No interleaves operations.
|
||||||
|
2. Why is a serial schedule considered correct?
|
||||||
|
Each operation is either successful or aborted before a new operation starts, meaning every operation is correct and the database is consistent.
|
||||||
|
3. What is a serialisable schedule?
|
||||||
|
A serialisable schedule is a concurrent schedule with an acyclic precedence graph. The operation is the same as a serial schedule.
|
||||||
|
4. Why is a serialisable schedule considered correct?
|
||||||
|
Since the operation is functionally the same as a serial schedule, we can consider it correct.
|
||||||
|
|
||||||
|
5. The precedence graph is serialisable since it is acyclic. No directed cycles.
|
||||||
|
6. T1.1 -> T2.2, T1.2 -> T2.1, T1.2 -> T2.2, T1.2 -> T3.1, T2.2 -> T3.1
|
||||||
|
- 
|
||||||
|
The graph is serialisable since there are no directed cycles.
|
||||||
|
|
||||||
|
1. T2.1 -> T1.1, T1.1 -> T2.2, T2.2 -> T1.2
|
||||||
|
- 
|
||||||
|
The graph is not serialisable since there is a directed cycle
|
||||||
|
|
||||||
|
1. T1.1 -> T2.1, T1.2 -> T2.1
|
||||||
|
- 
|
||||||
|
The graph is serialisable since there are no directed cycles.
|
||||||
|
|
||||||
|
1. T1.1 -> T2.2, T2.1 -> T1.2, T1.2 -> T2.2
|
||||||
|
- 
|
||||||
|
The graph is not serialisable since there are directed cycles
|
||||||
|
BIN
images/Pasted image 20240213132227.png
Normal file
After Width: | Height: | Size: 29 KiB |
BIN
images/Pasted image 20240213132603.png
Normal file
After Width: | Height: | Size: 29 KiB |
BIN
images/Pasted image 20240213133455.png
Normal file
After Width: | Height: | Size: 36 KiB |
BIN
images/Pasted image 20240213161136.png
Normal file
After Width: | Height: | Size: 63 KiB |
BIN
images/Pasted image 20240213172304.png
Normal file
After Width: | Height: | Size: 8.3 KiB |
BIN
images/Pasted image 20240213172509.png
Normal file
After Width: | Height: | Size: 5.1 KiB |
BIN
images/Pasted image 20240213172702.png
Normal file
After Width: | Height: | Size: 4.6 KiB |