Take a look at some of the crease articles, such as this one . They are beautiful and rich in photographs, which makes them attractive, but these are not just articles. They have photographs and other extraneous components, which makes them more difficult, from my point of view, to store them. In short, what is the best way to create a similar implementation of an article for a personal website or project at the database level?
By this, I mean, say, I have to write an article that is divided into 8 paragraphs, some of the paragraphs are children from <section> , and between these sections there will be different photos, various layouts - a parallax photo, a full photo and a style viewer galleries, for example, perhaps even quotation marks. This creates a fairly complex HTML structure that looks more like a simple text article that can be saved simply as text in a database and then simply displayed between two tags on a web page. How can I store all this information, HTML tags, class names, etc. In the appropriate database and application?
I came up with a few ideas, but I'm not quite sure about the best practice or about what advantages and disadvantages each option has.
Option 1. Store everything as plain text in the database field.
It is the simplest but the ugliest. Everything, image tags, class names and all of them are stored in text form inside the article_text field inside the article table.
Option 2. Save the text of the article and formatting inside the database field, then save the images in another table.
This is a hybrid solution of 1 and 3. In principle, you should refer to the image section inside the article as follows:
{{ imageSection1 }}
let's say and get the application logic for integration and drag it into the final product. It is easy on the database side, but becomes more confusing on the user side.
Option 3: Store everything separately.
Each paragraph is its own entry in the article_collation table with images and comments and quotation marks stored in their own independent tables. This seems like the most efficient way to separate individual elements that need to be stored separately, but makes software logic infernal and may be less efficient because of it.
Each of us has serious problems with IMO, and I'm not sure what to do. Input? Recommendations? Are there any tools to facilitate this?
html architecture database-design
ReactingToAngularVues
source share