Answer the question
In order to leave comments, you need to log in
How to store data about the pages of the site in the database?
Good afternoon, for the first time I am working on a site without using cms and the following question arose: how best to organize the storage of content and information about the page (title, metadata, etc.)? Obviously, it is more convenient to store all this data in a database, but how to do it? Just store page data in one table with fields: title, article, keywords, ... ?
What are the best practices in general? How do the same cms deal with this?
Answer the question
In order to leave comments, you need to log in
What about the rest of your architecture? In the simplest case, I would store in 2 tables - in one the main content and the main flags and properties, in the other - metadata. Title usually corresponds to the page name (title), so it will be in the main table, like the content. Metadata (keywords, etc.) - in a separate table. Link - by page ID.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question