Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I'm confused in modelling the database my requirement is

Below two schema's I thought to implement

#1 First

colleges(id,name)
col_course_relation(colleges.id,courses.id)
courses(id,stream,degree,coursename)

Example for courses may be

(1,"Engineering","Bachelor of Engineering","Computer Science & Engineering")
(2,"Engineering","Master of Engineering","Computer Science & Engineering")
(3,"Engineering","Bachelor of Technology,"Computer Science & Engineering")
(4,"Engineering","Master of Technology","Computer Science & Engineering")

Is it better to use normal form for courses table or I can create a index for all the columns,

If i do normalisation the the schema become

#2 Second

colleges(id,name)
col_course_relation(colleges.id,courses.id)
stream(id,streamname)
degree(id,degreename,stream.id)
courses(id,coursename,degree.id)

or #3 Third

colleges(id,name)
col_course_relation(colleges.id,courses.id,stream.id,degree.id)
stream(id,streamname)
degree(id,degreename)
courses(id,coursename)

But whenever mapping this things in UI, stream automatically selected on the basis of degree.

In perspective of performance and ease to write queries which schema is better. there will be around 50k colleges * 10 courses so the reason i'm thinking & asking the question.

share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.