0

I am planning to develop an Event Planning Application. Currently I'm in the stage of planning the app structure, for example database schemas. Basically there will be two kinds of users:

The event planner: Has access to a dashboard, list of guests, etc.

The event guest: One guest is assigned to one event. Can login and answer questions, access photos from the event

Now my question: What is the best way to store the guests regarding security, scalability and maintainability. Is it ok to store all guests in one single database table 'guests' with a column 'event_id' or is it better to create a table for every event and have multiple tables with guests like 'event_1_guests', 'event_2_guests', and so on.

  • Seems like this is a bad question. Could somebody give me a hint on how to improve it? – Dennis Fink Jul 30 at 18:05
  • Sharing your research helps everyone. Tell us what you've tried and why it didn't meet your needs. This demonstrates that you've taken the time to try to help yourself, it saves us from reiterating obvious answers, and most of all it helps you get a more specific and relevant answer. Also see How to Ask – gnat Jul 31 at 13:59
1

You need three tables: an Events table, a Guests table, and a linking table having GuestID and EventID. Otherwise, a given guest will only ever be able to attend one event.

Don't spread an entity over multiple tables. Always prefer adding an additional column that distinguishes groups of entities, but make it a single table.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.