Answer the question
In order to leave comments, you need to log in
Create a separate table for each user. Is it right?
Hello! I would like to ask if it is worth making a separate table for each user, is this method convenient and how to implement it in general?
In the table itself, store all the data about the user's account and all his actions, for example, comments, posts.
Answer the question
In order to leave comments, you need to log in
I will try to convey the essence of relational language in a folk language. Each table must represent some kind of data model. Each record is an object, each column is its property of a certain type. A user is one model and there can be many user objects. A comment is another model and also a set of its objects. Forum post, product, etc. - other models. And the selection of data from other tables for some record in the current one is then done through linking, there are several options, for example, JOIN to combine the results into one model or linking the tables themselves, or storing links in auxiliary tables, there are a lot of options, the choice of the right one depends on specifics of the task and requirements for query optimization.
No, not right. Correctly create the Users table, add the necessary fields there (such as mail, name, phone, city, etc.)
Practice is the criterion of truth.
Make such a table, and then try to display all the comments under the article or the feed of the latest posts on the site.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question