开发者

Clarification about storing courses in database

suppose if i need to take different college details and store courses offered by 开发者_如何转开发them into databases.Assume number of courses are different for different colleges.how table should be designed to store courses.

here these courses should be able retrieved for further processing

can any one suggest idea for this..


You can start with 2 tables, 1 for Institution (the university/college), and 1 for Course. The Course table should have a foreign key institution_id to the Institution table.

This way you can have as many courses as you want for any college, and looking up courses for a college is as simple as doing a query on institution_id.

Naturally, this is only a start, you will probably have to expand on this. For example, you might want to have another table like College that has a a foreign key to Institution, to model the fact that sometimes universities have many sub-schools within them. You could also have Institution rows reference other Institution rows to model the same thing; what you want to do depends on the details.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜