MySQL How to design a database of curriculum

Source: Internet
Author: User

My question

Beginner database, do not understand design, solve.
Select Department "professional" class "return to Curriculum
How the tables should be designed.
How do I get back to the curriculum and finally generate a week?

Now I designed it.

system table (ID, name of the system)
Professional table (Professional ID, professional name, Department ID)
Class table (class ID, class name, professional ID)
Timetable (table ID, course name, class ID)

Reply content:

My question

Beginner database, do not understand design, solve.
Select Department "professional" class "return to Curriculum
How the tables should be designed.
How do I get back to the curriculum and finally generate a week?

Now I designed it.

system table (ID, name of the system)
Professional table (Professional ID, professional name, Department ID)
Class table (class ID, class name, professional ID)
Timetable (table ID, course name, class ID)

If it was me, I would have built the relational table separately, storing all kinds of IDs to represent the corresponding relationships;
Each table that represents a thing contains only properties related to that thing

system table (ID, name of the system)
Professional table (Professional ID, professional name)
Class table (class ID, class name)
Timetable (table ID, course name)
Relationship table (relationship ID, System ID, professional ID, Class ID, table ID)

This helps maintain, and logic is clearer

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.