Data table design, design polymorphic association

problem description

this kind of business is involved in the development. My idea is as follows: polymorphic association is used. This structure is particularly troublesome, relying on code implementation, and requires better solutions.
has a course table to enable users to book a single class hour.
has a course_packet that contains several class hours, and
a classroom table allocates a classroom for each class hour:

course table structure

id | name | user_id

course_ packet table structure

clipboard.png

classroom

clipboard.png

Jul.14,2022
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1c25160-32f87.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1c25160-32f87.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?