Giter Club home page Giter Club logo

undo_logging_and_recovery's Introduction

Undo Logging and Recovery

Introduction

This assignment has been done as a part of Database Systems Course in Monsoon 2019. It contains 2 parts:

  • Undo Logging:
    • Given a set of transactions, print out the Undo Logs into a file.
    • The transactions take place in a round-robin fashion, so a parameter x is also provided.
    • Basically given n transactions, carry out first x instructions for the first transaction, then the first x for the next transaction and so on...
  • Undo Recovery:
    • Given an input file containing UNDO logs till a crash point, and the current set of database element values, perform a recovery - output the set of database elements and their recovered values.

๐Ÿ“ File Structure

.
โ”œโ”€โ”€ 20171114.sh
โ”œโ”€โ”€ 20171114_1.py
โ”œโ”€โ”€ 20171114_2.py
โ”œโ”€โ”€ ProblemStatement.pdf
โ”œโ”€โ”€ README.md
โ”œโ”€โ”€ Sample Test Cases
โ””โ”€โ”€ input.txt

1 directory, 6 files
  • Sample Test Cases - Contains sample test input.

๐Ÿƒ Running the program

  • To run Undo Logging:
./20171114.sh [input_file] [x]
  • To run Undo Recovery:
./20171114.sh [input_file]

asciicast

๐Ÿ“‚ Input File Format

  • Undo Logging:
    • The first line of the file will be a list of database element names and their initial values, space separated, on a single line.
    • Each transaction will begin on a new line, with the transaction name and number of actions in the first line, followed by actions of form READ(), WRITE(), OUTPUT(), or an operation in successive lines. Successive transactions are separated by a newline character.
    • The set of operations youโ€™ll have to handle are {+, โˆ’, โˆ—, /} and the second operand is always an integer.
  • Undo Recovery:
    • The first line of the file will be a list of database element names and their current disk values, space separated, on a single line.
    • This is followed by a number of log statements which are either STARTs, update logs, COMMITs, Nonquiescent START CKPTs or END CKPTs in successive lines.
    • The last log entry in the file is the entry just before the crash happened. #_________________________________________

Feel free to Contribute โค๏ธ

undo_logging_and_recovery's People

Contributors

aayush0823 avatar batra98 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.