Best way to organise MySQL tables?
I am trying to think of a cleaner way to store information in MySQL tables.
Here is an example:
Website where people look at pictures of dogs.
Have 1 table that stores the location of all the pictures of dogs and information about that dog (breed, colour, age).
2nd table stores search criteria that the user has selected. I.e. they only want to see pictures of black Labradors.
PHP code then collects the id of all the pictures in table 1 that match the user's criteria in table 2.
The user is then shown all these pictures 1 at a time. They can then click a YES or NO button that will determine whether they see this picture ever again.
Another table then stores the id of the picture and whether they clicked yes or no. Next time the user comes back to the site, they are only shown the pictures of dogs that match their criteria from table 2 and one's they have not yet said NO to.
However, this would require a YES/NO table for every single user. This is where the number of tables gets a bit too large. I am trying to find a simpler way to organise this data.