I am looking for a solution to a staright forward problem:
There are some templates which are divided into parts of two types: 1. image 2. text
I call these parts as components of the template whose values are entered by the user. The image component can have a link, alt text related to it. The text component can have plain text or some lines of html. The value of these components are used to render the final output of the template.
There can be around 5-10 components for each template which may not be common for other templates, like:
pageTitle
tagline
firstParagraph
buttonText
headerImage - Image Component
firstImage - Image Component
So the simple calculation says:
- 1 page = 1 template
- 1 user can have > 1 pages
- Each template can have 5-10 components
So if i store it like:
COMPONENT TYPE VALUE LINK
pageTitle text Hello world
tagline text tagline here
headerImage image image.jpg http://example.com
And it can be any number of users, so lets say 10000 pages will have > 10000*10 components in a db!!
How can we have less number of entries and with the best performance? Better schema? Serialized? Json? File based system? or anything else... What can be done?
Thanks in advance!