I have a database structure in the below format,
subjects table
subject_id subject_name
1 HTML
2 Java
chapters table
chapter_id chapter_name subject_id
1 Doctype 1
2 Intro to Java 2
tutorials table
tutorial_id tutorial_name chapter_id subject_id
1 Intro to doctype 1 1
2 Details of doctype 1 1
3 Intro to JVM 2 2
should subject_id be in tutorials table?
No, you can get it indirectly from the chapters table. It's redundant in the tutorial table.
No need of Using it as its chapter id is available in chapter table
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With