From the course: Microsoft Power Platform Functional Consultant Associate (PL-200) Cert Prep

Creating Dataverse tables, relationships, and columns

- [Instructor] As we know, data within Dataverse is stored within tables. Sometimes we might need more than the standard tables that are available, and we'll have to build our own to meet our business needs. A table stores a set of records and the attributes of these records are contained in columns. We can separate data into tables and relate between tables to build robust business solutions we need. Let's take a look at how to create a custom table, create columns for it and build relationships. Part of the app we want to build will give people the ability to store and interact with info about Two Tree Olive Oils tasting session bookings. From Power Apps, we can create a new table and call it Bookings. Note that there are further options to pick from, but for now we'll just go ahead and create it. What type of info do we want to store about the tasting session booking? Perhaps the booking number, date, number of people, and the main contacts details. These attributes are examples of columns we can create. Note that there are multiple different column types to pick from, including single line text, choices, email, URL, rich text, date and time, currency and numbers, just to name a few. Pick the most relevant data type for the column. Booking Date is expecting a date value, so it makes sense to create that with the date type. A Number of People is just expecting a whole number. To create a column, click New column while in the table. When we look at a booking, we also want to be able to view who the booking is for. Rather than recreate all the contact details again in the booking table, we can simply create a relationship between the booking and contact table, which already has this information. Relationships define how table records can be associated with records in another table. Relationships can be either one to many where many related table records are associated with a single primary table, a contact could have multiple bookings created for them, or many to many where many table records are associated with many table records. Relationships are created using the lookup data type. We'll create a new column called Contact in the booking table. Set the data type to look up and link it to the existing contact table. This will store the unique identifier of the primary table. So what would tables, columns and relationships look like for an end user? We'll look at model-driven apps later in the course, but here's a snapshot. In the app, we can open up a booking and view its details or the columns for it. There's contact link to the booking. By clicking on the contact, you can now look at that record in further detail. Create some of your own tables now, but before creating your custom tables, think about what kind of columns you'd need, their data types, and what kind of relationships it would have to other tables.

Contents