One-to-Many relationship in MySQL - how to build model?
I have got two tables: 1) Area 2) Map Each Area shall have at least 1 Map, but can also have more than one Map. One Map can only belong to one Area. How to build this in MySQL? Jenius Add a Foreign key in Map that references the Area's Primary Key. That will enforce a one-to-many relationship between Maps and Areas. As for enforcing a minimum of one map per area (if that is necessary) there are some ideas in this post here . One of the simpler solutions would be to create a view that only displays areas which have maps: CREATE VIEW viewAreas AS SELECT * FROM Areas, Maps WHERE Areas.ID = Maps