What data structure underlines 1:N Data Relationships?

I believe Backendless uses MySQL as the DB. If I was building a DB in MySQL and wanted to make a 1:N relationship, I would either do it with PK/FKs or a join table.

In Backendless, I can create a table, Companies, and a table States. Companies can be in multiple states, and multiple companies can be in the same state.

As I understand it, that would require a join table in MySQL, but Backendless doesn’t require that. Just wondering how that is done.

Thanks,
Tim

This following two videos should answer your question:

Hi @mark-piller,

Thanks for the videos. As always, your videos are super well done. But I don’t think this answers my questions.

I know how to create the data relationships in Backendless, but I don’t understand what it’s actually doing in MySQL. I want to understand how it is possible for Backendless to make a 1:N that overlaps the students.

In MySQL, for the first example 1, you would have a primary key in the course table, and a matching FK in the student table. But that would not work for the red lines in example two. A FK would need to represent two courses as the PK for a student, and you would need a join table.

But in Backendless, I can make this happen with no problem. It fascinates me how the data underneath is organized.

Thank you, Tim.

I am curious as to why you need to know what Backendless does in MySQL? The implementation is black-boxed; even if you understand the underlying implementation, it does not provide any value from the Backendless usage perspective.

I know that’s a non-answer though :wink: The honest answer is, “I don’t know”.

Hey @mark-piller,

When I’m thinking about our system with Backendless, my experience in SQL keeps bumping into the join magic as described above. I like understanding how things work.

Tim