This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
course_id is the primary key in both tables.
Now if you only insert a record with course_name or course_credits into either tables, you will get an error. This is because since you are not inserting course_id (primary key), it will have null value.
The whole point of primary key is to uniquely identify a row. If course_id is primary key in your table, you must not have any record where course_id is null.