This projects is made to fulfill Tubes IF3140 Manajemen dan Basis Data
This repository is a project for simulations of database concurrency control in Python language. The protocols implemented in this project are Two-Phase Locking Protocol and Optimistic Concurrency Control.
- Python 3
-
Navigate to the directory of the project
-
Run the following command
python3 2PL.py
-
Insert an input string of the query you would like to try. Example of format with ';' as delimitter is as such:
R1(X); R2(Y); R1(Y); R2(X); C1; C2;
-
Navigate to the directory of the project
-
Run the following command
python3 occmain.py
-
Insert an input file name with the sequence of input string query. Here is an example of input:
test.txt
Here is the example of inside the file:
R1(X) W2(X) R1(Y) W2(Y) C1 C2
NIM | Nama |
---|---|
13521061 | Alex Sander |
13521119 | Muhammad Rizky Sya'ban |
13521145 | Kenneth Dave Bahana |
13521171 | Alisha Listya Wardhani |