Answer the question
In order to leave comments, you need to log in
What is a program / service for very simple sketches?
Hello. Tell me, is there a very simple software for sketching, I want to sketch such sketches during video lessons:
Answer the question
In order to leave comments, you need to log in
Which is more literate is a rather slippery topic.
More correct academically - normal forms, etc.?
In practice, you often have to deviate from the norms of relational data theory. For example, to duplicate data in order to avoid joins in places in queries that will be performed very often.
If comments on both questions and answers are the same entity, then I would make them one table. And it has 2 fields (among others): question_id
- connection with the question; always exists. answer_id
- connection with the answer; NULL if the question was specifically commented.
Thus, we can request comments without the need to join tables, both to the entire question and its answers, and separately to the question, and to a specific answer to the question.
It is easier to make a single table of questions and answers where the parent_id will be a link to the question, and the comments will already be a foreign key to it, and the problem of the hierarchy of answers is immediately solved when the answer to the answer is inside the question.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question