Skip to main content

RWTH Aachen Computer Science i5/dbis assets for Lecture Datenbanken und Informationssysteme

Project description

DBIS Relational Calculus Exercise Generator

pypi PyPI Status

This library generates relational calculus exercises based on the dbis-relational-calculus library.

Installation

Install via pip:

pip install dbis-relational-calculus-exercise-generator

Most notably, following required packages are also installed:

Usage

from rc_exercise_generator import generate_exercise

# set the solution, either SQLite query (string), or TupleCalculus / DomainCalculus object
solution_sql_query = "SELECT a, c FROM R;"

from excmanager.Task import Exercise, Task, SubTask
exercise1 = Exercise(1)
task1 = Task(exercise1, "1.1")
subtask1 = SubTask(task1, "a", points=2)
# task description
description = "Select the attributes a and c from the relation R."

generated_cells = generate_exercise(
	subtask1,
	description,
	solution_sql_query,
	correct_attributes_score_perc=0.1,
	calculus_type="tuple" # the student should submit a TupleCalculus solution
)

# generated_cells is a dictionary of cells, which can be used to generate a Jupyter Notebook
# format:
# filename (str) -> cell content (str)

:warning: Guidelines

In order to directly use the generated cells in an exercise Jupyter notebook, one should follow the following guidelines:

  • tasks should be named task1, task2, ...
  • The SQLite Connection has to be made beforehand. This connection should be stored in the variable sql_con.

View the templates and this test for more information on what cells are generated and how one can incorporate them into an exercise Jupyter notebook.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file dbis-relational-calculus-exercise-generator-0.0.3.tar.gz.

File metadata

File hashes

Hashes for dbis-relational-calculus-exercise-generator-0.0.3.tar.gz
Algorithm Hash digest
SHA256 7f492aa5b5b0404d41e8c4e50152d3c2dbea4fdf3d24d6f4b6c716959678b90c
MD5 22983e5525205d6fbd810e4bea388441
BLAKE2b-256 141140209c75eb5c17ca9e44ed26007156831cf578a5d51e6353e3f822ed5565

See more details on using hashes here.

File details

Details for the file dbis_relational_calculus_exercise_generator-0.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for dbis_relational_calculus_exercise_generator-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 3e4f5e150d59da8ba7f18e3b349ae4161f261b2a380d9e7bdc3e1d3e2b3372ee
MD5 edcfb0652a2e4040facfdcba00ae1c1f
BLAKE2b-256 3e7ea65547eac9cd6233012359474ffa896c7ba5d0f048b991b210c696660f58

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page