Skip to content

Rolivares2/2025-1

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IIC3413-DB

Project Build

Install Dependencies:

MillenniumDB needs the following dependencies:

  • GCC >= 8.1
  • CMake >= 3.12

On recent Debian and Ubuntu based distributions they can be installed by running:

sudo apt update && sudo apt install g++ cmake

For Mac you need to install the Xcode Command Line Tools and Homebrew. After installing homebrew you can install cmake:

brew install cmake

Build the Project:

Open a terminal in the project root directory, then execute the commands:

For the Release version:

cmake -Bbuild/Release -DCMAKE_BUILD_TYPE=Release && cmake --build build/Release/

For the Debug Version:

cmake -Bbuild/Debug -DCMAKE_BUILD_TYPE=Debug && cmake --build build/Debug/

To use multiple cores during compilation (much faster) add -j n at the end of the previous commands, replacing n with the desired number of threads. Example for 8 threads:

cmake -Bbuild/Debug -DCMAKE_BUILD_TYPE=Debug && cmake --build build/Debug/ -j 8

Lab 1 testing:

To create an example database:

./build/Debug/bin/create_db

that will create the database folder data/test_example.

You can change the schema or add more tables modifying the file src/bin/create_db.cc

Then you can query the database with print_table, passing as first parameter an existing database folder, and as a second parameter the table name:

./build/Debug/bin/print_table <db_folder> <table_name>

Example:

./build/Debug/bin/print_table data/test_example t1

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 96.0%
  • CMake 4.0%