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.