I would like to create a ticketing PHP application, but I stucked at the planning of database structure.
I would have completely different type of ticket templates (user / shared folder / end-device processes etc..) which require different inputs.
The question is that, shoud I store them in one table, or should I create a separate table for every ticket group?
If I store them in one table, there will be many empty fields in the table because different tickets use different fields.
I think the common fields would be the unique ID
, status
and responsible person
only, the others are different.
My preferred solution would be that if I store them in separate tables with the required fields only.
But this would cause troubles in a simple SELECT query when I would like to list every tickets. If I join them together during the query it will create a result table with many empty fields because of the difference between the structure of the tables which is not optimal. To avoid this I should run separate queries for every table which is not so simple.
What way would you choose? Could you please give me an advice? Thank you in advance!