Relationships
Right now, we’ve created one new model: Customer
. But we want to add more to our data model. In our case, we would like to associate an address with each customer. There are different ways of doing this. We can, of course, add a couple of new properties to our customer model. This would mean that you can register an address on the customer. There is nothing wrong with this at all, but let’s say you would like to add multiple addresses for your customer. Your customer may, for example, have a home address, but also a work address. This would mean that you would have to add the same properties twice with different names. This could get messy really quickly if you want to add more than a few addresses for a customer. So, in this case, we will add another model named Address
to our data model. Let’s click on the new button in the top-right corner of the model schema overview. Let’s name our new model Address
and save it. Most likely, it will be...