ggustavo / SNK-DB

A simple file engine to study techniques to develop database management systems.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SNK Database

Gitpod Ready-to-Code Run on Repl.it

A simple file engine to study techniques to develop database management systems.

Download

Clone the project or download directly (zip file)

git clone https://github.com/ggustavo/SNK-DB.git

Note: Strongly recommend run on gitpod or repl.it platform

Use GCC to compile

cd SNK-DB
gcc src/tests/test_buffer_requests.c -o database -Wall -Wextra

Note: Use -Wall and -Wextra to show warnings

Running

./database

General Extra Options

Option Action Example
-DBLOCK_SIZE Sets block size gcc (...) -DBLOCK_SIZE=8192
-DBUFFER_SIZE Sets buffer size gcc (...) -DBUFFER_SIZE=100000

Note: Use db_config.h. If you don't want to use these options

Buffer Replacement Policies Extra Options

Name Action Example
-DLRU Least Recently Used (LRU) gcc (...) -DLRU
-DMRU Most Recently Used (MRU) gcc (...) -DMRU
-DFIFO First In, First Out (FIFO) gcc (...) -DFIFO
-DLFU Least Frequently Used (LFU) gcc (...) -DLFU
-DLFUDA Least Frequently Used with Dynamic Aging (LFU-DA) gcc (...) -DLFUDA
-DCLOCK Second Chance (or Clock) gcc (...) -DCLOCK
-DGCLOCK Generalized Clock (GCLOCK) gcc (...) -DGCLOCK
-DMQ Multi Queue (MQ) gcc (...) -DMQ
-DARC Adaptive Replacement Cache (ARC)* gcc (...) -DARC
-DFBR Frequency-Based Replacement (FBR)* gcc (...) -DFBR
-DLRUMIS LRU with Midpoint Insertion Strategy (LRU-MIS) gcc (...) -DLRUMIS
-DF2Q Full Version “Two Queue” (2Q)* gcc (...) -DF2Q
-DLRUK Least kth-to-last Reference (LRU-K)* gcc (...) -DLRUK
-DLIRS Low Inter-reference Recency Set (LIRS)* gcc (...) -DLIRS
-DCFLRU Clean-First LRU (CFLRU)* gcc (...) -DCFLRU
-DLRUWSR LRU Write Sequence Reordering (LRU-WSR)* gcc (...) -DLRUWSR
-DCCFLRU Cold-Clean-First LRU (CCF-LRU)* gcc (...) -DCCFLRU
-DCCCFLRU Controllable Cold Clean First Least Recently Used (CCCF-LRU)* gcc (...) -DCCCFLRU
-DCFDC Clean-First Dirty-Clustered (CFDC)* gcc (...) -DCFDC
-DCASA Cost-Aware Self-Adaptive (CASA)* gcc (...) -DCASA
-DADLRU Adaptive Double LRU (AD-LRU)* gcc (...) -DADLRU
-DLLRU Locality-aware Least Recently Used (LLRU)* gcc (...) -DLLRU
-DAMLRU AM-LRU* gcc (...) -DAMLRU
-DGASA Ghost buffer Assisted and Self-tuning Algorithm (GASA)* gcc (...) -DGASA
-SCMBP SCMBP-SCCW* gcc (...) -SCMBP

Note: Use db_kernel.h. If you don't want to use these options

* in test phase

Project Activities

About

A simple file engine to study techniques to develop database management systems.

License:GNU General Public License v3.0


Languages

Language:C 100.0%