i have never produced a shopping cart software, or forum in php. apart from viewing and examining another persons project or viewing lessons that display steps to make this type of project or how you can being this type of project. wouldso would an individual understand how to design the database structure to produce this type of factor? im speculating its probbably through learning from mistakes...
you need to educate yourself and comprehend the fundamentals of normalization. for many projects, normalizing to 3rd normal form is going to be all right. you will find always certain situations when you wish pretty much normalization, but comprehending the concepts behind it will help you to consider the way your database is structured inside a stabilized format.
here is a very fundamental illustration of normalizing a table:
students student_id student_name student_class student_grade
quite a standard table that contains various data, but we are able to see some issues immediately. we are able to observe that a student's title is founded on his ID, however, students might be involved with several class, and every class would certainly possess a different grade. we are able to then consider the tables as a result:
students student_id student_name class class_id class_name
this really is pretty good, now we are able to see we've various students, as well as other classes, but we've not taken the student's grades.
grades student_id class_id grade
we now have a 3rd table, which enables us to know the relation from a particular student, a specific class, along with a grade connected with this class. from your first initial table, we've 3 tables inside a stabilized database (let us assume we don't have to normalize grades any more for sake of example :) )
a couple of things we are able to glean out of this very fundamental example:
- our information is all associated with a vital of some kind (student_id, class_id, and student_id + class_id). they are unique identifiers within each table.
- with this keyed relations, we are in a position to relate information to one another (the number of classes is student #4096 signed up for?)
- we are able to see our tables won't contain copied data now (consider our first table, where student_class may be the same return for a lot of students. when we needed to alter the class title, we'd need to update all of the records. within our stabilized format, we are able to just update class_title of sophistication_id)
The primary technique you can study about database design is known as Database Normalization.
Database normalization has it's limits, particularly if you have numerous transactions. Sooner or later you might be instructed to Denormalize.
But imho it's always safer to begin with a stabilized database design.
I'd also recommend utilizing a visual editor for creating your database schema. I've lately used: http://dev.mysql.com/workbench/
When you produce a database design, have somebody with increased experience take a look and provide you with feedback. But realize that just as much time as possible spend creating, you'll eventually need to do implementation and can discover you're missing something or could do a much better job doing the work one other way.
So, design, get feedback, try not to hesitate to alter.