Just to share something interesting for novice on SQL (MySQL).
Students — studentId — Name — Age
Subjects — subjectId — SubjectName — studentId
//get all students subjects in one SQL query, with all details of the student such as name, age
select st.*,su.SubjectName from Students st, Subjects su Where st.studentId = su.studentId