Working in a group of three software engineering students, my group and I developed a Python application that interfaces a MySQL database. The database is a conceptual design of an art museum database. We conducted research on the many different art pieces that are existant in the database, and populated the database as a result of our research. A Python script was created to interface the database and allow users with different access levels view and/or manipulate the database through this interface.
This project was completed as an assignment for ENSF 300, a second year software engineering class on data management at the University of Calgary.
The conceptual design of the database consisted of the EERD diagram shown above. Eleven entities were created to represent the eleven data tables in the database, each
with their corresponding attributes. Relations, primary keys, and foreign keys were used as necessary to create the desired data relationships. A Python script was created to
allow users to interact with the database. The project is implemented in Python using the mysql-connector-python library to connect to a MySQL database. Three access levels were created.
The admin, user, and guest. These access levels restrict certain actions and parts of the database from those who do not have the clearance to access them.
The admin has the highest clearance. They have access to the following: browsing and searching the collection, manipulating and managing the database, and managing users (blocking, suspending, adding).
The admin is required to log in to the database in order to gain access to these actions.
The user had mid-level clearance. They have access to the following: browsing and searching the collection and manipulating and managing the database.
The user must also log in to the database in order to manipulate and manage the database.
The guest has the lowest level of clearance. They have access to the following: browsing and searching the collection.
The guest does not have to log into the database and is instead allowed access through a default login.
When running the code, the program first establishes a connection to a MySQL database using the mysql.connector.connect Python library.
The user is prompted to enter their login status, either as an admin, user, or a guest. If the user is an admin or user, they must enter a username and password to connect to the database.
If the user is a guest, they are connected to the database using predefined login credentials.
After the connection to the database is established, the script displays a menu of options depending on the user's login status.
Exception handling is implemented for incorrect query inputs and failed connection attempts to the database.
Feel free to contact me at any time. I welcome all feedback and suggestions for this site or any of the projects here.
Calgary, Alberta, Canada
(403)-472-9927
dominicgartner1@gmail.com