My Question, is actually a question about the usability / performance of a concept / idea I had:
The Setup:
Troughout my Database, two (actually three) fields always re-appear constantly: title
and description
(and created
). The title is always a VARCHAR(100)
and the description always a TEXT
.
Now, to simplify those tables, I thought about something (and changed it in that way): Wouldnt it be more useful to just create a table named content
, with id
, title
, description
and created
as only fields, and always point to that table from all others?
Example:
table tab
has id
, key
and content_id
(instead of title
, description
and created
)
table chapter
has id
, story_id
and content_id
(" ")
etc
The Question:
Everything works fine so far, but my only fear is performance. Will I run into a bottleneck, doing it this way, or should I be fine? I have about 23 different tables pointing to content
right now, and some of them will hold user-defined content (journals, comments, etc) - so the number of entries in content
could get quite high.
Is this setup better, or equal to having title
and description
in every separate table?
Edit: And if it turns out to be a bad idea, what are alternatives to mantain/copying certain fields like title
and description
into ~25 tables?
Thanks in advance for the help!