University Course Registration Database

I used MySQL to design a database that mimics a university course registration database.

 

In the spirit of hands-on learning, I designed and built a small database that mimics my university’s course registration page.

database.JPG
 

I glanced at my university’s course registration page and broke it down into the most important pieces of information. The parent class table includes the primary key course_id, title, time, credits, and the foreign keys subject_id, teacher_id, and days_id.

I then created three other child tables to reduce data redundancy. Any non-integer value was placed in its own table.

The SQL for creating this database was pretty straightforward. Each table had its own auto-increment primary keys to create unique identifiers for each entry. I included the cascade code so that if you delete an entry from the parent table, the chil…

The SQL for creating this database was pretty straightforward. Each table had its own auto-increment primary keys to create unique identifiers for each entry. I included the cascade code so that if you delete an entry from the parent table, the child tables would automatically delete or update.

This is the parent table “class.“ Other than the course title, there are no other strings. The course “teacher,” “subject,” and “days” columns reference their own tables using foreign keys. If you click the id, you will be taken to their designated …

This is the parent table “class.“ Other than the course title, there are no other strings. The course “teacher,” “subject,” and “days” columns reference their own tables using foreign keys. If you click the id, you will be taken to their designated tables.

To top it off, I used the JOIN command to pull all of the values into one table. Once I joined the “teacher,” “subject,” and “days” tables with the parent class table, it began to look a lot like my university’s course registration page.

To top it off, I used the JOIN command to pull all of the values into one table. Once I joined the “teacher,” “subject,” and “days” tables with the parent class table, it began to look a lot like my university’s course registration page.

 
Previous
Previous

COVID-19 By the Numbers : Case Study

Next
Next

Python Projects