New to nuBuilder but moderately competent with MySQL. I've got a schema that's pretty close to 3NF, so lots of FK relationships. Present challenge is trying to create a brand new volunteer record and also their contact records from a single form/subform, which uses separate tables but relies on the volunteer.v_ID PK.
Code: Select all
describe volunteers;
+--------------------------------+------------------------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+--------------------------------+------------------------------+------+-----+---------+----------------+
| v_ID | mediumint(10) unsigned | NO | PRI | NULL | auto_increment |
...
Code: Select all
describe volunteerContact;
+-------------------+------------------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------------------+------------------------+------+-----+---------+-------+
| volunteers_v_ID | mediumint(10) unsigned | NO | PRI | NULL | |
| vC_ContactDetail | varchar(100) | NO | PRI | NULL | |
| contactType_cT_ID | mediumint(10) unsigned | NO | MUL | NULL | |
+-------------------+------------------------+------+-----+---------+-------+
I know I could avoid this by having a separate form to add contact details once the volunteer is set up, but it's more intuitive to create the volunteer and their contact details (there's also a volunteerAddress table, for example) out of a single "new record" action.