Multiple Google maps locations, column range, table relations

Hi

This is my setup:

I have a table of products

And I also have a table of restaurants where these products can be consumed or purchased. All of the restaurants have google location coordinates.

Each hotel or restaurant serves a number of products, e.g. honey, butter, cheese, etc. Therefore it cannot be only one single product per restaurant.

Now, when I access product detailed view, I want to show a link to a map of all the restaurants where this specific product is served. It usually is more than one. This link should say โ€œWhere to eatโ€.

How do I approach this problem?

If you know any expressions, pleas show me how to add them, because I am still a begginer.

Thank you.

0 4 306
4 REPLIES 4

Youโ€™ll need to define a โ€œmany to many relationshipโ€ between the Products Table, and the Establishments Table. Iโ€™d highly recommend the so called โ€œdatabase normal formโ€, where you make a new Table to hold all of the associations. Each record in this new Table, often called an โ€œassociation tableโ€, will link a single Product to a single Establishment, but there can be any number of records for each Product and/or Establishment.

For further details please search the words/phrases that I put in quotes, both on google, and here in this community.

Yes. I see the logic behind this approach. But there are 120 establishments and 80 products. With all of the variations, the table would need to be huge and it would take a lot of time to build.

I did some research based on your suggestions. Would this approach be viable in my case: Many-to-Many Relationships

Looks like I would be able to have multiple entries in one cell and still establish relations.

Thank you.

It really depends on how complex of functionality youโ€™re expecting to utilize across these many-to-many relationships. Iโ€™ve used both. Most of the time that I use EnumLists, I end up regretting not setting up the association Table from the beginning. But then again, I also often implement more complex functionality, which is precisely when it stings me.

Well, all I want is to have a link that takes me to the restaurants where those products can be consumed.

Top Labels in this Space