Introduction to Dataverse
Dataverse is more than just a database - it stores data, provides different levels of data and much more. At its heart, it is a relational database and provides a rich set of relationships.
Relationships in Dataverse
There are a lot of different relational capabilities that are available with Dataverse. These include:
- One to many
- Many to one
- Out of the box many to many
- Custom many to many
- One to one
- Indirect
- Polymorphic lookups
- Choice columns
- Yes/No columns
- Connections (what's this?)
Model-driven apps are more straightforward when it comes to working with Dataverse relationships. Those same concepts, are slightly more complicated in canvas apps. A lot of questions get asked on the Power Apps community forums on these topics. Since a lot of makers work with SharePoint and other data sources, they find these concepts challenging when they switch to Dataverse. More than 90% of our projects at Hitachi Solutions use Dataverse as the datasource. Which is why Dataverse was the first database I was exposed to, as far as canvas apps are concerned.
Illustrations using a simple data model
Over the next few days, I plan to cover each one of them in detail. For each relationship, we will cover the following topics:
- Display related records
- Relate records
- Remove/delete relationships between records
We will be using a simple student management system as an example to illustrate all the different types of relationships. Here is the data model:
These are the relationships that we will be using in the blog series:
- One to many: one department can have multiple instructors but an instructor can only belong to one department
- Many to one: many courses can be taught by an instructor but one course can only be taught by one instructor
- Out of the box many to many: one student can enroll in multiple courses and one course can be taken up by multiple students
- Custom many to many: one student can enroll in multiple sports and one sport can be taken up by multiple students
- Indirect: relationship between an instructor and his/her students (via courses)
- Polymorphic lookups: record owners of any table in Dataverse
- One to one: personal details of students (e.g. SSN, DOB etc.)
- Connections: different types of relationships between a student and an instructor e.g. mentor/mentee.
- Yes/No & Choice columns: major of a student e.g. finance (Choice column) and whether he/she is an international student (Yes/No)
So stay tuned to learn everything you need to know about Dataverse relationships and how to use them in canvas apps!
PS: Links to each separate blog post have been added above. Also, I spoke about this topic at the Portland Power Platform Virtual Meetup on June 8th 2021. If you are interested in watching it, here is the link.
13 thoughts on “How to master Dataverse relationships in canvas apps!”