I would like to hear about the database design when there are multiple posting pages.

Asked 3 months ago, Updated 3 months ago, 5 views

This is probably an elementary question, but I appreciate your cooperation.Currently, we are creating a service that allows users to register and post comments on each page with multiple pages exist.
As for the structure of the page, there are several cities such as City A, City B, and City C, and I would like to prepare a page to evaluate the city, such as security, scenery, personality, and transportation convenience, so that comments can be made on each one.In this case, is there only one database?
I'm still a beginner, and if I put it all together in one database, for example, I feel like I'm going to mix security and landscape comments in one database, and I don't even know which city they belong to.
I would appreciate it if you could help me.

ruby-on-rails ruby

2022-09-30 11:43

1 Answers

1 Application 1 Database is normal.

For applications such as questions, you'll have to separate the tables for each type of "post" or create columns that separate the types of posts in a single table.

Rather than starting the application you want to create from zero, I think it would be better to create a whole set of applications by referring to materials such as introductory books and Rails tutorials.


2022-09-30 11:43

If you have any answers or tips


© 2023 OneMinuteCode. All rights reserved.