Note that there are some explanatory texts on larger screens.

plurals
  1. POMySQL best approach for db normalising, relationships and foreign keys
    primarykey
    data
    text
    <p>There is an username/password verification step first then the database has following structure</p> <pre><code>^ is primary key * uses foreign key 1.StudentDetails table =========================================================================== ID^| Username | Password | Email | Address * | Website |Comments ====+============+==========+=============+===========+=========+========== 1 | xxxxxxxxxx | xxxxxxx | xx@xxx.xxx | 1 | http:// | text 2.Submissions table =========================================================================================== ID^|Username*|SubmitDate|SelectedCourse*|Price*|Promotion*|SubmitComments|SubmitStatus* ===+=========+==========+===============+======+==========+==============+================= 1 |xxxxxxxxx|2013-7-12 | int | int | int | text | int 3.SubmitComplete table ================================================== ID^| Username * | SelectionDate | SubmitStatus * ====+============+===============+================ 1 | xxxxxxxxxx | 2013-08-01 | int </code></pre> <p>Now I'm having an issue entering the address, when i try to enter the student details it won't accept until there is an address field, how best to tackle that? When i do an left join selecting certain fields from StudentDetails and certain fields from Addresses, addresses don't show.</p> <p>Im a mysql noob, so i'd like some guidance to see if the normalising and structure has been done correctly, or could it be done better, here is the <a href="http://sqlfiddle.com/#!2" rel="nofollow">fiddle</a> i couldn't get it to work properly, kept getting errors on the lines where i added the foreign keys, even though the building of the schema worked well on my machine.</p> <p>The fiddle console says error on line 2 but it looks to me it's actually on line 76. If there's anything i was unclear on, pls let me know. Thanks</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload