Python- CMPUT291 – Fall 2020 Mini Project

Clarifications:
You are responsible for monitoring the course news and discussion forums in eclass and this
section of the project specification for more details and clarifications. No clarification will be
posted after 5pm on Nov 2nd.
Oct 29. (1) A tag can include more than one word, e.g. “relational databases” is a valid
tag. (2) When searching for a post, the search keyword can be part of another word. For
example, the keyword “relation” will match a post that has “relational” in the title. (3)
When ordering the results, the number of matching query keywords and not the number
of occurrences are counted. For example, the same keyword that appears in both title and
body is only counted once.
Oct 28. (1) The given schema cannot be updated under any condition. This also means
temporary tables should not be created. (2) Passwords cannot be encrypted or hashed, to
allow an easy testing of the projects. (3) All votes in the project are upvotes (downvotes
are not considered).
Oct 27. (1) The user id and pwd will only contain alphanumeric characters. (2) Privileged
users are assumed to be in the database and they cannot be added through the registration
process.
Introduction
The goal of this assignment is twofolds: (1) to teach the use of SQL in a host programming
language, and (2) to demonstrate some of the functionalities that result from combining SQL
with a host programming language. Your job in this project is to build a system that keeps the
enterprise data in a database and to provide services to users. You will be storing data in a SQLite
database and will be writing code in Python (or similarly Java/JDBC, C, etc.) to access it. Your
code will implement a simple command line interface. You are free to implement a GUI interface
instead but there will be no support nor bonus for doing that. You are also free to write your code
in Python, Java, C, C++, Perl or any other language that is suited for the task. If you decide to
use any language other than Python, you should let the instructor know in advance.
Your project will be evaluated on the basis of 84% of the mark for implementing
the functionalities listed in this specification; this component will be assessed in a
demo session. Another 12% of the mark will be assigned for both the
documentation and the quality of your source code. 4% of the mark is assigned for
the quality of your group coordination and the project break-down between
partners.
Group work policy
You will be doing this project with one or two other partners from the 291 class. Register your
group at the group registration page. It is assumed that all group members contribute somewhat
equally to the project, hence they would receive the same mark. In case of difficulties within a
group and when a partner is not lifting his/her weight, make sure to document all your
contributions. If there is a break-up, each group member will get credit only for his/her portion of
the work completed (losing the mark for any work either not completed or completed by the
partners).
Database Specification
You are given the following relational schema.
users(uid, name, pwd, city, crdate)
privileged(uid)
badges(bname, type)
ubadges(uid, bdate, bname)
posts(pid, pdate, title, body, poster)
tags (pid, tag)
votes(pid, vno, vdate, uid)
questions(pid, theaid)
answers(pid, qid)