S
S
Stani102015-09-20 13:50:25
CMS
Stani10, 2015-09-20 13:50:25

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

1 answer(s)
I
Igor Vorotnev, 2015-09-20
@Stani10

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 question

Ask a Question

731 491 924 answers to any question