vault backup: 2024-01-30 13:27:56

This commit is contained in:
2024-01-30 13:27:57 +00:00
parent a068c9f67f
commit 58094f9604
2 changed files with 55 additions and 8 deletions

View File

@@ -6,6 +6,7 @@
{ {
"id": "f52c29341d47e672", "id": "f52c29341d47e672",
"type": "tabs", "type": "tabs",
"dimension": 85.46511627906976,
"children": [ "children": [
{ {
"id": "d9a3d1a4a3f2cc4d", "id": "d9a3d1a4a3f2cc4d",
@@ -13,7 +14,7 @@
"state": { "state": {
"type": "markdown", "type": "markdown",
"state": { "state": {
"file": "Semester 2/Database Systems/Week 2/Week 2 Database Systems.md", "file": "Semester 2/Database Systems/Week 3/Week 3 Database Systems.md",
"mode": "source", "mode": "source",
"source": false "source": false
} }
@@ -24,6 +25,7 @@
{ {
"id": "7b5e68cfd661dd0d", "id": "7b5e68cfd661dd0d",
"type": "tabs", "type": "tabs",
"dimension": 14.534883720930234,
"children": [ "children": [
{ {
"id": "505b4bbc8a7e15f6", "id": "505b4bbc8a7e15f6",
@@ -102,7 +104,7 @@
"state": { "state": {
"type": "backlink", "type": "backlink",
"state": { "state": {
"file": "Semester 2/Database Systems/Week 2/Week 2 Database Systems.md", "file": "Semester 2/Database Systems/Week 3/Week 3 Database Systems.md",
"collapseAll": false, "collapseAll": false,
"extraContext": false, "extraContext": false,
"sortOrder": "alphabetical", "sortOrder": "alphabetical",
@@ -119,7 +121,7 @@
"state": { "state": {
"type": "outgoing-link", "type": "outgoing-link",
"state": { "state": {
"file": "Semester 2/Database Systems/Week 2/Week 2 Database Systems.md", "file": "Semester 2/Database Systems/Week 3/Week 3 Database Systems.md",
"linksCollapsed": false, "linksCollapsed": false,
"unlinkedCollapsed": true "unlinkedCollapsed": true
} }
@@ -142,7 +144,7 @@
"state": { "state": {
"type": "outline", "type": "outline",
"state": { "state": {
"file": "Semester 2/Database Systems/Week 2/Week 2 Database Systems.md" "file": "Semester 2/Database Systems/Week 3/Week 3 Database Systems.md"
} }
} }
}, },
@@ -184,9 +186,11 @@
}, },
"active": "d9a3d1a4a3f2cc4d", "active": "d9a3d1a4a3f2cc4d",
"lastOpenFiles": [ "lastOpenFiles": [
"images/Pasted image 20240126103004.png",
"Semester 2/Database Systems/Exercise Booklet.pdf", "Semester 2/Database Systems/Exercise Booklet.pdf",
"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",
"Semester 2/Database Systems/Week 3",
"images/Pasted image 20240126103004.png",
"images/Pasted image 20240126102902.png", "images/Pasted image 20240126102902.png",
"images/Pasted image 20240126101454.png", "images/Pasted image 20240126101454.png",
"images/Pasted image 20240126101407.png", "images/Pasted image 20240126101407.png",
@@ -206,10 +210,8 @@
"Semester 2/Computer Systems Internals & Linux/Week 2/media/freeimage-7063371.jpg", "Semester 2/Computer Systems Internals & Linux/Week 2/media/freeimage-7063371.jpg",
"Semester 2/Computer Systems Internals & Linux/Week 2/media/freeimage-5931627.jpg", "Semester 2/Computer Systems Internals & Linux/Week 2/media/freeimage-5931627.jpg",
"Semester 2/Computer Systems Internals & Linux/Week 2/media/freeimage-216999.jpg", "Semester 2/Computer Systems Internals & Linux/Week 2/media/freeimage-216999.jpg",
"Semester 2/Computer Systems Internals & Linux/Week 2/media/freeimage-1967619.jpg",
"Semester 2/Computer Systems Internals & Linux/Week 2/media/footsteps_forest_01.mp3", "Semester 2/Computer Systems Internals & Linux/Week 2/media/footsteps_forest_01.mp3",
"Semester 2/Computer Systems Internals & Linux/Week 2/media/firework_fountain_sparks_crackle.mp3", "Semester 2/Computer Systems Internals & Linux/Week 2/media/firework_fountain_sparks_crackle.mp3",
"Semester 2/Computer Systems Internals & Linux/Week 2/media/dentist_drill_working_on_tooth.mp3",
"Semester 2/Database Systems/Week 1/Week 1 Database Systems.md", "Semester 2/Database Systems/Week 1/Week 1 Database Systems.md",
"Semester 1/Database Systems/Week 10/Week 10 Database Systems.md", "Semester 1/Database Systems/Week 10/Week 10 Database Systems.md",
"Semester 2/Computer Systems Internals & Linux/Week 1/Week 2 Computer Systems Internals.md", "Semester 2/Computer Systems Internals & Linux/Week 1/Week 2 Computer Systems Internals.md",
@@ -229,7 +231,6 @@
"2024-01-15.md", "2024-01-15.md",
"Semester 1/Database Systems/Week 9/Week 9 Database Systems.md", "Semester 1/Database Systems/Week 9/Week 9 Database Systems.md",
"Semester 1/Database Systems/Week 8/Week 8 Database Systems.md", "Semester 1/Database Systems/Week 8/Week 8 Database Systems.md",
"Semester 1/Database Systems/Week 7/Week 7 Database Systems.md",
"Database Systems/Untitled.canvas", "Database Systems/Untitled.canvas",
"Untitled 1.canvas", "Untitled 1.canvas",
"Untitled.canvas" "Untitled.canvas"

View File

@@ -0,0 +1,46 @@
# Online Transaction Processing Systems
Systems that need real time support for querying and updating of databases by one or more concurrent users.
Data is updated in real time frequently, but must maintain correctness of the database state regardless of hardware and software failures, and multiple users accessing said data.
## Examples of OLTPs
- Banking / Credit Card processing systems
- Transport reservation systems
- Trading / Brokerage systems
- E-commerce
### Example 1
- Two students registering for the same class ( Student Enrolment Database )
NumEnroled = 39
MaxEnroled = 40
If two students attempt to enrol at the same time, NumEnroled = 41, which is in an inconsistent state, violating semantic constraints, when processing requests from multiple concurrent users.
### Example 2
- Two people attempt to withdraw from two different ATMs in a joint account
- Person A withdraws £100 at ATM 1
- Person B withdraws £50 from ATM 2
- Initial balance £400
Final balance should be £250 no matter who withdraws first.
However, if they withdraw at the same time, the final balance would be £300 OR £350, depending on various attributes of the ATMs ( physical location, processing speed, current load, etc. ), as £400 total balance would be reported to both ATMs
## Challenges of OLTP
Although the AQL code is written correctly, the database may be in an inconsistent state after processing transactions due to failures of hard / software / multiple users accessing the db.
A consistent state of the database means it satisfied all the constraints specified in the schema ( overall description of the database: pk, fk, referential integrity, etc. ), and any other constraints on the database that should hold ( eg. semantic constraints. )
# Transaction
An action / series of actions, carried out by a single user or application program that reads or updates the contents of the database.
- A transaction is treated as a logical unit of work on the database. This may be
- An entire program
- Part of a program
- A single statement