I want to design a personal CMS that will have posts with some different (text, images, arrays, etc) data in each post. I want to build a good database design for it and to make it as performance wise as it is reasonably possible.
Broadly speaking, I was thinking of making a Posts table with necessary, relevant data(auto-gen-id, post-id, ...other data, like created-at etc...) and inside of this table, I will include a special attribute that will hold a data of the post as a dynamic array of IDs to a Data table:
[ 57, 43, 36, 93, 384, etc... ]
In this way, I will be able to make a request to the post-id in Posts and then retrieve it's data in Data table with O(1).
Is this correct thinking or am I missing here something? Please, if you think it's not a good design or have another relevant critique, put it in a way so I could at least be able to google it out. It will really help me.
Thanks