3. Entity Relationship Diagram: Each component type – mainboard, cpu, etc - has its own table. A unified table for all PC components, each of which have their own unique set of attributes, would not work for obvious reasons. This ERD only shows component attributes relevant to finding compatibility. Each component table actually has anywhere between 9-20 attributes. partSelection is a ‘buffer’ table used for storing components the user adds to their active project. Each user has a pS record created for them at account-creation time. When a user saves their project, all the parts in their pS record are copied and inserted into a new savedBuilds record. The userID is a foreign key in this table, to discern who built what project. Garden-variety users table, nothing to see here. Protips table shows advice to user. PHP script selects protips record at random and displays tiptext.
4. Front End – Login Register button triggers script that reloads the page and brings up a register form. fname, lname,email and password are taken from here and inserted into the users table. If the password fields do not match, it will give you an error message. Compares inputs in this field against user emails and passwords in the users table
5. Front End – Account Management Selection box populated by query to savedBuilds table, where builderid = userid of logged-in user. Loads selected savedBuild record into user’s dedicated partSelection record, then redirects page to main program Deletes selected project from savedBuild table Directs page to main program, clears user’s dedicated partSelection record.
6. Front-End – Main Program Selection boxes for all categories are populated by dynamically-updating SQL queries. Project displayer is just a query to the user’s assigned partselection record. The user’s partselection record is altered as they add or remove parts. Copies user’s record in partselection and uses that information to create a new record in savedBuilds table Clears everything in the user’s record in partselection save the primary key. Each of these categories has its own selection box populated by a constantly-updating SQL query