Ideal way to represent a Grade -> Section -> Student -> Marks database Although it's marks for now, I'm going to change the last entity to something else later. So I need every mark of every student in one table. What I'm thinking is for every mark to belong to one student, every student to belong to one section, and every section to one grade.

I'll be analysing the marks in different ways too, i.e, I want to present information on all marks under a particular student, all marks under a particular section, and all marks under a particular grade.

One thing is to store as what I said in the first paragraph. If I want to work on every mark of every student in a grade, I must select, for each section that belongs under the grade, all marks such that the student who owns the mark must be in that section.

However in that case I'm wondering if the queries might take too long. (I'm new to db so I'm not sure). Or should I, for every mark, also have a column for its section and its grade, so that querying under a given grade/section/student is easy?

Thanks
Tie the marks to the student, the student to the section, and the section to the grade using foreign keys.  The join will usually be quick as long as you have your indexes set up to include those columns.

As far as making it easy to tie together you can create a view that ties them together so you only have to query one place to get what you are looking for.