Week3: Relational Database Basics

Our Project Progress

Last week, our team decided to use Flask as our project framework. After researching and familiarize Flask, we finally set up our framework and start to code frontend pages. Since there’s not much time before the midpoint, we have to finish the design and implementation of the database within the next week.

Relational Database Design

From previous experience (CS340), database design will include several aspects. Here’s how I did it before:

  • Table outline (includes table names, items)
  • ERD (entity-relationship diagram)
  • Schema (details like primary key, foreign key, connection between tables)

There are several things I always keep in mind.

  • How do tables and tables connect?
  • What is the relationship between them?
  • Are all primary key and foreign key choices resonable?
  • Are all situations covered in the senario?

For entity-relationship diagram, sometimes we will need to face many to many(M:M) table relationship, which could be a pain for implementation and manipulation. If I found any M:M relationship, I will add one more table to change one M:M relationship to two 1:M relationships. Below is a schema with Class_Students table to solve many to many relationship between Students and Classes.

Schema

Summary

These are all super basic concepts for relational databases and some little insights from my previous experience. We will face a lot more complicated situations after joining the industry. Hope I can learn more about relational databases and NoSQL databases.

Please feel free to share your insights, thoughts, and advice regarding database-related topics! Hope every team has a great week ahead!

Print Friendly, PDF & Email

Leave a Reply

Your email address will not be published. Required fields are marked *