Featured post
php - Inserting unknown number of rows into a MySQL database -
i'm writing online application form , 1 of pieces of data i'm trying collect users education history; school name, school city, years there , achievements while there. data collected anywhere between 0 4 different schools , user dynamically adding more fields if required.
my question how captured within database since don't know how many schools user adding? can done in 1 table, or need create multiple tables , capture education data in separate table?
any or pointers appreciated.
thanks.
you need separate tables. 1 row per person, , row per school. schools can related people using either personid in school table, or additional table representing "person attended school" relationship.
any association of 1 entity (person) multiple other entities (schools) requires more 1 table.a general rule follow 1 table per "entity", plus additional tables many-to-many relationships.
- Get link
- X
- Other Apps
Comments
Post a Comment