Data Model

I'm playing with datamodel. Sorry, I'm not used to CRM and I studied databases at school two decades ago.. it's blurry in my mind. I created a Country:Countries object with basic informations as name, iso3. I will add some specific fields later on. As you see in the screenshot, I created a Project:Projects objects. One project should be related to at least to one country. So I created a Field named 'Country' with a relation with "has many" Countries. And I named the field on Countries "Projects". Is this the good way to proceed? Thanks for your help
No description
5 Replies
charles
charles11mo ago
It looks mixed in what you have done. To clarify, it depends on what you are trying to achieve: - does a project have many countries? - OR does a country have many projects? - OR both? From a naive perspective (it really depends what you try to model), a project is located in a given country. So in this case, a country has many projects: - what you have on your screenshot is right except that the relationType should be belongsTo (a project belongsTo a country because a country has many projects)
greg [iero]
greg [iero]OP11mo ago
Thanks Charles! Yes a project can be in one or several countries. So in the other way, one country can have several projects. What is not clear for me is the last line. It is just the list of Projects related to a country?
greg [iero]
greg [iero]OP11mo ago
Well, I tried to link Companies with a "Country" relation and I broke everything Any idea?
greg [iero]
greg [iero]OP11mo ago
Well, I've done a database reset. I will try again to see if I can reproduce it
charles
charles11mo ago
ok, let me know 🙂 we still might have some bugs in these area, it would be great to track them down
Want results from more Discord servers?
Add your server