Day: 19 May 2016
-
SQL: Many-to-Many and One-to-Many
Here’s a short tutorial on how to solve some basic SQL cardinalities. First have a look at the ER-diagram for the database and the resulting tables in PhpMyAdmin. Many-to-Many Many to many cardinalities may be solved like this: SELECT cake, who FROM cakes, costumers, likes WHERE costumers.costumers_id = likes.costumers_id AND cakes.cakes_id = likes.cakes_id Note that…