-
Notifications
You must be signed in to change notification settings - Fork 111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Separate Tables per Content Type #467
Comments
You will get all sorts of issues with splitting content types into multiple tables.
I actually have built a CMS using the method you described, but very soon realised that it was the wrong way to go. Just my 2c |
@birkir Thanks for your feedback!
Wouldn't Performance and scalability be reasons for the exact opposite? In general, using a document DB like mongoDB seems like the perfect fit for this type of project, but I really don't consider myself a database expert. Although you already mentioned in that other thread that jsonb is indexed efficiently, I just can't imagine having one big table with some nested json data being superior to having that actual json data as toplevel records in their respective collections, both in terms of performance and ease of use. One main concern with separating the tables was for me, that when building with my data model from scratch, I would probably have separate tables for different kind of data, instead of having them all crammed into one, which makes the dynamically generated data feel kind of subordinate. Maybe it should also be considered, what type of data something like prime cms is actually meant for. I wonder if some hybrid approach would be feasible, where you have one part that stays dynamic at runtime and is put into one collection, and one part which is detached before build, which creates separate collections and could also go through a CI. |
@janus-reith IMO MongoDB isn't famous for its performance |
Currently, all documents are stored in the document table, regardless of their type.
Wouldn't it have advantages to have separate tables per content type?
I would expect most typical queries to only query for one content type, and therefore would assume this to be faster at a certain amount of documents,
and more clean in general.
I did however not do any research yet how feasible this is with typeorm.
Another step for me to consider would be to use mongodb and unwrap
data
to toplevel fields, but that was discussed in #380 already and doesn't seem interesting for now, so I'd like to have this issue only for the table per content type part.The text was updated successfully, but these errors were encountered: