11. Designing my Databases

I finished my website mock ups today, and I can see the big picture now.

Thank you Balsamiq! I finished 14 webpage mockups and 2 webpage template mockups. More than seeing the layout of the end product, it also helped me see the essential functions and databases I needed to create to make everything work well together.

Before, when making the website worked was more important than planning the website, I didn’t think much of the design of the database. I made sure that whenever I had problems with my query, Google was there to help me.

It also helps to plan the databases, tables and the columns to make it easier in the future whenever I want to retrieve something.

Liking and Tagging: Simple yet not simple

For example, this is the first time I am making a Like/Unlike system from scratch with MySQL, PHP and JQuery. So essentially I will have a Like Table which includes like_id, post_id, and user_id. This keeps track of the like actions of users.

But there are 3 different kinds of posts that user can like in my website: questions, resources, and blog posts. So I will have 3 different Like tables so that it will be easier in the future to query each.

This is also the first time I will be using a Tagging system. I want users to be able to follow certain tags. Posts will have tags on them. And users who like such tags will be recommended posts with such tags.

List of tables in my database

Basic

  1. Users
  2. Questions
  3. Answers
  4. Resources
  5. Blogs

Comment

  1. Comment to Question
  2. Comment to Answer
  3. Comment to Resource
  4. Comment to Blog

Tag

  1. List of Tags
  2. Question Tag
  3. Resource Tag
  4. Blog Tag

Like

  1. Like Actions
  2. Question Like
  3. Resource Like
  4. Blog Like

No pressure

17 Tables! Only thinking of this makes eyes big. I only have 8 days to:

  • create databases
  • connect databases
  • create 14 functioning webpages
  • make said webpages beautiful

My coding adventures will continue.

#100daysofwritinghonestly #the100daysproject Day 11

Show your support

Clapping shows how much you appreciated Ana Vasquez’s story.