Skip to content

Karalynx/relational-database

Repository files navigation

fp-2023

Setup

  1. Checkout the repository. This project uses GitHub Actions haskell workflow, please preserve its configuration.
  2. Now you have two options
  • Use GitHub Codespaces (Code -> Codespaces) to develop directly in browser. This is paid GitHub feature, but: you get a few compute hours for free and you can get even more if you register as student.
  • Use your computer:
    • Install ghcup, please note you might need to install additional packages, as descriped here. Just agree with all defaults during the installation. ghcup binary should appear in your PATH (you might need to restart your computer).
    • Install (if not already installed) VSCode. When done, add Haskell ("Haskell language support") extension.
  1. Open any .hs file in the checked out (step 1) repository. Haskell extension should pick up project settings and install all dependencies. This might take some time. If the magic does not happen, please install ghcup components manually:
ghcup install stack --set 2.9.3
ghcup install hls --set 2.0.0.1
ghcup install cabal --set 3.6.2.0
ghcup install ghc --set 9.4.5

Task 1

Please edit Lib1 module (only!).

Run your application: stack run fp2023-select-all

Run tests: stack test

Task 2

Please edit Lib2 module (only!).

Run your application: stack run fp2023-select-more

Add more and run tests: stack test

Task 3

Please edit Lib3 and Main modules. You can add libraries to package.yaml.

Run your application: stack run fp2023-manipulate

Add more and run tests: stack test

Task 4

Requirements

  • CREATE TABLE and DROP TABLE statements
  • Primary Keys and Foreign Keys.
  • SQL Parser as State + EitherT Monad.
  • Server keeps all data in memory in a thread safe manner.
  • Server data is periodically saved.
  • Yaml is used to serialise/deserialise request and response data.

Getting Started

Run server: stack run fp2023-sql-server

Run client: stack run fp2023-sql-client

About

A relational database written in Haskell.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors