Mathematical Database
GitHub repository: https://github.com/wbchristerson/database
This project is a small-scale database that uses Python and the graphical user interface package, Tkinter. The database stores solutions to challenging mathematical puzzles and problems drawn from various sources, including mathematical olympiads; however, it can easily be adapted to store other information.
Structure
The database opens with a menu page and the following buttons: "Look Up An Entry"; "Browse Entries"; "Add An Entry"; and "Edit An Entry".
- "Look Up An Entry" searches for various pieces of information or by an assigned ID. An expanded view for matching data entries is also available.
- "Browse Entries" lists all data entries in both a short form and an expanded view, similar to "Look Up An Entry".
-
"Write Page" adds data entries. Since the main purpose of the database is to store mathematical puzzles and problems, accepted data include:
- topic
- key words (tags)
- source
- date of completion
- level of difficulty
- problem/puzzle statement (with or without LaTeX formatting)
- solution (with or without LaTeX formatting)
- additional notes
- "Edit An Entry" alters information about existing data entries. IDs cannot be changed.
Design
The application begins with the menu shown above. All other page frames have return buttons back to this page. Clicking "Look Up An Entry" brings you to the following frame in the first image below. As mentioned above, you can make queries based on ID in the database or one of the "Add Entry" attributes described above. When the corresponding check box is clicked, an entry widget appears to input data. If no items match the search conditions, then a message to this effect appears in the following text box. Otherwise, a series of search results appears, as seen in the second image below. An "expanded view" check button can be used to toggle between abridged and complete forms of data entries. Warnings will be given for invalid or out-of-range IDs or dates.
Note that the "Mentioned Words" and "Source" fields will select entries which match any single searched word (even among many).
Running The Application
Python must be installed on your computer to run the application. If you do not have it installed, you can download it for free. For details, see this page. For reference, this project was created using Python version 3.1.
If you are running an operating system other than Windows, then you may have to download and install additional software to accommodate the Tkinter toolkit. To learn more or to trouble shoot, see these pages:
- https://www.python.org/download/mac/tcltk/
- https://wiki.python.org/moin/TkInter
- https://stackoverflow.com/questions/36760839/why-my-python-installed-via-home-brew-not-include-tkinter
git clone https://github.com/wbchristerson/database.git
Alternatively, follow the instructions below to download to a hard drive:
- Navigate to this page.
- Click the green "Clone or download" button towards the right then choose "Download ZIP".
- Find the folder
database-master
in your Downloads folder or wherever it was placed on your device. - Right click and choose "Extract All".
- Go to
database-master
, enterdatabase-master
again, then double clickdatabase.py
. The menu will appear.
delete_database.py
. A window will open, prompting you to confirm that you wish to delete all existing entries. To continue, type 'y'. To cancel, type 'n'. For a more aesthetically pleasing presentation of the original problems in the database, see sample_problems.pdf.