Skip to content

Explore and understand SQL Server isolation levels with this educational application, built for practical learning.

Notifications You must be signed in to change notification settings

dev-mahmoudhamed/IsolationLab

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IsolationLab

IsolationLab is a C# console application that demonstrates SQL Server isolation levels using file-based transaction simulation. It allows users to experiment with Read Uncommitted and Read Committed isolation levels, simulating concurrent access and transaction control.

Features

  • Simulates SQL Server isolation levels:
    • Read Uncommitted (NOLOCK)
    • Read Committed (default)
  • File-based transaction log and data storage
  • Supports basic transaction commands: SELECT, COMMIT, ROLLBACK
  • Demonstrates locking and rollback behavior

Project Structure

  • Program.cs – Entry point, session selection, and orchestration
  • ReadUncommittedSession.cs – Logic for Read Uncommitted isolation
  • ReadCommittedSession.cs – Logic for Read Committed isolation, including file-based locking
  • MessageReader.cs – Reads data and log files
  • MessageWriter.cs – Writes to data and log files, handles commit and rollback
  • IsolationLevel.cs – Enum for supported isolation levels
  • data/data.txt – Simulated database table
  • data/log.txt – Transaction log

How to Run

  1. Build the project
    Open a terminal in the IsolationLab directory and run the following commands:
dotnet build
dotnet run --project IsolationLab

About

Explore and understand SQL Server isolation levels with this educational application, built for practical learning.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages