0% found this document useful (0 votes)
13 views13 pages

18-Transaction-Processing-and-ACID-SAMPLE-A-Level

Teach Computer Science offers an affordable resource for teaching computer science to students aged 11-16 and beyond, including materials for various UK examination boards. The document covers key concepts in transaction processing and ACID properties, along with activities, quizzes, and access rights for database management. It encourages upgrading to premium plans for full access to additional teaching materials and resources.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views13 pages

18-Transaction-Processing-and-ACID-SAMPLE-A-Level

Teach Computer Science offers an affordable resource for teaching computer science to students aged 11-16 and beyond, including materials for various UK examination boards. The document covers key concepts in transaction processing and ACID properties, along with activities, quizzes, and access rights for database management. It encourages upgrading to premium plans for full access to additional teaching materials and resources.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

Teach Computer Science

Free Sample
THANK YOU FOR DOWNLOADING THIS FREE SAMPLE RESOURCE!
Here, you’ll find a snippet of the module, which you can use to gauge the quality
of our offering, but will also find super useful in the classroom.

Teach Computer Science is an affordable, high-quality offering for teachers and


students alike whether that’s in the classroom, online, or homeschool
environment. You’ll find everything you need to learn or teach a computer
science subject for students aged 11-14, 14-16, and 16+ following any of the UK
examination boards, or any other curriculum from around the world.

If you want the complete module, which contains classroom presentation,


revision notes, quizzes, mind maps, flashcards, activities and answer keys, then
please upgrade to one of our Premium plans and support our quest to make
education affordable for all.

The Teach Computer Science Team

teachcomputerscience.com
Teach Computer Science
A-Level

Transaction
Processing and
ACID

teachcomputerscience.com
1.

Revision notes

teachcomputerscience.com
Transaction
A transaction is a single logical operation in a database. Booking a
ticket in an airline ticket reservation system is an example of a
transaction. A transaction consists of several actions. Even though
many users can access and edit data at the same time, a database
ensures the changes are reflected to all of them. This property in a
database is called concurrency.
It is important to ensure that all users view the same data. A
transaction must be completed as a whole. Incomplete transactions
must be cancelled. An example of an incomplete transaction in an
airline ticket reservation system is a person trying to book a ticket and,
due to some reason, he is unable to pay. So, the complete transaction
must now be cancelled.

ACID
A transaction must follow:
• Atomicity
A transaction consists of multiple operations that are considered as a
single entity. A transaction is recorded only when the change is
completed. An incomplete change is not recorded.
• Consistency
A transaction must ensure that the database is in a valid state after its
completion. The rules of the database defined in referential integrity
must be followed. Consider a part of database the School that
calculates grades of students.

Student CourseGrade Course

Teacher

teachcomputerscience.com
In this database, let us consider the table CourseGrade that stores
information about Student ‘Alex’. This record cannot be deleted from
Student table.
Similarly, you cannot add a new student to CourseGrade, without
adding it to Student table first.
• Isolation
A transaction is independent and does not manipulate other
transactions. Hence, multiple transactions running at the same time
produce the same results even when running sequentially.
• Durability
Once a transaction is committed, it must be able to survive
successfully even after a power failure or crash. For example: a booked
ticket remains booked even if there is a power failure. The processing
of a transaction takes place in a buffer and once it is completed, the
changes are reflected in the database.

Challenges in transaction
processing
What happens when a user processes a transaction? Firstly, the
records in which the transaction operates is copied to the local system
of the user. The transaction is processed, and the records are saved.
Lastly, the records are copied to the database. A single user operating
a database by sequentially processing each transaction may not face
any challenges. But a database that is updated by multiple users faces
several challenges. For example: In the Student database, a teacher
updates the Grades of students of a course and saves the record. At
the same time, the Admin of the school updates a few details of
Students and saves the records. Now, it’s possible that some of the
updates could have been missed.
In a multi-user environment, if some protocols are not followed, it may
lead to loss of updates.

teachcomputerscience.com
2.

Activities

teachcomputerscience.com
Activity-1
Duration: 20 minutes

1. Previously, in topic “Transaction Processing and ACID”, you were


assigned to create a database management software for your
school. The database was designed to store student details,
schedule and location of the class, teacher details and grades
scored by each student in a subject.
This activity is about the features of this database.
A. What access rights will be provided for each table in the database?
Specify the reasons for your answer.

teachcomputerscience.com
Activity-1
Duration: 20 minutes

1. Previously, in topic “Transaction Processing and ACID”, you were


assigned to create a database management software for your
school. The database was designed to store student details,
schedule and location of the class, teacher details and grades
scored by each student in a subject.
This activity is about the features of this database.
A. What access rights will be provided for each table in the database?
Specify the reasons for your answer.

• Student_details: read-write-delete by the school


administrator, read-only for teachers & not accessible to
students (to protect student data (phone number and
email from other students)

• Teacher_details: read-write-delete by the school


administrator, read-only for teachers & not accessible to
students (to protect teachers’ data)

• Course_details: read-write-delete by the teacher


responsible for that course and school-administrator &
read-only for students (student need not modify
assignment details and deadlines)

• Session _details: read-write-delete by the school


administrator, read-only for students and teachers

• Grade_details: read-write-delete and teachers, read-only


for students and school administrator. Students can only
access their grade details. Teachers can only access the
grade details for courses which they are teaching. (only
teachers can modify this table)

teachcomputerscience.com
Flashcards

A database management
system (DBMS) is a systems
What is a DBMS? software to define, create
and manipulate information
in a database.

Data security, data integrity,


List the advantages data consistency, different
access level for users,
of using a DBMS. encryption of data, back-ups
and customisation.

teachcomputerscience.com
Glossary

The permission given to database users to


Access rights
access, modify or delete data.

The data dictionary contains metadata about


Data dictionary
data stored in a database.

The analysis and definition of data structures


Data modelling required in a database and to produce a data
model.

Data Storing the same data more than once in a


redundancy database

teachcomputerscience.com
Quiz
1. Which of the following is a function of a database management
system?
A. Acts as a tool to record, manage and organise information in
a database.
B. It provides an interface for the user to work with data.
C. Acts as a backup
D. All of the above

Questions 2 and 3:
A file is used to store and manage a library.
2. The librarian enters a lending transaction without the name of
the book. What issue is this?
A. Data security issue
B. Data integrity issue
C. Data redundancy
D. Data dependency

3. The librarian enters duplicate entries of a lending transaction.


What issue is this?
A. Data security
B. Data integrity
C. Data redundancy
D. Data dependency

teachcomputerscience.com
Teach Computer Science

This resource is licensed under the Creative Commons Attribution-


NonCommercial 4.0 International license.

You are free to:

● Share — copy and redistribute the material in any medium or


format
● Adapt — remix, transform, and build upon the material

Under the following terms:

● Attribution — You must give appropriate credit, provide a link to


the license, and indicate if changes were made. You may do so
in any reasonable manner, but not in any way that suggests the
licensor endorses you or your use.
● NonCommercial — You may not use the material for
commercial purposes.

For more information on this license, visit the following link:

http://creativecommons.org/licenses/by-nc/4.0/

Thank you!

teachcomputerscience.com
Teach Computer Science

Thank you so much for downloading this resource!

We hope it has been useful for you in the classroom and that your
students enjoy the activities.

For more teaching resources like this, don’t forget to come back
and download the new material we add every week!

Thanks for supporting Teach Computer Science. We can provide


teachers with low-cost, high-quality teaching resources because
of our loyal subscribers and hope to serve you for many years to
come.

- The Teach Computer Science Team :)

teachcomputerscience.com

You might also like