Programming Assignment 3 (Multi-list Data Structure)
A many-to-many relationship in a database relates two classes of objects such as student and course. Here, one student may enroll in many courses and one course may have many students enrolled in it. These types of relationships are frequently found in databases.
An interesting linked-list structure, called the multi-list structure, provides an implementation of such many-to-many relationships. In this assignment, you will implement a multi-list implementation of a many-to-many relationship between objects of type "supplier" and "parts". A sample instance of this database represented as a multi-list is shown in multilist.pdf
Template files are available at template files. The main program, Database.py, implementing the user interface for the program, is provided to you with some missing code. In addition to completing this missing code, you should implement all methods in all classes and files.
The main program takes a command line input, the name of a folder that contains 3 data files. The program reads data from these files and constructs the multi-list structure from scratch. When the program terminates, the data in the multi-list structure are written back to the same files (so that any updates made to the database can be preserved for subsequent runs of the program). Sample data files can be found here.
A sample run of the program is given here.
What to submit?
- SupplierNode.py
- Suppliers.py
- PartNode.py
- Parts.py
- SupplyNode.py
- Supply.py
- Database.py