readme.md (3127B)
1 # Database Project Overview 2 3 This repository features a database project developed for an academic assignment. It showcases a web interface designed to facilitate various database operations. 4 5 ## Project Features 6 7 ### Login System 8 - **Session Management**: Checks session variables to verify user authentication and redirect appropriately. 9 - **Prepared Statements**: Secure handling of user credentials, leveraging MySQL users for password security. 10 11  12 13 ### Data Entry Forms 14 - **ModalBuilder**: Streamlines the creation of data entry forms. 15 - **Foreign Key Handling**: Generates dropdowns for selecting values from foreign tables with composite primary keys. 16 - **Input Types**: Supports various data types, including text and datetime, with validation for required fields. 17 18  19 20 ### Data Insertion Logic 21 - **Safe Data Handling**: Employs prepared statements for SQL injection prevention. 22 - **Error Management**: Uses exceptions to provide feedback on data insertion issues. 23 24 ### Listboxes for Foreign Key Selection 25 - **Automated Listbox Generation**: Facilitates the selection of valid foreign key values from the database. 26 27 ### Search Functionality 28 - **SQL Query Construction**: Builds search queries for efficient database entry retrieval. 29 30 ### Content Modification Forms 31 - **Update Capability**: Allows for the modification of existing entries. 32 - **User Interaction Design**: Intuitively uses hidden fields to retain the context of user selections. 33 34 ### Table Rendering 35 - **Interactive Tables**: Creates responsive HTML tables with `TableFactory` and `TableBuilder`. 36 - **Customization Options**: Adds custom buttons via callback functions for each row. 37 38  39 40 ### Dynamic Table Headers 41 - **Automated Header Creation**: Dynamically generates table headers based on the database schema. 42 43 ### Stored Procedure Execution 44 - **Procedure Handling**: Facilitates the execution of backend procedures through the frontend. 45 46 ### Dynamic Data Manipulation Links 47 - **Context-Sensitive Deletion**: Enables record deletion from the UI with context-aware URLs. 48 49 ### Hidden Field Utilization in Forms 50 - **Streamlined Data Entry**: Implements hidden fields for a simplified user experience. 51 52 ### Database Connection Management 53 - **Singleton Pattern**: Ensures a single instance of the database connection is used application-wide. 54 - **Explicit Connectivity Feedback**: Clearly communicates database connection status. 55 56 _Detail_: [Database Connection Class](db/dbconnection.php "View the database connection class") 57 58 ## Additional Information 59 60 - **Database Design**: Explore the database design and implementation [Database Design](src/database.md). 61 - **ASP.NET MVC Rewrite**: A similar project version using ASP.NET MVC is available at [MVC-database-construction](https://github.com/LindholmLabs/MVC-databaskonstruktion). 62 - **Paper**: The accompanying paper can be read here: [PHP_Application_Report_sv.pdf](src/PHP_Applikation_rapport.pdf).