develop cataloguing system

You are required to develop cataloguing system, which contains the information about the files and folders in a specified directory. The software must be written in Python in combination with MySQL database.

Proper application of OOP principles and usage of sorting algorithms is also marked on par with software functionality. Use naming conventions when naming classes, variables, and methods. Refactor your code when needed.

When assessing data structures and code quality, the database structure also plays an important role. That is, the name of the tables, the relationship between tables, rules of normalization, and justification of the approach when choosing a specific solution.

The code must include tests for parsing directory content, sorting the list of files using Python, data retrieval from database for search and sort requests, for proper persisting the data into database i.e. keeping the correct relationships between files/directories and consistency of data.
Functionalities which are required to be provided are as follows:
1. Users of the software/application must be able to provide root directory location, the contents of which must be persisted in a database.
2. The software must persist the contents of the provided directory in a database, considering the hierarchy of files and directories inside the root directory.
3. The software must persist at least the following information in a database about each file or directory: name of the file or directory; type, e.g. file or directory; parent directory of file or directory; absolute path of a file or directory and the size of a file or directory.
4. Users must be able to retrieve the list of files and directories persisted in the database.
5. Users must be able to search the list of files and directories persisted in the database, using keywords, provided dynamically by users. Number of keywords provided for search shouldn’t exceed three. If the provided number of keywords more than one, they must be provided separated by space.
6. The search and sort functionality must be implemented in both sides (Python and database). User must be given an option to implement search and sort functionality on database or on already retrieved result, which is displayed to the user.
a. Search and sort functionality done on the database must include:
i. Retrieving the list of files and directories by parent directory.
ii. Retrieving the list of files and directories by keyword(s).
iii. Sorting the list of files and directories by name or size.
b. Search and sort functionality executed using Python:
i. Users can sort and search existing list of files and directories information to narrow the result.
7. The sorting of the list of files/directories must be done by their names or sizes, in ascending or descending order.
8. You must use object-oriented approach to solve the task/problem. Use abstraction (classes, inheritance, and encapsulation) to model the information about file/directory, and relationship/dependency in your code. Use DRY principle to write reusable code. You are also recommended to use SOLID principle where possible.
9. Use comments to explain your code, for describing the approaches used in developing functionalities.
• The report should include these sections, along with the required appendix items:
o Introduction
o Requirements (Detail how you segmented the problem into manageable components)
o Database Design & Development (Discuss design concepts, technologies used, and developmental challenges with references to Testing Documentation)
o Software Design & Development (Outline design concepts, technologies used, sorting algorithms selection and justification of choice, and developmental challenges with references to Testing Documentation)
o Conclusions & Recommendations (Reflect on the implementation process and propose alternative solutions)
o List of References
o Appendices:
 Appendix A: Prioritized Requirements List
 Appendix B: UML Class Diagrams
 Appendix C: UML ER Database Diagram

Software Source Code (Submitted in a Compressed Zip Archive)
• Working source code of the artefact, including sample data.
• Comprehensive Testing Documentation.
• Detailed comments explaining the functionality of each function and module.
• Source code must contain the code written in Python and scripts for generating a database and tables in it, with relationships and constraints, functions and triggers if exists.