MySQL Forums
Forum List  »  Newbie

Re: Query with several evaluations on the same column
Posted by: Barry Galbraith
Date: June 25, 2016 01:24AM

Your structure of events table can lead to bad data. It relies on the definition of an event being identical i each row it is entered. And repetiton of data is poor design.

You would be better to lose the id_person field and have another table event_person which stores the event_id and the person_id.
Then an event is only defined once, and querying for who went to each event, or which events a particular person went to become quite trivial.

Good luck,
Barry.

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.