Skip to main content

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

Project description

DBIS Relational 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.2.tar.gz.

File metadata

File hashes

Hashes for dbis-relational-calculus-exercise-generator-0.0.2.tar.gz
Algorithm Hash digest
SHA256 055bca05b8f17364de43434550faed5683804699d639fcfa3d54ae2cddbcc379
MD5 a645dbe1bc26befb0347d2fa01ca383e
BLAKE2b-256 9b69615aba554d819b3f3029b42992ec9e6d167646210db6f1fa2a676be98449

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dbis_relational_calculus_exercise_generator-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c1ef212369c6bb0e6405978516d905b433e7548a2b1e257056f038721aee44f1
MD5 b23f520433e6a4372c24c246f3f67c71
BLAKE2b-256 b666ff6084ed21317f7fdc101af24261a3c2e1ede1e8cd7c00f282b7a631245b

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